dossier: extract the invitation dropdown to a partial
This commit is contained in:
parent
73ac6f24c3
commit
0995c8e5ad
2 changed files with 11 additions and 10 deletions
10
app/views/invites/_dropdown.html.haml
Normal file
10
app/views/invites/_dropdown.html.haml
Normal file
|
@ -0,0 +1,10 @@
|
|||
%span.button.dropdown.invite-user-action
|
||||
%span.icon.person
|
||||
- if dossier.invites.count > 0
|
||||
Voir les personnes invitées
|
||||
%span.badge= dossier.invites.count
|
||||
- else
|
||||
Inviter une personne à modifier ce dossier
|
||||
|
||||
.dropdown-content.fade-in-down
|
||||
= render partial: "invites/form", locals: { dossier: dossier }
|
|
@ -4,13 +4,4 @@
|
|||
|
||||
.dossier-form-actions
|
||||
- if current_user.owns?(dossier)
|
||||
%span.button.dropdown.invite-user-action
|
||||
%span.icon.person
|
||||
- if dossier.invites.count > 0
|
||||
Voir les personnes invitées
|
||||
%span.badge= dossier.invites.count
|
||||
- else
|
||||
Inviter une personne à modifier ce dossier
|
||||
|
||||
.dropdown-content.fade-in-down
|
||||
= render partial: "invites/form", locals: { dossier: dossier }
|
||||
= render partial: 'invites/dropdown', locals: { dossier: dossier }
|
||||
|
|
Loading…
Reference in a new issue