demarches-normaliennes/app/views/invites/_dropdown.html.haml
2022-10-06 17:17:27 +02:00

15 lines
663 B
Text

- invites = dossier.invites.load
.dropdown.invite-user-action{ data: { controller: 'menu-button', popover: 'true' } }
%button.button.dropdown-button{ data: { menu_button_target: 'button' } }
%span.icon.person
- if invites.size > 0
= t('views.invites.dropdown.view_invited_people')
%span.badge= invites.size
- else
- if dossier.read_only?
= t('views.invites.dropdown.invite_to_view')
- else
= t('views.invites.dropdown.invite_to_edit')
#invite-content.dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' } }
= render partial: "invites/form", locals: { dossier: dossier, invites: invites }