##// END OF EJS Templates
Rails3: view: change html special characters to hexadecimal utf-8 strings at issues/show.html.erb...
Toshi MARUYAMA -
r8375:1812e68198cb
parent child
Show More
@@ -1,148 +1,150
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 "&#171; #{l(:label_previous)}", issue_path(@prev_issue_id),
9 "\xc2\xab #{l(:label_previous)}",
10 issue_path(@prev_issue_id),
10 :title => "##{@prev_issue_id}" %> |
11 :title => "##{@prev_issue_id}" %> |
11 <%= link_to_if @next_issue_id,
12 <%= link_to_if @next_issue_id,
12 "#{l(:label_next)} &#187;", issue_path(@next_issue_id),
13 "#{l(:label_next)} \xc2\xbb",
14 issue_path(@next_issue_id),
13 :title => "##{@next_issue_id}" %>
15 :title => "##{@next_issue_id}" %>
14 </div>
16 </div>
15 <% end %>
17 <% end %>
16
18
17 <%= avatar(@issue.author, :size => "50") %>
19 <%= avatar(@issue.author, :size => "50") %>
18
20
19 <div class="subject">
21 <div class="subject">
20 <%= render_issue_subject_with_tree(@issue) %>
22 <%= render_issue_subject_with_tree(@issue) %>
21 </div>
23 </div>
22 <p class="author">
24 <p class="author">
23 <%= authoring @issue.created_on, @issue.author %>.
25 <%= authoring @issue.created_on, @issue.author %>.
24 <% if @issue.created_on != @issue.updated_on %>
26 <% if @issue.created_on != @issue.updated_on %>
25 <%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>.
27 <%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>.
26 <% end %>
28 <% end %>
27 </p>
29 </p>
28
30
29 <table class="attributes">
31 <table class="attributes">
30 <tr>
32 <tr>
31 <th class="status"><%=l(:field_status)%>:</th><td class="status"><%= h(@issue.status.name) %></td>
33 <th class="status"><%=l(:field_status)%>:</th><td class="status"><%= h(@issue.status.name) %></td>
32 <th class="start-date"><%=l(:field_start_date)%>:</th><td class="start-date"><%= format_date(@issue.start_date) %></td>
34 <th class="start-date"><%=l(:field_start_date)%>:</th><td class="start-date"><%= format_date(@issue.start_date) %></td>
33 </tr>
35 </tr>
34 <tr>
36 <tr>
35 <th class="priority"><%=l(:field_priority)%>:</th><td class="priority"><%= h(@issue.priority.name) %></td>
37 <th class="priority"><%=l(:field_priority)%>:</th><td class="priority"><%= h(@issue.priority.name) %></td>
36 <th class="due-date"><%=l(:field_due_date)%>:</th><td class="due-date"><%= format_date(@issue.due_date) %></td>
38 <th class="due-date"><%=l(:field_due_date)%>:</th><td class="due-date"><%= format_date(@issue.due_date) %></td>
37 </tr>
39 </tr>
38 <tr>
40 <tr>
39 <th class="assigned-to"><%=l(:field_assigned_to)%>:</th><td class="assigned-to"><%= avatar(@issue.assigned_to, :size => "14") %><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
41 <th class="assigned-to"><%=l(:field_assigned_to)%>:</th><td class="assigned-to"><%= avatar(@issue.assigned_to, :size => "14") %><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
40 <th class="progress"><%=l(:field_done_ratio)%>:</th><td class="progress"><%= progress_bar @issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%" %></td>
42 <th class="progress"><%=l(:field_done_ratio)%>:</th><td class="progress"><%= progress_bar @issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%" %></td>
41 </tr>
43 </tr>
42 <tr>
44 <tr>
43 <th class="category"><%=l(:field_category)%>:</th><td class="category"><%=h(@issue.category ? @issue.category.name : "-") %></td>
45 <th class="category"><%=l(:field_category)%>:</th><td class="category"><%=h(@issue.category ? @issue.category.name : "-") %></td>
44 <% if User.current.allowed_to?(:view_time_entries, @project) %>
46 <% if User.current.allowed_to?(:view_time_entries, @project) %>
45 <th class="spent-time"><%=l(:label_spent_time)%>:</th>
47 <th class="spent-time"><%=l(:label_spent_time)%>:</th>
46 <td class="spent-time"><%= @issue.total_spent_hours > 0 ? (link_to l_hours(@issue.total_spent_hours), {:controller => 'timelog', :action => 'index', :project_id => @project, :issue_id => @issue}) : "-" %></td>
48 <td class="spent-time"><%= @issue.total_spent_hours > 0 ? (link_to l_hours(@issue.total_spent_hours), {:controller => 'timelog', :action => 'index', :project_id => @project, :issue_id => @issue}) : "-" %></td>
47 <% end %>
49 <% end %>
48 </tr>
50 </tr>
49 <tr>
51 <tr>
50 <th class="fixed-version"><%=l(:field_fixed_version)%>:</th><td class="fixed-version"><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
52 <th class="fixed-version"><%=l(:field_fixed_version)%>:</th><td class="fixed-version"><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
51 <% if @issue.estimated_hours %>
53 <% if @issue.estimated_hours %>
52 <th class="estimated-hours"><%=l(:field_estimated_hours)%>:</th><td class="estimated-hours"><%= l_hours(@issue.estimated_hours) %></td>
54 <th class="estimated-hours"><%=l(:field_estimated_hours)%>:</th><td class="estimated-hours"><%= l_hours(@issue.estimated_hours) %></td>
53 <% end %>
55 <% end %>
54 </tr>
56 </tr>
55 <%= render_custom_fields_rows(@issue) %>
57 <%= render_custom_fields_rows(@issue) %>
56 <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
58 <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
57 </table>
59 </table>
58
60
59 <% if @issue.description? || @issue.attachments.any? -%>
61 <% if @issue.description? || @issue.attachments.any? -%>
60 <hr />
62 <hr />
61 <% if @issue.description? %>
63 <% if @issue.description? %>
62 <div class="contextual">
64 <div class="contextual">
63 <%= link_to_remote_if_authorized(l(:button_quote), { :url => {:controller => 'journals', :action => 'new', :id => @issue} }, :class => 'icon icon-comment') %>
65 <%= link_to_remote_if_authorized(l(:button_quote), { :url => {:controller => 'journals', :action => 'new', :id => @issue} }, :class => 'icon icon-comment') %>
64 </div>
66 </div>
65
67
66 <p><strong><%=l(:field_description)%></strong></p>
68 <p><strong><%=l(:field_description)%></strong></p>
67 <div class="wiki">
69 <div class="wiki">
68 <%= textilizable @issue, :description, :attachments => @issue.attachments %>
70 <%= textilizable @issue, :description, :attachments => @issue.attachments %>
69 </div>
71 </div>
70 <% end %>
72 <% end %>
71 <%= link_to_attachments @issue %>
73 <%= link_to_attachments @issue %>
72 <% end -%>
74 <% end -%>
73
75
74 <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
76 <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
75
77
76 <% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
78 <% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
77 <hr />
79 <hr />
78 <div id="issue_tree">
80 <div id="issue_tree">
79 <div class="contextual">
81 <div class="contextual">
80 <%= link_to(l(:button_add), {:controller => 'issues', :action => 'new', :project_id => @project, :issue => {:parent_issue_id => @issue}}) if User.current.allowed_to?(:manage_subtasks, @project) %>
82 <%= link_to(l(:button_add), {:controller => 'issues', :action => 'new', :project_id => @project, :issue => {:parent_issue_id => @issue}}) if User.current.allowed_to?(:manage_subtasks, @project) %>
81 </div>
83 </div>
82 <p><strong><%=l(:label_subtask_plural)%></strong></p>
84 <p><strong><%=l(:label_subtask_plural)%></strong></p>
83 <%= render_descendants_tree(@issue) unless @issue.leaf? %>
85 <%= render_descendants_tree(@issue) unless @issue.leaf? %>
84 </div>
86 </div>
85 <% end %>
87 <% end %>
86
88
87 <% if @relations.present? || User.current.allowed_to?(:manage_issue_relations, @project) %>
89 <% if @relations.present? || User.current.allowed_to?(:manage_issue_relations, @project) %>
88 <hr />
90 <hr />
89 <div id="relations">
91 <div id="relations">
90 <%= render :partial => 'relations' %>
92 <%= render :partial => 'relations' %>
91 </div>
93 </div>
92 <% end %>
94 <% end %>
93
95
94 </div>
96 </div>
95
97
96 <% if @changesets.present? %>
98 <% if @changesets.present? %>
97 <div id="issue-changesets">
99 <div id="issue-changesets">
98 <h3><%=l(:label_associated_revisions)%></h3>
100 <h3><%=l(:label_associated_revisions)%></h3>
99 <%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
101 <%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
100 </div>
102 </div>
101 <% end %>
103 <% end %>
102
104
103 <% if @journals.present? %>
105 <% if @journals.present? %>
104 <div id="history">
106 <div id="history">
105 <h3><%=l(:label_history)%></h3>
107 <h3><%=l(:label_history)%></h3>
106 <%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
108 <%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
107 </div>
109 </div>
108 <% end %>
110 <% end %>
109
111
110
112
111 <div style="clear: both;"></div>
113 <div style="clear: both;"></div>
112 <%= render :partial => 'action_menu' %>
114 <%= render :partial => 'action_menu' %>
113
115
114 <div style="clear: both;"></div>
116 <div style="clear: both;"></div>
115 <% if authorize_for('issues', 'edit') %>
117 <% if authorize_for('issues', 'edit') %>
116 <div id="update" style="display:none;">
118 <div id="update" style="display:none;">
117 <h3><%= l(:button_update) %></h3>
119 <h3><%= l(:button_update) %></h3>
118 <%= render :partial => 'edit' %>
120 <%= render :partial => 'edit' %>
119 </div>
121 </div>
120 <% end %>
122 <% end %>
121
123
122 <% other_formats_links do |f| %>
124 <% other_formats_links do |f| %>
123 <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
125 <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
124 <%= f.link_to 'PDF' %>
126 <%= f.link_to 'PDF' %>
125 <% end %>
127 <% end %>
126
128
127 <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
129 <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
128
130
129 <% content_for :sidebar do %>
131 <% content_for :sidebar do %>
130 <%= render :partial => 'issues/sidebar' %>
132 <%= render :partial => 'issues/sidebar' %>
131
133
132 <% if User.current.allowed_to?(:add_issue_watchers, @project) ||
134 <% if User.current.allowed_to?(:add_issue_watchers, @project) ||
133 (@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
135 (@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
134 <div id="watchers">
136 <div id="watchers">
135 <%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
137 <%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
136 </div>
138 </div>
137 <% end %>
139 <% end %>
138 <% end %>
140 <% end %>
139
141
140 <% content_for :header_tags do %>
142 <% content_for :header_tags do %>
141 <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
143 <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
142 <%= stylesheet_link_tag 'scm' %>
144 <%= stylesheet_link_tag 'scm' %>
143 <%= javascript_include_tag 'context_menu' %>
145 <%= javascript_include_tag 'context_menu' %>
144 <%= stylesheet_link_tag 'context_menu' %>
146 <%= stylesheet_link_tag 'context_menu' %>
145 <%= stylesheet_link_tag 'context_menu_rtl' if l(:direction) == 'rtl' %>
147 <%= stylesheet_link_tag 'context_menu_rtl' if l(:direction) == 'rtl' %>
146 <% end %>
148 <% end %>
147 <div id="context-menu" style="display: none;"></div>
149 <div id="context-menu" style="display: none;"></div>
148 <%= javascript_tag "new ContextMenu('#{issues_context_menu_path}')" %>
150 <%= javascript_tag "new ContextMenu('#{issues_context_menu_path}')" %>
General Comments 0
You need to be logged in to leave comments. Login now