You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/views/issues/show.json.jbuilder

27 lines
1.0 KiB

json.partial! "commons/success"
json.extract! @issue, :id,:subject,:description,:is_private, :start_date,:due_date,:estimated_hours
json.closed_on @issue.closed_on.present? ? format_time(@issue.closed_on) : ""
json.created_at format_time(@issue.created_on)
json.assign_user_name @issue_assign_to.try(:show_real_name)
json.assign_user_login @issue_assign_to.try(:login)
json.author_name @issue_user.try(:show_real_name)
json.author_login @issue_user.try(:login)
json.author_picture url_to_avatar(@issue_user)
json.tracker @issue.tracker.try(:name)
json.issue_status @issue.issue_status.try(:name)
json.priority @issue.priority.try(:name)
json.version @issue.version.try(:title)
json.issue_tags @issue.get_issue_tags
json.done_ratio @issue.done_ratio.to_s + "%"
json.issue_type @issue.issue_type == "1" ? "普通" : "悬赏"
json.token @issue.issue_type == "2" ? @issue.token : ""
json.attachments do
json.array! @issue_attachments do |attachment|
json.partial! "attachments/attachment_simple", locals: {attachment: attachment}
end
end