demarches-normaliennes/app/views/invites/_dropdown.html.haml

15 lines
722 B
Text
Raw Normal View History

- invites = dossier.invites.load
= render Dropdown::MenuComponent.new(wrapper: :span, wrapper_options: {class: 'invite-user-action'}, button_options: { class: ['fr-btn--secondary'] }, menu_options: { id: 'invite-content' }) do |menu|
- menu.with_button_inner_html do
2023-11-27 13:56:13 +01:00
= dsfr_icon('fr-icon-user-add-fill', :sm, :mr)
- if invites.present?
2021-04-17 18:49:00 +02:00
= t('views.invites.dropdown.view_invited_people')
%span.badge= invites.size
- else
2019-09-30 17:49:57 +02:00
- if dossier.read_only?
2021-04-17 18:49:00 +02:00
= t('views.invites.dropdown.invite_to_view')
2019-09-30 17:49:57 +02:00
- else
2021-04-17 18:49:00 +02:00
= t('views.invites.dropdown.invite_to_edit')
- menu.with_form do
= render partial: "invites/form", locals: { dossier: dossier, invites: invites, morphing: morphing }