##// END OF EJS Templates
Fixes consistency of custom fields display on the issue detail view (#3190)....
Jean-Philippe Lang -
r2625:9f59538241ab
parent child
Show More
@@ -1,127 +1,127
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to_if_authorized(l(:button_update), {:controller => 'issues', :action => 'edit', :id => @issue }, :onclick => 'showAndScrollTo("update", "notes"); return false;', :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %>
2 <%= link_to_if_authorized(l(:button_update), {:controller => 'issues', :action => 'edit', :id => @issue }, :onclick => 'showAndScrollTo("update", "notes"); return false;', :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %>
3 <%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, :class => 'icon icon-time-add' %>
3 <%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, :class => 'icon icon-time-add' %>
4 <%= watcher_tag(@issue, User.current) %>
4 <%= watcher_tag(@issue, User.current) %>
5 <%= link_to_if_authorized l(:button_copy), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue }, :class => 'icon icon-copy' %>
5 <%= link_to_if_authorized l(:button_copy), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue }, :class => 'icon icon-copy' %>
6 <%= link_to_if_authorized l(:button_move), {:controller => 'issues', :action => 'move', :id => @issue }, :class => 'icon icon-move' %>
6 <%= link_to_if_authorized l(:button_move), {:controller => 'issues', :action => 'move', :id => @issue }, :class => 'icon icon-move' %>
7 <%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
7 <%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
8 </div>
8 </div>
9
9
10 <h2><%= @issue.tracker.name %> #<%= @issue.id %></h2>
10 <h2><%= @issue.tracker.name %> #<%= @issue.id %></h2>
11
11
12 <div class="<%= @issue.css_classes %> details">
12 <div class="<%= @issue.css_classes %> details">
13 <%= avatar(@issue.author, :size => "64") %>
13 <%= avatar(@issue.author, :size => "64") %>
14 <h3><%=h @issue.subject %></h3>
14 <h3><%=h @issue.subject %></h3>
15 <p class="author">
15 <p class="author">
16 <%= authoring @issue.created_on, @issue.author %>.
16 <%= authoring @issue.created_on, @issue.author %>.
17 <%= l(:label_updated_time, distance_of_time_in_words(Time.now, @issue.updated_on)) + '.' if @issue.created_on != @issue.updated_on %>
17 <%= l(:label_updated_time, distance_of_time_in_words(Time.now, @issue.updated_on)) + '.' if @issue.created_on != @issue.updated_on %>
18 </p>
18 </p>
19
19
20 <table width="100%">
20 <table width="100%">
21 <tr>
21 <tr>
22 <td style="width:15%" class="status"><b><%=l(:field_status)%>:</b></td><td style="width:35%" class="status"><%= @issue.status.name %></td>
22 <td style="width:15%" class="status"><b><%=l(:field_status)%>:</b></td><td style="width:35%" class="status"><%= @issue.status.name %></td>
23 <td style="width:15%" class="start-date"><b><%=l(:field_start_date)%>:</b></td><td style="width:35%"><%= format_date(@issue.start_date) %></td>
23 <td style="width:15%" class="start-date"><b><%=l(:field_start_date)%>:</b></td><td style="width:35%"><%= format_date(@issue.start_date) %></td>
24 </tr>
24 </tr>
25 <tr>
25 <tr>
26 <td class="priority"><b><%=l(:field_priority)%>:</b></td><td class="priority"><%= @issue.priority.name %></td>
26 <td class="priority"><b><%=l(:field_priority)%>:</b></td><td class="priority"><%= @issue.priority.name %></td>
27 <td class="due-date"><b><%=l(:field_due_date)%>:</b></td><td class="due-date"><%= format_date(@issue.due_date) %></td>
27 <td class="due-date"><b><%=l(:field_due_date)%>:</b></td><td class="due-date"><%= format_date(@issue.due_date) %></td>
28 </tr>
28 </tr>
29 <tr>
29 <tr>
30 <td class="assigned-to"><b><%=l(:field_assigned_to)%>:</b></td><td><%= avatar(@issue.assigned_to, :size => "14") %><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
30 <td class="assigned-to"><b><%=l(:field_assigned_to)%>:</b></td><td><%= avatar(@issue.assigned_to, :size => "14") %><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
31 <td class="progress"><b><%=l(:field_done_ratio)%>:</b></td><td class="progress"><%= progress_bar @issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%" %></td>
31 <td class="progress"><b><%=l(:field_done_ratio)%>:</b></td><td class="progress"><%= progress_bar @issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%" %></td>
32 </tr>
32 </tr>
33 <tr>
33 <tr>
34 <td class="category"><b><%=l(:field_category)%>:</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td>
34 <td class="category"><b><%=l(:field_category)%>:</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td>
35 <% if User.current.allowed_to?(:view_time_entries, @project) %>
35 <% if User.current.allowed_to?(:view_time_entries, @project) %>
36 <td class="spent-time"><b><%=l(:label_spent_time)%>:</b></td>
36 <td class="spent-time"><b><%=l(:label_spent_time)%>:</b></td>
37 <td class="spent-hours"><%= @issue.spent_hours > 0 ? (link_to l_hours(@issue.spent_hours), {:controller => 'timelog', :action => 'details', :project_id => @project, :issue_id => @issue}) : "-" %></td>
37 <td class="spent-hours"><%= @issue.spent_hours > 0 ? (link_to l_hours(@issue.spent_hours), {:controller => 'timelog', :action => 'details', :project_id => @project, :issue_id => @issue}) : "-" %></td>
38 <% end %>
38 <% end %>
39 </tr>
39 </tr>
40 <tr>
40 <tr>
41 <td class="fixed-version"><b><%=l(:field_fixed_version)%>:</b></td><td><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
41 <td class="fixed-version"><b><%=l(:field_fixed_version)%>:</b></td><td><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
42 <% if @issue.estimated_hours %>
42 <% if @issue.estimated_hours %>
43 <td class="estimated-hours"><b><%=l(:field_estimated_hours)%>:</b></td><td><%= l_hours(@issue.estimated_hours) %></td>
43 <td class="estimated-hours"><b><%=l(:field_estimated_hours)%>:</b></td><td><%= l_hours(@issue.estimated_hours) %></td>
44 <% end %>
44 <% end %>
45 </tr>
45 </tr>
46 <tr>
46 <tr>
47 <% n = 0 -%>
47 <% n = 0 -%>
48 <% @issue.custom_values.each do |value| -%>
48 <% @issue.custom_field_values.each do |value| -%>
49 <td valign="top"><b><%=h value.custom_field.name %>:</b></td><td valign="top"><%= simple_format(h(show_value(value))) %></td>
49 <td valign="top"><b><%=h value.custom_field.name %>:</b></td><td valign="top"><%= simple_format(h(show_value(value))) %></td>
50 <% n = n + 1
50 <% n = n + 1
51 if (n > 1)
51 if (n > 1)
52 n = 0 %>
52 n = 0 %>
53 </tr><tr>
53 </tr><tr>
54 <%end
54 <%end
55 end %>
55 end %>
56 </tr>
56 </tr>
57 <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
57 <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
58 </table>
58 </table>
59 <hr />
59 <hr />
60
60
61 <div class="contextual">
61 <div class="contextual">
62 <%= link_to_remote_if_authorized(l(:button_quote), { :url => {:action => 'reply', :id => @issue} }, :class => 'icon icon-comment') unless @issue.description.blank? %>
62 <%= link_to_remote_if_authorized(l(:button_quote), { :url => {:action => 'reply', :id => @issue} }, :class => 'icon icon-comment') unless @issue.description.blank? %>
63 </div>
63 </div>
64
64
65 <p><strong><%=l(:field_description)%></strong></p>
65 <p><strong><%=l(:field_description)%></strong></p>
66 <div class="wiki">
66 <div class="wiki">
67 <%= textilizable @issue, :description, :attachments => @issue.attachments %>
67 <%= textilizable @issue, :description, :attachments => @issue.attachments %>
68 </div>
68 </div>
69
69
70 <%= link_to_attachments @issue %>
70 <%= link_to_attachments @issue %>
71
71
72 <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
72 <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
73
73
74 <% if authorize_for('issue_relations', 'new') || @issue.relations.any? %>
74 <% if authorize_for('issue_relations', 'new') || @issue.relations.any? %>
75 <hr />
75 <hr />
76 <div id="relations">
76 <div id="relations">
77 <%= render :partial => 'relations' %>
77 <%= render :partial => 'relations' %>
78 </div>
78 </div>
79 <% end %>
79 <% end %>
80
80
81 <% if User.current.allowed_to?(:add_issue_watchers, @project) ||
81 <% if User.current.allowed_to?(:add_issue_watchers, @project) ||
82 (@issue.watchers.any? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
82 (@issue.watchers.any? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
83 <hr />
83 <hr />
84 <div id="watchers">
84 <div id="watchers">
85 <%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
85 <%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
86 </div>
86 </div>
87 <% end %>
87 <% end %>
88
88
89 </div>
89 </div>
90
90
91 <% if @changesets.any? && User.current.allowed_to?(:view_changesets, @project) %>
91 <% if @changesets.any? && User.current.allowed_to?(:view_changesets, @project) %>
92 <div id="issue-changesets">
92 <div id="issue-changesets">
93 <h3><%=l(:label_associated_revisions)%></h3>
93 <h3><%=l(:label_associated_revisions)%></h3>
94 <%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
94 <%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
95 </div>
95 </div>
96 <% end %>
96 <% end %>
97
97
98 <% if @journals.any? %>
98 <% if @journals.any? %>
99 <div id="history">
99 <div id="history">
100 <h3><%=l(:label_history)%></h3>
100 <h3><%=l(:label_history)%></h3>
101 <%= render :partial => 'history', :locals => { :journals => @journals } %>
101 <%= render :partial => 'history', :locals => { :journals => @journals } %>
102 </div>
102 </div>
103 <% end %>
103 <% end %>
104 <div style="clear: both;"></div>
104 <div style="clear: both;"></div>
105
105
106 <% if authorize_for('issues', 'edit') %>
106 <% if authorize_for('issues', 'edit') %>
107 <div id="update" style="display:none;">
107 <div id="update" style="display:none;">
108 <h3><%= l(:button_update) %></h3>
108 <h3><%= l(:button_update) %></h3>
109 <%= render :partial => 'edit' %>
109 <%= render :partial => 'edit' %>
110 </div>
110 </div>
111 <% end %>
111 <% end %>
112
112
113 <% other_formats_links do |f| %>
113 <% other_formats_links do |f| %>
114 <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
114 <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
115 <%= f.link_to 'PDF' %>
115 <%= f.link_to 'PDF' %>
116 <% end %>
116 <% end %>
117
117
118 <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
118 <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
119
119
120 <% content_for :sidebar do %>
120 <% content_for :sidebar do %>
121 <%= render :partial => 'issues/sidebar' %>
121 <%= render :partial => 'issues/sidebar' %>
122 <% end %>
122 <% end %>
123
123
124 <% content_for :header_tags do %>
124 <% content_for :header_tags do %>
125 <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
125 <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
126 <%= stylesheet_link_tag 'scm' %>
126 <%= stylesheet_link_tag 'scm' %>
127 <% end %>
127 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now