OpenProject is the leading open source project management software.
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.
openproject/app/views/work_packages/_action_menu.html.erb

42 lines
2.6 KiB

<%#-- copyright
OpenProject is a project management system.
Copyright (C) 2012-2013 the OpenProject Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 3.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% content_for :action_menu_main do %>
<%= li_unless_nil(link_to_if_authorized(l(:button_update), { :controller => '/work_packages',
:action => 'edit',
:id => work_package.id },
:class => 'edit icon icon-edit',
:accesskey => accesskey(:edit))) %>
<%= li_unless_nil(watcher_link(work_package,
User.current,
{ :class => 'watcher_link',
:replace => User.current.allowed_to?(:view_work_package_watchers, @project) ? ['#watchers', '.watcher_link'] : ['.watcher_link'] })) %>
<% end %>
<% content_for :action_menu_more do %>
<%= li_unless_nil(link_to_if_authorized l(:button_log_time), {:controller => '/timelog', :action => 'new', :work_package_id => controller.work_package}, :class => 'icon icon-time-add') %>
11 years ago
<%= li_unless_nil(link_to_if_authorized l(:button_duplicate), {:controller => '/work_packages', :action => 'new', :project_id => @project, :copy_from => work_package }, :class => 'icon icon-duplicate') %>
<%= li_unless_nil(link_to_if_authorized l(:button_copy), {:controller => '/work_packages/moves', :action => 'new', :work_package_id => controller.work_package, :copy => ''}, :class => 'icon icon-copy') %>
<%= li_unless_nil(link_to_if_authorized l(:button_move), {:controller => '/work_packages/moves', :action => 'new', :work_package_id => controller.work_package}, :class => 'icon icon-move') %>
<%= li_unless_nil(link_to_if_authorized l(:button_delete),
{ :controller => '/work_packages',
:action => 'destroy',
:id => controller.work_package,
:todo => 'destroy' },
:confirm => (controller.work_package.leaf? ? l(:text_are_you_sure) : l(:text_are_you_sure_with_children)),
:method => :delete ,
:class => 'icon icon-del' ) %>
<%= call_hook(:view_work_package_show_action_menu, :work_package => controller.work_package) %>
<% end %>