##// END OF EJS Templates
HTML escape at app/views/timelog/_list.rhtml....
Toshi MARUYAMA -
r6265:b921cb3cb441
parent child
Show More
@@ -1,53 +1,53
1 <% form_tag({}) do -%>
1 <% form_tag({}) do -%>
2 <%= hidden_field_tag 'back_url', url_for(params) %>
2 <%= hidden_field_tag 'back_url', url_for(params) %>
3 <table class="list time-entries">
3 <table class="list time-entries">
4 <thead>
4 <thead>
5 <tr>
5 <tr>
6 <th class="checkbox hide-when-print">
6 <th class="checkbox hide-when-print">
7 <%= link_to image_tag('toggle_check.png'),
7 <%= link_to image_tag('toggle_check.png'),
8 {},
8 {},
9 :onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;',
9 :onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;',
10 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
10 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
11 </th>
11 </th>
12 <%= sort_header_tag('spent_on', :caption => l(:label_date), :default_order => 'desc') %>
12 <%= sort_header_tag('spent_on', :caption => l(:label_date), :default_order => 'desc') %>
13 <%= sort_header_tag('user', :caption => l(:label_member)) %>
13 <%= sort_header_tag('user', :caption => l(:label_member)) %>
14 <%= sort_header_tag('activity', :caption => l(:label_activity)) %>
14 <%= sort_header_tag('activity', :caption => l(:label_activity)) %>
15 <%= sort_header_tag('project', :caption => l(:label_project)) %>
15 <%= sort_header_tag('project', :caption => l(:label_project)) %>
16 <%= sort_header_tag('issue', :caption => l(:label_issue), :default_order => 'desc') %>
16 <%= sort_header_tag('issue', :caption => l(:label_issue), :default_order => 'desc') %>
17 <th><%= l(:field_comments) %></th>
17 <th><%= l(:field_comments) %></th>
18 <%= sort_header_tag('hours', :caption => l(:field_hours)) %>
18 <%= sort_header_tag('hours', :caption => l(:field_hours)) %>
19 <th></th>
19 <th></th>
20 </tr>
20 </tr>
21 </thead>
21 </thead>
22 <tbody>
22 <tbody>
23 <% entries.each do |entry| -%>
23 <% entries.each do |entry| -%>
24 <tr class="time-entry <%= cycle("odd", "even") %> hascontextmenu">
24 <tr class="time-entry <%= cycle("odd", "even") %> hascontextmenu">
25 <td class="checkbox hide-when-print"><%= check_box_tag("ids[]", entry.id, false, :id => nil) %></td>
25 <td class="checkbox hide-when-print"><%= check_box_tag("ids[]", entry.id, false, :id => nil) %></td>
26 <td class="spent_on"><%= format_date(entry.spent_on) %></td>
26 <td class="spent_on"><%= format_date(entry.spent_on) %></td>
27 <td class="user"><%=h entry.user %></td>
27 <td class="user"><%= link_to_user(entry.user) %></td>
28 <td class="activity"><%=h entry.activity %></td>
28 <td class="activity"><%=h entry.activity %></td>
29 <td class="project"><%=h entry.project %></td>
29 <td class="project"><%= link_to_project(entry.project) %></td>
30 <td class="subject">
30 <td class="subject">
31 <% if entry.issue -%>
31 <% if entry.issue -%>
32 <%= entry.issue.visible? ? link_to_issue(entry.issue, :truncate => 50) : "##{entry.issue.id}" -%>
32 <%= entry.issue.visible? ? link_to_issue(entry.issue, :truncate => 50) : "##{entry.issue.id}" -%>
33 <% end -%>
33 <% end -%>
34 </td>
34 </td>
35 <td class="comments"><%=h entry.comments %></td>
35 <td class="comments"><%=h entry.comments %></td>
36 <td class="hours"><%= html_hours("%.2f" % entry.hours) %></td>
36 <td class="hours"><%= html_hours("%.2f" % entry.hours) %></td>
37 <td align="center">
37 <td align="center">
38 <% if entry.editable_by?(User.current) -%>
38 <% if entry.editable_by?(User.current) -%>
39 <%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry, :project_id => nil},
39 <%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry, :project_id => nil},
40 :title => l(:button_edit) %>
40 :title => l(:button_edit) %>
41 <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry, :project_id => nil},
41 <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry, :project_id => nil},
42 :confirm => l(:text_are_you_sure),
42 :confirm => l(:text_are_you_sure),
43 :method => :delete,
43 :method => :delete,
44 :title => l(:button_delete) %>
44 :title => l(:button_delete) %>
45 <% end -%>
45 <% end -%>
46 </td>
46 </td>
47 </tr>
47 </tr>
48 <% end -%>
48 <% end -%>
49 </tbody>
49 </tbody>
50 </table>
50 </table>
51 <% end -%>
51 <% end -%>
52
52
53 <%= context_menu time_entries_context_menu_path %>
53 <%= context_menu time_entries_context_menu_path %>
General Comments 0
You need to be logged in to leave comments. Login now