@@ -1,47 +1,45 | |||
|
1 | 1 | <ul> |
|
2 | 2 | <% if !@time_entry.nil? -%> |
|
3 | 3 | <li><%= context_menu_link l(:button_edit), {:controller => 'timelog', :action => 'edit', :id => @time_entry}, |
|
4 | 4 | :class => 'icon-edit', :disabled => !@can[:edit] %></li> |
|
5 | 5 | <% else %> |
|
6 | 6 | <li><%= context_menu_link l(:button_edit), {:controller => 'timelog', :action => 'bulk_edit', :ids => @time_entries.collect(&:id)}, |
|
7 | 7 | :class => 'icon-edit', :disabled => !@can[:edit] %></li> |
|
8 | 8 | <% end %> |
|
9 | 9 | |
|
10 | 10 | <%= call_hook(:view_time_entries_context_menu_start, {:time_entries => @time_entries, :can => @can, :back => @back }) %> |
|
11 | 11 | |
|
12 | 12 | <% if @activities.present? -%> |
|
13 | 13 | <li class="folder"> |
|
14 | 14 | <a href="#" class="submenu"><%= l(:field_activity) %></a> |
|
15 | 15 | <ul> |
|
16 | 16 | <% @activities.each do |u| -%> |
|
17 | 17 | <li><%= context_menu_link u.name, {:controller => 'timelog', :action => 'bulk_update', :ids => @time_entries.collect(&:id), :time_entry => {'activity_id' => u}, :back_url => @back}, :method => :post, |
|
18 | 18 | :selected => (@time_entry && u == @time_entry.activity), :disabled => !@can[:edit] %></li> |
|
19 | 19 | <% end -%> |
|
20 | <li><%= context_menu_link l(:label_none), {:controller => 'timelog', :action => 'bulk_update', :ids => @time_entries.collect(&:id), :time_entry => {'activity_id' => 'none'}, :back_url => @back}, :method => :post, | |
|
21 | :selected => (@time_entry && @time_entry.activity.nil?), :disabled => !@can[:edit] %></li> | |
|
22 | 20 | </ul> |
|
23 | 21 | </li> |
|
24 | 22 | <% end %> |
|
25 | 23 | |
|
26 | 24 | <% @options_by_custom_field.each do |field, options| %> |
|
27 | 25 | <li class="folder cf_<%= field.id %>"> |
|
28 | 26 | <a href="#" class="submenu"><%= field.name %></a> |
|
29 | 27 | <ul> |
|
30 | 28 | <% options.each do |text, value| %> |
|
31 | 29 | <li><%= bulk_update_time_entry_custom_field_context_menu_link(field, text, value || text) %></li> |
|
32 | 30 | <% end %> |
|
33 | 31 | <% unless field.is_required? %> |
|
34 | 32 | <li><%= bulk_update_time_entry_custom_field_context_menu_link(field, l(:label_none), '__none__') %></li> |
|
35 | 33 | <% end %> |
|
36 | 34 | </ul> |
|
37 | 35 | </li> |
|
38 | 36 | <% end %> |
|
39 | 37 | |
|
40 | 38 | <%= call_hook(:view_time_entries_context_menu_end, {:time_entries => @time_entries, :can => @can, :back => @back }) %> |
|
41 | 39 | |
|
42 | 40 | <li> |
|
43 | 41 | <%= context_menu_link l(:button_delete), |
|
44 | 42 | {:controller => 'timelog', :action => 'destroy', :ids => @time_entries.collect(&:id), :back_url => @back}, |
|
45 | 43 | :method => :delete, :data => {:confirm => l(:text_time_entries_destroy_confirmation)}, :class => 'icon-del', :disabled => !@can[:delete] %> |
|
46 | 44 | </li> |
|
47 | 45 | </ul> |
General Comments 0
You need to be logged in to leave comments.
Login now