You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

time_entries.html.erb 1.8KB

123456789101112131415161718192021222324252627282930313233
  1. <ul>
  2. <% if !@time_entry.nil? -%>
  3. <li><%= context_menu_link l(:button_edit), {:controller => 'timelog', :action => 'edit', :id => @time_entry},
  4. :class => 'icon-edit', :disabled => !@can[:edit] %></li>
  5. <% else %>
  6. <li><%= context_menu_link l(:button_edit), {:controller => 'timelog', :action => 'bulk_edit', :ids => @time_entries.collect(&:id)},
  7. :class => 'icon-edit', :disabled => !@can[:edit] %></li>
  8. <% end %>
  9. <%= call_hook(:view_time_entries_context_menu_start, {:time_entries => @time_entries, :can => @can, :back => @back }) %>
  10. <% if @activities.present? -%>
  11. <li class="folder">
  12. <a href="#" class="submenu"><%= l(:field_activity) %></a>
  13. <ul>
  14. <% @activities.each do |u| -%>
  15. <li><%= context_menu_link h(u.name), {:controller => 'timelog', :action => 'bulk_edit', :ids => @time_entries.collect(&:id), :time_entry => {'activity_id' => u}, :back_url => @back}, :method => :post,
  16. :selected => (@time_entry && u == @time_entry.activity), :disabled => !@can[:update] %></li>
  17. <% end -%>
  18. <li><%= context_menu_link l(:label_none), {:controller => 'timelog', :action => 'bulk_edit', :ids => @time_entries.collect(&:id), :time_entry => {'activity_id' => 'none'}, :back_url => @back}, :method => :post,
  19. :selected => (@time_entry && @time_entry.activity.nil?), :disabled => !@can[:update] %></li>
  20. </ul>
  21. </li>
  22. <% end %>
  23. <%= call_hook(:view_time_entries_context_menu_end, {:time_entries => @time_entries, :can => @can, :back => @back }) %>
  24. <li>
  25. <%= context_menu_link l(:button_delete),
  26. {:controller => 'timelog', :action => 'destroy', :ids => @time_entries.collect(&:id), :back_url => @back},
  27. :method => :delete, :confirm => l(:text_time_entries_destroy_confirmation), :class => 'icon-del', :disabled => !@can[:delete] %>
  28. </li>
  29. </ul>