init project

This commit is contained in:
Jasder
2020-03-09 00:40:16 +08:00
commit 2937b2a94d
6549 changed files with 7215173 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
json.course_groups do
json.array! attachment_group_settings, partial: 'course_groups/course_group', as: :attachment_group_setting
end

View File

View File

@@ -0,0 +1,3 @@
json.tags do
json.array! tags, :id, :name
end

View File

@@ -0,0 +1 @@
json.partial! "commons/success"

View File

@@ -0,0 +1 @@
json.partial! "commons/success"

View File

@@ -0,0 +1 @@
json.partial! "commons/success"

View File

@@ -0,0 +1 @@
json.partial! "commons/success"

View File

@@ -0,0 +1,3 @@
json.partial! 'attachments/attachment_small', attachment: @file
json.partial! "attachment_histories/list", attachment_histories: @attachment_histories

View File

@@ -0,0 +1 @@
json.partial! "commons/success"

View File

@@ -0,0 +1,22 @@
json.partial! "commons/success"
json.data do
json.id @category_id
json.name @category_name
json.total_count @total_count
json.publish_count @publish_count
json.unpublish_count @unpublish_count
json.course_is_public @course.is_public?
json.files do
json.array! @attachments do |attachment|
json.is_history_file attachment.attachment_histories.count > 0 #是否有历史文件
json.partial! "attachments/attachment", attachment: attachment
json.author do
json.partial! "users/user_simple", user: attachment.author
end
# json.partial! "files/course_groups", attachment_group_settings: attachment.attachment_group_settings
if @course_second_category_id.to_i == 0
json.category_name attachment.course_second_category&.name
end
end
end
end

View File

@@ -0,0 +1,12 @@
json.partial! "commons/success"
json.data do
json.total_count @total_count
json.files do
json.array! @attachments do |attachment|
json.partial! "attachments/attachment_small", attachment: attachment
json.author do
json.partial! "users/user_simple", user: @current_user
end
end
end
end

View File

@@ -0,0 +1,12 @@
json.partial! "commons/success"
json.data do
json.total_count @total_count
json.files do
json.array! @attachments do |attachment|
json.partial! "attachments/attachment_small", attachment: attachment
json.author do
json.partial! "users/user_simple", user: attachment.author
end
end
end
end

View File

@@ -0,0 +1,3 @@
json.partial! 'attachments/attachment', attachment: @file
json.partial! "files/course_groups", attachment_group_settings: @file.attachment_group_settings
json.partial! "attachment_histories/list", attachment_histories: @attachment_histories

View File

@@ -0,0 +1 @@
json.partial! "commons/success"

View File

@@ -0,0 +1 @@
json.partial! "commons/success"