json.ultimate @work.ultimate_score

json.last_comment do
  json.last_content @last_comment.try(:comment)
  json.last_score @last_comment.try(:score)
end

json.comment_scores @comment_scores do |score|
  json.user_login score.user.login
  json.user_image_url url_to_avatar(score.user)
  json.user_name score.user.real_name
  json.comment_id score.id
  json.comment_role score.reviewer_role == 1 ? "教师" : "交叉评阅"
  json.comment_time score.created_at
  json.score score.score
  json.content score.comment
  json.is_invalid score.is_invalid
  json.delete (@current_user == score.user || @current_user.admin_or_business?) && (score.is_invalid || score.score.nil?)
  json.attachments score.attachments do |atta|
    json.partial! "attachments/attachment_simple", locals: {attachment: atta, delete: false}
  end
end