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/cells/custom_actions/row_cell.rb

31 lines
599 B

module CustomActions
class RowCell < ::RowCell
include ::IconsHelper
include ReorderLinksHelper
def action
model
end
def name
link_to h(action.name), edit_custom_action_path(action)
end
def sort
reorder_links('custom_action', { action: 'update', id: action }, method: :put)
end
def button_links
[
edit_link,
delete_link(custom_action_path(action))
]
end
def edit_link
link_to t(:button_edit),
edit_custom_action_path(action),
class: 'icon icon-edit'
end
end
end