json.partial! "homework_commons/homework_public_navigation", locals: {homework: @homework, course: @course, user: @current_user}
json.(@work, :description, :commit_time, :update_time)

json.is_evaluation @is_evaluation
json.author_name @is_evaluation ? "匿名" : @work.user.real_name
json.is_leader_work @work.user_id == @work.commit_user_id if @homework.homework_type == "group"
json.is_author @is_author
json.commit_user_name @is_evaluation ? "匿名" : @work.commit_user.try(:real_name)
json.update_user_name @is_evaluation ? "匿名" : @work.update_user.try(:real_name)

json.update_atta @homework.late_duration && @is_author

json.attachments @attachments do |atta|
  json.partial! "attachments/attachment_simple", locals: {attachment: atta, delete: false }
end

unless @is_evaluation
  if @homework.homework_type == "group" && @homework.homework_detail_group.base_on_project
    json.project_info project_info @work, @current_user, @user_course_identity
  end

  json.work_members @work_members.each do |work|
    json.user_name work.user.real_name
    json.user_login work.user.login
    json.work_id work.id
    json.is_leader work.user_id == work.commit_user_id
  end
end
