##// END OF EJS Templates
Do not hide estimated_hours when field is not disabled (#24015)....
Jean-Philippe Lang -
r15524:7154c6f598cb
parent child
Show More
@@ -1,162 +1,160
1 <%= render :partial => 'action_menu' %>
1 <%= render :partial => 'action_menu' %>
2
2
3 <h2><%= issue_heading(@issue) %></h2>
3 <h2><%= issue_heading(@issue) %></h2>
4
4
5 <div class="<%= @issue.css_classes %> details">
5 <div class="<%= @issue.css_classes %> details">
6 <% if @prev_issue_id || @next_issue_id %>
6 <% if @prev_issue_id || @next_issue_id %>
7 <div class="next-prev-links contextual">
7 <div class="next-prev-links contextual">
8 <%= link_to_if @prev_issue_id,
8 <%= link_to_if @prev_issue_id,
9 "\xc2\xab #{l(:label_previous)}",
9 "\xc2\xab #{l(:label_previous)}",
10 (@prev_issue_id ? issue_path(@prev_issue_id) : nil),
10 (@prev_issue_id ? issue_path(@prev_issue_id) : nil),
11 :title => "##{@prev_issue_id}",
11 :title => "##{@prev_issue_id}",
12 :accesskey => accesskey(:previous) %> |
12 :accesskey => accesskey(:previous) %> |
13 <% if @issue_position && @issue_count %>
13 <% if @issue_position && @issue_count %>
14 <span class="position"><%= l(:label_item_position, :position => @issue_position, :count => @issue_count) %></span> |
14 <span class="position"><%= l(:label_item_position, :position => @issue_position, :count => @issue_count) %></span> |
15 <% end %>
15 <% end %>
16 <%= link_to_if @next_issue_id,
16 <%= link_to_if @next_issue_id,
17 "#{l(:label_next)} \xc2\xbb",
17 "#{l(:label_next)} \xc2\xbb",
18 (@next_issue_id ? issue_path(@next_issue_id) : nil),
18 (@next_issue_id ? issue_path(@next_issue_id) : nil),
19 :title => "##{@next_issue_id}",
19 :title => "##{@next_issue_id}",
20 :accesskey => accesskey(:next) %>
20 :accesskey => accesskey(:next) %>
21 </div>
21 </div>
22 <% end %>
22 <% end %>
23
23
24 <%= avatar(@issue.author, :size => "50") %>
24 <%= avatar(@issue.author, :size => "50") %>
25
25
26 <div class="subject">
26 <div class="subject">
27 <%= render_issue_subject_with_tree(@issue) %>
27 <%= render_issue_subject_with_tree(@issue) %>
28 </div>
28 </div>
29 <p class="author">
29 <p class="author">
30 <%= authoring @issue.created_on, @issue.author %>.
30 <%= authoring @issue.created_on, @issue.author %>.
31 <% if @issue.created_on != @issue.updated_on %>
31 <% if @issue.created_on != @issue.updated_on %>
32 <%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>.
32 <%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>.
33 <% end %>
33 <% end %>
34 </p>
34 </p>
35
35
36 <div class="attributes">
36 <div class="attributes">
37 <%= issue_fields_rows do |rows|
37 <%= issue_fields_rows do |rows|
38 rows.left l(:field_status), @issue.status.name, :class => 'status'
38 rows.left l(:field_status), @issue.status.name, :class => 'status'
39 rows.left l(:field_priority), @issue.priority.name, :class => 'priority'
39 rows.left l(:field_priority), @issue.priority.name, :class => 'priority'
40
40
41 unless @issue.disabled_core_fields.include?('assigned_to_id')
41 unless @issue.disabled_core_fields.include?('assigned_to_id')
42 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 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'
43 end
43 end
44 unless @issue.disabled_core_fields.include?('category_id') || (@issue.category.nil? && @issue.project.issue_categories.none?)
44 unless @issue.disabled_core_fields.include?('category_id') || (@issue.category.nil? && @issue.project.issue_categories.none?)
45 rows.left l(:field_category), (@issue.category ? @issue.category.name : "-"), :class => 'category'
45 rows.left l(:field_category), (@issue.category ? @issue.category.name : "-"), :class => 'category'
46 end
46 end
47 unless @issue.disabled_core_fields.include?('fixed_version_id') || (@issue.fixed_version.nil? && @issue.assignable_versions.none?)
47 unless @issue.disabled_core_fields.include?('fixed_version_id') || (@issue.fixed_version.nil? && @issue.assignable_versions.none?)
48 rows.left l(:field_fixed_version), (@issue.fixed_version ? link_to_version(@issue.fixed_version) : "-"), :class => 'fixed-version'
48 rows.left l(:field_fixed_version), (@issue.fixed_version ? link_to_version(@issue.fixed_version) : "-"), :class => 'fixed-version'
49 end
49 end
50
50
51 unless @issue.disabled_core_fields.include?('start_date')
51 unless @issue.disabled_core_fields.include?('start_date')
52 rows.right l(:field_start_date), format_date(@issue.start_date), :class => 'start-date'
52 rows.right l(:field_start_date), format_date(@issue.start_date), :class => 'start-date'
53 end
53 end
54 unless @issue.disabled_core_fields.include?('due_date')
54 unless @issue.disabled_core_fields.include?('due_date')
55 rows.right l(:field_due_date), format_date(@issue.due_date), :class => 'due-date'
55 rows.right l(:field_due_date), format_date(@issue.due_date), :class => 'due-date'
56 end
56 end
57 unless @issue.disabled_core_fields.include?('done_ratio')
57 unless @issue.disabled_core_fields.include?('done_ratio')
58 rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :legend => "#{@issue.done_ratio}%"), :class => 'progress'
58 rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :legend => "#{@issue.done_ratio}%"), :class => 'progress'
59 end
59 end
60 unless @issue.disabled_core_fields.include?('estimated_hours')
60 unless @issue.disabled_core_fields.include?('estimated_hours')
61 if @issue.estimated_hours.present? || @issue.total_estimated_hours.to_f > 0
62 rows.right l(:field_estimated_hours), issue_estimated_hours_details(@issue), :class => 'estimated-hours'
61 rows.right l(:field_estimated_hours), issue_estimated_hours_details(@issue), :class => 'estimated-hours'
63 end
62 end
64 end
65 if User.current.allowed_to_view_all_time_entries?(@project)
63 if User.current.allowed_to_view_all_time_entries?(@project)
66 if @issue.total_spent_hours > 0
64 if @issue.total_spent_hours > 0
67 rows.right l(:label_spent_time), issue_spent_hours_details(@issue), :class => 'spent-time'
65 rows.right l(:label_spent_time), issue_spent_hours_details(@issue), :class => 'spent-time'
68 end
66 end
69 end
67 end
70 end %>
68 end %>
71 <%= render_custom_fields_rows(@issue) %>
69 <%= render_custom_fields_rows(@issue) %>
72 <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
70 <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
73 </div>
71 </div>
74
72
75 <% if @issue.description? || @issue.attachments.any? -%>
73 <% if @issue.description? || @issue.attachments.any? -%>
76 <hr />
74 <hr />
77 <% if @issue.description? %>
75 <% if @issue.description? %>
78 <div class="description">
76 <div class="description">
79 <div class="contextual">
77 <div class="contextual">
80 <%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if @issue.notes_addable? %>
78 <%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if @issue.notes_addable? %>
81 </div>
79 </div>
82
80
83 <p><strong><%=l(:field_description)%></strong></p>
81 <p><strong><%=l(:field_description)%></strong></p>
84 <div class="wiki">
82 <div class="wiki">
85 <%= textilizable @issue, :description, :attachments => @issue.attachments %>
83 <%= textilizable @issue, :description, :attachments => @issue.attachments %>
86 </div>
84 </div>
87 </div>
85 </div>
88 <% end %>
86 <% end %>
89 <%= link_to_attachments @issue, :thumbnails => true %>
87 <%= link_to_attachments @issue, :thumbnails => true %>
90 <% end -%>
88 <% end -%>
91
89
92 <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
90 <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
93
91
94 <% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
92 <% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
95 <hr />
93 <hr />
96 <div id="issue_tree">
94 <div id="issue_tree">
97 <div class="contextual">
95 <div class="contextual">
98 <%= link_to_new_subtask(@issue) if User.current.allowed_to?(:manage_subtasks, @project) %>
96 <%= link_to_new_subtask(@issue) if User.current.allowed_to?(:manage_subtasks, @project) %>
99 </div>
97 </div>
100 <p><strong><%=l(:label_subtask_plural)%></strong></p>
98 <p><strong><%=l(:label_subtask_plural)%></strong></p>
101 <%= render_descendants_tree(@issue) unless @issue.leaf? %>
99 <%= render_descendants_tree(@issue) unless @issue.leaf? %>
102 </div>
100 </div>
103 <% end %>
101 <% end %>
104
102
105 <% if @relations.present? || User.current.allowed_to?(:manage_issue_relations, @project) %>
103 <% if @relations.present? || User.current.allowed_to?(:manage_issue_relations, @project) %>
106 <hr />
104 <hr />
107 <div id="relations">
105 <div id="relations">
108 <%= render :partial => 'relations' %>
106 <%= render :partial => 'relations' %>
109 </div>
107 </div>
110 <% end %>
108 <% end %>
111
109
112 </div>
110 </div>
113
111
114 <% if @changesets.present? %>
112 <% if @changesets.present? %>
115 <div id="issue-changesets">
113 <div id="issue-changesets">
116 <h3><%=l(:label_associated_revisions)%></h3>
114 <h3><%=l(:label_associated_revisions)%></h3>
117 <%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
115 <%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
118 </div>
116 </div>
119 <% end %>
117 <% end %>
120
118
121 <% if @journals.present? %>
119 <% if @journals.present? %>
122 <div id="history">
120 <div id="history">
123 <h3><%=l(:label_history)%></h3>
121 <h3><%=l(:label_history)%></h3>
124 <%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
122 <%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
125 </div>
123 </div>
126 <% end %>
124 <% end %>
127
125
128
126
129 <div style="clear: both;"></div>
127 <div style="clear: both;"></div>
130 <%= render :partial => 'action_menu' %>
128 <%= render :partial => 'action_menu' %>
131
129
132 <div style="clear: both;"></div>
130 <div style="clear: both;"></div>
133 <% if @issue.editable? %>
131 <% if @issue.editable? %>
134 <div id="update" style="display:none;">
132 <div id="update" style="display:none;">
135 <h3><%= l(:button_edit) %></h3>
133 <h3><%= l(:button_edit) %></h3>
136 <%= render :partial => 'edit' %>
134 <%= render :partial => 'edit' %>
137 </div>
135 </div>
138 <% end %>
136 <% end %>
139
137
140 <% other_formats_links do |f| %>
138 <% other_formats_links do |f| %>
141 <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
139 <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
142 <%= f.link_to 'PDF' %>
140 <%= f.link_to 'PDF' %>
143 <% end %>
141 <% end %>
144
142
145 <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
143 <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
146
144
147 <% content_for :sidebar do %>
145 <% content_for :sidebar do %>
148 <%= render :partial => 'issues/sidebar' %>
146 <%= render :partial => 'issues/sidebar' %>
149
147
150 <% if User.current.allowed_to?(:add_issue_watchers, @project) ||
148 <% if User.current.allowed_to?(:add_issue_watchers, @project) ||
151 (@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
149 (@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
152 <div id="watchers">
150 <div id="watchers">
153 <%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
151 <%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
154 </div>
152 </div>
155 <% end %>
153 <% end %>
156 <% end %>
154 <% end %>
157
155
158 <% content_for :header_tags do %>
156 <% content_for :header_tags do %>
159 <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
157 <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
160 <% end %>
158 <% end %>
161
159
162 <%= context_menu issues_context_menu_path %>
160 <%= context_menu issues_context_menu_path %>
General Comments 0
You need to be logged in to leave comments. Login now