二级目录的显示调整

courseware
cxt 5 years ago
parent a2f0765c42
commit a404745774

@ -17,10 +17,15 @@ json.data do
end
# json.partial! "files/course_groups", attachment_group_settings: attachment.attachment_group_settings
json.category_id attachment.course_second_category_id
if (@course_second_category_id.to_i == 0 && attachment.course_second_category.present?) || (@parent_category_id == 0 && attachment.course_second_category&.parent_id.to_i != 0)
if @course_second_category_id.to_i == 0 && attachment.course_second_category.present?
json.category_name attachment.course_second_category&.name
json.parent_category_name attachment.course_second_category&.parent&.name
end
if @parent_category_id == 0 && attachment.course_second_category&.parent_id.to_i != 0
json.category_name attachment.course_second_category&.name
json.parent_category_name nil
end
end
end
end

Loading…
Cancel
Save