adapt button icons to bulk action
This commit is contained in:
parent
89730b485b
commit
ff7c1fef65
2 changed files with 8 additions and 1 deletions
|
@ -21,4 +21,11 @@ class Dossiers::BatchOperationComponent < ApplicationComponent
|
|||
end
|
||||
options
|
||||
end
|
||||
|
||||
def icons
|
||||
{
|
||||
archiver: 'fr-icon-folder-2-line',
|
||||
passer_en_instruction: 'fr-icon-edit-line'
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= form_for(BatchOperation.new, url: instructeur_batch_operations_path(procedure_id: procedure.id), method: :post, id: dom_id(BatchOperation.new), html: { class: 'flex justify-end' }, data: { "batch-operation-target" => "form"}) do |form|
|
||||
.flex.align-center
|
||||
- available_operations.each do |opt|
|
||||
= form.button opt[0], class: "fr-btn fr-btn--icon-left fr-icon-folder-2-line", disabled: :disabled, name: "#{form.object_name}[operation]", data: { "batch-operation-target" => "submit", "submitter-operation" => opt[1]}
|
||||
= form.button opt[0], class: ['fr-btn fr-btn--icon-left', icons[opt[1].to_sym]], disabled: :disabled, name: "#{form.object_name}[operation]", data: { "batch-operation-target" => "submit", "submitter-operation" => opt[1]}
|
||||
|
|
Loading…
Reference in a new issue