demarches-normaliennes/app/views/invites/_dropdown.html.haml
2024-11-04 16:48:11 +01:00

15 lines
743 B
Text

- invites = dossier.invites.load
= render Dropdown::MenuComponent.new(wrapper: :div, wrapper_options: {class: 'invite-user-action'}, button_options: { class: ['fr-btn--secondary'] }, menu_options: { id: 'invite-content' }) do |menu|
= 'lab'
- menu.with_button_inner_html do
= dsfr_icon('fr-icon-user-add-fill', :sm, :mr)
- if invites.present?
= t('views.invites.dropdown.view_invited_people')
%span.fr-badge.fr-ml-1v= invites.size
- else
- if dossier.read_only?
= t('views.invites.dropdown.invite_to_view')
- else
= t('views.invites.dropdown.invite_to_edit')
- menu.with_form do
= render partial: "invites/form", locals: { dossier: dossier, invites: invites, morphing: morphing }