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

14 lines
672 B
Text

- 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
%span.icon.person
- if invites.present?
= 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')
- menu.with_form do
= render partial: "invites/form", locals: { dossier: dossier, invites: invites }