annotate app/views/context_menus/time_entries.html.erb @ 849:7018aa84e3a8 feature_36

Close obsolete branch feature_36
author Chris Cannam
date Sat, 24 Sep 2011 18:15:01 +0100
parents cbce1fd3b1b7
children cbb26bc654de
rev   line source
Chris@441 1 <ul>
Chris@441 2 <% if !@time_entry.nil? -%>
Chris@441 3 <li><%= context_menu_link l(:button_edit), {:controller => 'timelog', :action => 'edit', :id => @time_entry},
Chris@441 4 :class => 'icon-edit', :disabled => !@can[:edit] %></li>
Chris@441 5 <% else %>
Chris@441 6 <li><%= context_menu_link l(:button_edit), {:controller => 'timelog', :action => 'bulk_edit', :ids => @time_entries.collect(&:id)},
Chris@441 7 :class => 'icon-edit', :disabled => !@can[:edit] %></li>
Chris@441 8 <% end %>
Chris@441 9
Chris@441 10 <%= call_hook(:view_time_entries_context_menu_start, {:time_entries => @time_entries, :can => @can, :back => @back }) %>
Chris@441 11
Chris@441 12 <% if @activities.present? -%>
Chris@441 13 <li class="folder">
Chris@441 14 <a href="#" class="submenu"><%= l(:field_activity) %></a>
Chris@441 15 <ul>
Chris@441 16 <% @activities.each do |u| -%>
Chris@441 17 <li><%= context_menu_link u.name, {:controller => 'timelog', :action => 'bulk_edit', :ids => @time_entries.collect(&:id), :time_entry => {'activity_id' => u}, :back_url => @back}, :method => :post,
Chris@441 18 :selected => (@time_entry && u == @time_entry.activity), :disabled => !@can[:update] %></li>
Chris@441 19 <% end -%>
Chris@441 20 <li><%= context_menu_link l(:label_nobody), {:controller => 'timelog', :action => 'bulk_edit', :ids => @time_entries.collect(&:id), :time_entry => {'activity_id' => 'none'}, :back_url => @back}, :method => :post,
Chris@441 21 :selected => (@time_entry && @time_entry.activity.nil?), :disabled => !@can[:update] %></li>
Chris@441 22 </ul>
Chris@441 23 </li>
Chris@441 24 <% end %>
Chris@441 25
Chris@441 26 <%= call_hook(:view_time_entries_context_menu_end, {:time_entries => @time_entries, :can => @can, :back => @back }) %>
Chris@441 27
Chris@441 28 <li>
Chris@441 29 <%= context_menu_link l(:button_delete),
Chris@441 30 {:controller => 'timelog', :action => 'destroy', :ids => @time_entries.collect(&:id), :back_url => @back},
Chris@441 31 :method => :delete, :confirm => l(:text_time_entries_destroy_confirmation), :class => 'icon-del', :disabled => !@can[:delete] %>
Chris@441 32 </li>
Chris@441 33 </ul>