14 lines
722 B
Text
14 lines
722 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
|
|
= dsfr_icon('fr-icon-user-add-fill', :sm, :mr)
|
|
- 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, morphing: morphing }
|