|
|
@ -12,6 +12,7 @@ Trestle.resource(:users) do |
|
|
# Customize the table columns shown on the index view. |
|
|
# Customize the table columns shown on the index view. |
|
|
table do |
|
|
table do |
|
|
column :name |
|
|
column :name |
|
|
|
|
|
column :label |
|
|
column :created_at, align: :center |
|
|
column :created_at, align: :center |
|
|
actions do |toolbar, instance, admin| |
|
|
actions do |toolbar, instance, admin| |
|
|
toolbar.edit if admin && admin.actions.include?(:edit) |
|
|
toolbar.edit if admin && admin.actions.include?(:edit) |
|
|
@ -19,6 +20,7 @@ Trestle.resource(:users) do |
|
|
toolbar.link 'CV', instance, action: :generate, method: :get, style: :primary, icon: "fa fa-file-pdf", target: "_blank" |
|
|
toolbar.link 'CV', instance, action: :generate, method: :get, style: :primary, icon: "fa fa-file-pdf", target: "_blank" |
|
|
toolbar.link 'CLS', instance, action: :generate_cls, method: :get, style: :secondary, icon: "fa", target: "_blank" |
|
|
toolbar.link 'CLS', instance, action: :generate_cls, method: :get, style: :secondary, icon: "fa", target: "_blank" |
|
|
toolbar.link 'JSON', instance, action: :generate_json, method: :get, style: :secondary, icon: "fa", target: "_blank" |
|
|
toolbar.link 'JSON', instance, action: :generate_json, method: :get, style: :secondary, icon: "fa", target: "_blank" |
|
|
|
|
|
# TODO: Add a new action to clone the user and all its associations passing a "cloned" label to the new user. |
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
|