Browse Source

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
tags/1.2.0
Toshi MARUYAMA 13 years ago
parent
commit
2029df01ae
1 changed files with 13 additions and 1 deletions
  1. 13
    1
      app/views/timelog/_list.rhtml

+ 13
- 1
app/views/timelog/_list.rhtml View File

@@ -1,6 +1,14 @@
<% form_tag({}) do -%>
<%= hidden_field_tag 'back_url', url_for(params) %>
<table class="list time-entries">
<thead>
<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('user', :caption => l(:label_member)) %>
<%= sort_header_tag('activity', :caption => l(:label_activity)) %>
@@ -13,7 +21,8 @@
</thead>
<tbody>
<% 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="user"><%=h entry.user %></td>
<td class="activity"><%=h entry.activity %></td>
@@ -39,3 +48,6 @@
<% end -%>
</tbody>
</table>
<% end -%>

<%= context_menu time_entries_context_menu_path %>

Loading…
Cancel
Save