2022-10-05 11:24:49 +02:00
|
|
|
- invites = dossier.invites.load
|
2023-01-06 15:45:18 +01:00
|
|
|
= 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)
|
2022-11-23 18:40:49 +01:00
|
|
|
- if invites.present?
|
2021-04-17 18:49:00 +02:00
|
|
|
= t('views.invites.dropdown.view_invited_people')
|
2022-10-05 11:24:49 +02:00
|
|
|
%span.badge= invites.size
|
2018-09-11 17:51:44 +02:00
|
|
|
- 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')
|
2023-01-06 15:45:18 +01:00
|
|
|
- menu.with_form do
|
2022-12-28 16:47:52 +01:00
|
|
|
= render partial: "invites/form", locals: { dossier: dossier, invites: invites, morphing: morphing }
|