add bulk edit items and context menu in time entries list view (#7996).

get bulk edit form action working by mapping permissions.

Contributed by Adam Soltys.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5314 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-04-04 11:53:55 +00:00
parent 8a31517288
commit 2029df01ae
1 changed files with 13 additions and 1 deletions

View File

@ -1,6 +1,14 @@
<% form_tag({}) do -%>
<%= hidden_field_tag 'back_url', url_for(params) %>
<table class="list time-entries"> <table class="list time-entries">
<thead> <thead>
<tr> <tr>
<th class="checkbox hide-when-print">
<%= link_to image_tag('toggle_check.png'),
{},
:onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;',
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
</th>
<%= sort_header_tag('spent_on', :caption => l(:label_date), :default_order => 'desc') %> <%= sort_header_tag('spent_on', :caption => l(:label_date), :default_order => 'desc') %>
<%= sort_header_tag('user', :caption => l(:label_member)) %> <%= sort_header_tag('user', :caption => l(:label_member)) %>
<%= sort_header_tag('activity', :caption => l(:label_activity)) %> <%= sort_header_tag('activity', :caption => l(:label_activity)) %>
@ -13,7 +21,8 @@
</thead> </thead>
<tbody> <tbody>
<% entries.each do |entry| -%> <% entries.each do |entry| -%>
<tr class="time-entry <%= cycle("odd", "even") %>"> <tr class="time-entry <%= cycle("odd", "even") %> hascontextmenu">
<td class="checkbox hide-when-print"><%= check_box_tag("ids[]", entry.id, false, :id => nil) %></td>
<td class="spent_on"><%= format_date(entry.spent_on) %></td> <td class="spent_on"><%= format_date(entry.spent_on) %></td>
<td class="user"><%=h entry.user %></td> <td class="user"><%=h entry.user %></td>
<td class="activity"><%=h entry.activity %></td> <td class="activity"><%=h entry.activity %></td>
@ -39,3 +48,6 @@
<% end -%> <% end -%>
</tbody> </tbody>
</table> </table>
<% end -%>
<%= context_menu time_entries_context_menu_path %>