champs: add a "plus" icon to the "Add row" button
This commit is contained in:
parent
906f0fc468
commit
dc1f3b4220
4 changed files with 14 additions and 3 deletions
1
app/assets/images/icons/add.svg
Normal file
1
app/assets/images/icons/add.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="24" height="24"><path d="M18 10.5h-4.5V6a1 1 0 0 0-1-1h-1a1 1 0 0 0-1 1v4.5H6a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h4.5V18a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-4.5H18a1 1 0 0 0 1-1v-1a1 1 0 0 0-1-1z" fill="#333"/></svg>
|
After Width: | Height: | Size: 271 B |
|
@ -79,11 +79,16 @@
|
|||
background-image: image-url("icons/lock.svg");
|
||||
}
|
||||
|
||||
&.add {
|
||||
background-image: image-url("icons/add.svg");
|
||||
margin-left: -5px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
&.justificatif {
|
||||
background-image: image-url("icons/justificatif.svg");
|
||||
}
|
||||
|
||||
|
||||
&.printer {
|
||||
background-image: image-url("icons/printer.svg");
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
%span.icon.bubble
|
||||
%span.icon.attachment
|
||||
%span.icon.lock
|
||||
%span.icon.add
|
||||
%span.icon.justificatif
|
||||
%span.icon.printer
|
||||
%span.icon.account
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
Supprimer
|
||||
|
||||
- if champ.persisted?
|
||||
= link_to "Ajouter une ligne pour « #{champ.libelle} »", champs_repetition_path(form.index), class: 'button add-row', data: { remote: true, method: 'POST', params: { champ_id: champ&.id }.to_query }
|
||||
= link_to champs_repetition_path(form.index), class: 'button add-row', data: { remote: true, method: 'POST', params: { champ_id: champ&.id }.to_query } do
|
||||
%span.icon.add
|
||||
Ajouter une ligne pour « #{champ.libelle} »
|
||||
- else
|
||||
%a.button.add-row Ajouter une ligne pour « #{champ.libelle} »
|
||||
%a.button.add-row
|
||||
%span.icon.add
|
||||
Ajouter une ligne pour « #{champ.libelle} »
|
||||
|
|
Loading…
Reference in a new issue