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/table_cell.rb

36 lines
807 B

module CustomActions
class TableCell < ::TableCell
columns :name,
:description,
:sort
def initial_sort
%i[id asc]
end
def sortable?
false
end
def inline_create_link
link_to new_custom_action_path,
aria: { label: t('custom_actions.new') },
class: 'wp-inline-create--add-link',
title: t('custom_actions.new') do
op_icon('icon icon-add')
end
end
def empty_row_message
I18n.t :no_results_title_text
end
def headers
[
['name', { caption: CustomAction.human_attribute_name(:name) }],
['description', { caption: CustomAction.human_attribute_name(:description) }],
['sort', { caption: I18n.t(:label_sort) }]
]
end
end
end