资源的二级目录信息

courseware
cxt 5 years ago
parent b739282feb
commit 0d3210f754

@ -32,8 +32,7 @@ class FilesController < ApplicationController
end
end
@attachments = @attachments.includes(author: [:user_extension, :course_members])
.ordered(sort: sort.to_i, sort_type: sort_type.strip)
@attachments = @attachments.ordered(sort: sort.to_i, sort_type: sort_type.strip)
@total_count = @attachments.size
@unlink_count = @attachments.no_link.size
@ -59,7 +58,8 @@ class FilesController < ApplicationController
@attachments = @attachments.no_link
end
@attachments = @attachments.page(@page).per(@page_size)
@attachments = @attachments.includes(:course_second_category, author: [:user_extension, :course_members])
.page(@page).per(@page_size)
end
def bulk_publish

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

Loading…
Cancel
Save