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.

show.html.erb 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <%= render :partial => 'action_menu' %>
  2. <h2 class="inline-block"><%= issue_heading(@issue) %></h2><%= issue_status_type_badge(@issue.status) %>
  3. <% if @issue.is_private? %>
  4. <span class="badge badge-private private"><%= l(:field_is_private) %></span>
  5. <% end %>
  6. <div class="<%= @issue.css_classes %> details">
  7. <% if @prev_issue_id || @next_issue_id %>
  8. <div class="next-prev-links contextual">
  9. <%= link_to_if @prev_issue_id,
  10. "\xc2\xab #{l(:label_previous)}",
  11. (@prev_issue_id ? issue_path(@prev_issue_id) : nil),
  12. :title => "##{@prev_issue_id}",
  13. :accesskey => accesskey(:previous) %> |
  14. <% if @issue_position && @issue_count %>
  15. <span class="position">
  16. <%= link_to_if @query_path,
  17. l(:label_item_position, :position => @issue_position, :count => @issue_count),
  18. @query_path %>
  19. </span> |
  20. <% end %>
  21. <%= link_to_if @next_issue_id,
  22. "#{l(:label_next)} \xc2\xbb",
  23. (@next_issue_id ? issue_path(@next_issue_id) : nil),
  24. :title => "##{@next_issue_id}",
  25. :accesskey => accesskey(:next) %>
  26. </div>
  27. <% end %>
  28. <div class="gravatar-with-child">
  29. <%= author_avatar(@issue.author, :size => "50") %>
  30. <%= assignee_avatar(@issue.assigned_to, :size => "22", :class => "gravatar-child") if @issue.assigned_to %>
  31. </div>
  32. <div class="subject">
  33. <%= render_issue_subject_with_tree(@issue) %>
  34. </div>
  35. <p class="author">
  36. <%= authoring @issue.created_on, @issue.author %>.
  37. <% if @issue.created_on != @issue.updated_on %>
  38. <%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>.
  39. <% end %>
  40. </p>
  41. <div class="attributes">
  42. <%= issue_fields_rows do |rows|
  43. rows.left l(:field_status), @issue.status.name, :class => 'status'
  44. unless @issue.disabled_core_fields.include?('priority_id')
  45. rows.left l(:field_priority), @issue.priority.name, :class => 'priority'
  46. end
  47. unless @issue.disabled_core_fields.include?('assigned_to_id')
  48. rows.left l(:field_assigned_to), (@issue.assigned_to ? link_to_principal(@issue.assigned_to) : "-"), :class => 'assigned-to'
  49. end
  50. unless @issue.disabled_core_fields.include?('category_id') || (@issue.category.nil? && @issue.project.issue_categories.none?)
  51. rows.left l(:field_category), (@issue.category ? @issue.category.name : "-"), :class => 'category'
  52. end
  53. unless @issue.disabled_core_fields.include?('fixed_version_id') || (@issue.fixed_version.nil? && @issue.assignable_versions.none?)
  54. rows.left l(:field_fixed_version), (@issue.fixed_version ? link_to_version(@issue.fixed_version) : "-"), :class => 'fixed-version'
  55. end
  56. unless @issue.disabled_core_fields.include?('start_date')
  57. rows.right l(:field_start_date), format_date(@issue.start_date), :class => 'start-date'
  58. end
  59. unless @issue.disabled_core_fields.include?('due_date')
  60. rows.right l(:field_due_date), issue_due_date_details(@issue), :class => 'due-date'
  61. end
  62. unless @issue.disabled_core_fields.include?('done_ratio')
  63. rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :legend => "#{@issue.done_ratio}%"), :class => 'progress'
  64. end
  65. unless @issue.disabled_core_fields.include?('estimated_hours')
  66. rows.right l(:field_estimated_hours), issue_estimated_hours_details(@issue), :class => 'estimated-hours'
  67. end
  68. if User.current.allowed_to?(:view_time_entries, @project) && @issue.total_spent_hours > 0
  69. rows.right l(:label_spent_time), issue_spent_hours_details(@issue), :class => 'spent-time'
  70. end
  71. end %>
  72. <%= render_half_width_custom_fields_rows(@issue) %>
  73. <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
  74. </div>
  75. <% if @issue.description? %>
  76. <hr />
  77. <div class="description">
  78. <div class="contextual">
  79. <%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if @issue.notes_addable? %>
  80. </div>
  81. <p><strong><%=l(:field_description)%></strong></p>
  82. <div class="wiki">
  83. <%= textilizable @issue, :description, :attachments => @issue.attachments %>
  84. </div>
  85. </div>
  86. <% end %>
  87. <% if @issue.attachments.any? %>
  88. <hr />
  89. <p><strong><%=l(:label_attachment_plural)%></strong></p>
  90. <%= link_to_attachments @issue, :thumbnails => true %>
  91. <% end %>
  92. <%= render_full_width_custom_fields_rows(@issue) %>
  93. <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
  94. <% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
  95. <hr />
  96. <div id="issue_tree">
  97. <%= render :partial => 'subtasks' %>
  98. </div>
  99. <% end %>
  100. <% if @relations.present? || User.current.allowed_to?(:manage_issue_relations, @project) %>
  101. <hr />
  102. <div id="relations">
  103. <%= render :partial => 'relations' %>
  104. </div>
  105. <% end %>
  106. </div>
  107. <%= render partial: 'action_menu_edit' if User.current.wants_comments_in_reverse_order? %>
  108. <div id="history">
  109. <%= render_tabs issue_history_tabs, issue_history_default_tab %>
  110. </div>
  111. <%= render partial: 'action_menu_edit' unless User.current.wants_comments_in_reverse_order? %>
  112. <% other_formats_links do |f| %>
  113. <%= f.link_to 'Atom', :url => {:key => User.current.atom_key} %>
  114. <%= f.link_to 'PDF' %>
  115. <% end %>
  116. <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
  117. <% content_for :sidebar do %>
  118. <%= render :partial => 'issues/sidebar' %>
  119. <% if User.current.allowed_to?(:add_issue_watchers, @project) ||
  120. (@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
  121. <div id="watchers">
  122. <%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
  123. </div>
  124. <% end %>
  125. <% end %>
  126. <% content_for :header_tags do %>
  127. <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.atom_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
  128. <% end %>
  129. <%= context_menu %>