3 # project - drawing target
4 # issue - drawing target
5 logger.debug "template"
8 extend AttachmentsHelper
9 extend CustomFieldsHelper
14 journals = issue.journals.includes(:user, :details).reorder("#{Journal.table_name}.id ASC").all
15 journals.each_with_index {|j,i| j.indice = i+1}
16 journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, project)
17 journals.reverse! if User.current.wants_comments_in_reverse_order?
19 dialog_id = Time.now.to_i
20 dialog_html_id = "quick_view_dialog_#{dialog_id}"
22 <div id="<%= dialog_html_id %>" class="quick_view_dialog" style="background-color: white;" title="Quick View - <%= issue.subject %>" data-issue="<%= issue.id.to_s %>">
25 <%= render_issue_subject_with_tree(issue) %>
28 <%= authoring issue.created_on, issue.author %>.
29 <% if issue.created_on != issue.updated_on %>
30 <%= l(:label_updated_time, time_tag(issue.updated_on)).html_safe %>.
34 <table class="attributes">
35 <%= issue_fields_rows do |rows|
36 rows.left l(:field_status), h(issue.status.name), :class => 'status'
37 rows.left l(:field_priority), h(issue.priority.name), :class => 'priority'
39 unless issue.disabled_core_fields.include?('assigned_to_id')
40 rows.left l(:field_assigned_to), avatar(issue.assigned_to, :size => "14").to_s.html_safe + (issue.assigned_to ? link_to_user(issue.assigned_to) : "-"), :class => 'assigned-to'
42 unless issue.disabled_core_fields.include?('category_id')
43 rows.left l(:field_category), h(issue.category ? issue.category.name : "-"), :class => 'category'
45 unless issue.disabled_core_fields.include?('fixed_version_id')
46 rows.left l(:field_fixed_version), (issue.fixed_version ? link_to_version(issue.fixed_version) : "-"), :class => 'fixed-version'
49 unless issue.disabled_core_fields.include?('start_date')
50 rows.right l(:field_start_date), format_date(issue.start_date), :class => 'start-date'
52 unless issue.disabled_core_fields.include?('due_date')
53 rows.right l(:field_due_date), format_date(issue.due_date), :class => 'due-date'
55 unless issue.disabled_core_fields.include?('done_ratio')
56 rows.right l(:field_done_ratio), progress_bar(issue.done_ratio, :width => '80px', :legend => "#{issue.done_ratio}%"), :class => 'progress'
58 unless issue.disabled_core_fields.include?('estimated_hours')
59 unless issue.estimated_hours.nil?
60 rows.right l(:field_estimated_hours), l_hours(issue.estimated_hours), :class => 'estimated-hours'
63 if User.current.allowed_to?(:view_time_entries, project)
64 rows.right l(:label_spent_time), (issue.total_spent_hours > 0 ? link_to(l_hours(issue.total_spent_hours), project_issue_time_entries_path(project, issue)) : "-"), :class => 'spent-time'
69 <%= render_custom_fields_rows(issue) %>
74 <div class="description">
75 <p><strong><%=l(:field_description)%></strong></p>
77 <% if issue.description? %>
78 <%= textilizable issue, :description, :attachments => issue.attachments %>
80 <i>description is none.</i>
83 <% if issue.attachments.any? %>
84 <%= link_to_attachments issue, :thumbnails => true %>
89 <% if journals.present? %>
91 <h3><%=l(:label_history)%></h3>
92 <%= render :partial => '../../../../app/views/issues/history', :locals => { :issue => issue, :journals => journals } %>
97 <!--<script>$('#<%= dialog_html_id %>').dialog();</script>-->