This commit is contained in:
Kara Diaby 2022-03-22 15:00:26 +01:00
parent 217793c5c8
commit b08011cff7
5 changed files with 42 additions and 11 deletions

View file

@ -53,6 +53,12 @@
}
}
&.no-list {
ul {
list-style: none !important;
}
}
ul {
list-style-type: disc;
list-style-position: inside;

View file

@ -8,7 +8,8 @@
= render(partial: 'users/dossiers/expiration_banner', locals: {dossier: dossier})
.header-actions
- if current_user.owns?(dossier)
- if current_user.owns?(dossier) && !dossier.procedure.discarded? && !dossier.procedure.close?
.header-actions
= render partial: 'invites/dropdown', locals: { dossier: dossier }
- else
= render(partial: 'users/dossiers/procedure_removed_banner', locals: { dossier: dossier })

View file

@ -0,0 +1,22 @@
.card.warning.mb-3.no-list
- if dossier.procedure.discarded?
.flex.justify-between
.card-title= t('users.dossiers.header.banner.procedure_deleted_title')
= render(partial: 'users/dossiers/show/print_dossier', locals: { dossier: dossier}) if !dossier.brouillon?
- if dossier.termine?
%p
= t('users.dossiers.header.banner.procedure_deleted_dossier_termine_content')
- elsif dossier.brouillon?
%p
= t('users.dossiers.header.banner.procedure_close_content')
- else
%p
= t('users.dossiers.header.banner.procedure_deleted_dossier_en_cours_content')
- else
.flex.justify-between
.card-title= t('users.dossiers.header.banner.procedure_close_title')
= render(partial: 'users/dossiers/show/print_dossier', locals: { dossier: dossier }) if !dossier.brouillon?
%p
= t('users.dossiers.header.banner.procedure_close_content')

View file

@ -12,19 +12,15 @@
= render(partial: 'users/dossiers/expiration_banner', locals: {dossier: dossier})
- if current_user.owns?(dossier)
- if (current_user.owns?(dossier) && !dossier.procedure.discarded?) || (!dossier.procedure.discarded? && !dossier.procedure.close? && !dossier.en_construction?)
.header-actions
= render partial: 'invites/dropdown', locals: { dossier: dossier }
- if dossier.can_be_updated_by_user? && !current_page?(modifier_dossier_path(dossier))
= link_to t('views.users.dossiers.show.header.edit_dossier'), modifier_dossier_path(dossier), class: 'button accepted edit-form', 'title'=> "Vous pouvez modifier votre dossier tant qu'il n'est passé en instruction"
%span.dropdown.print-menu-opener
%button.button.dropdown-button.icon-only{ title: t('views.users.dossiers.show.header.print'), 'aria-label': 'imprimer', 'aria-expanded' => 'false', 'aria-controls' => 'print-menu' }
%span.icon.printer
%ul#print-menu.print-menu.dropdown-content
%li
= link_to t('views.users.dossiers.show.header.print_dossier'), dossier_path(dossier, format: :pdf), target: "_blank", rel: "noopener", class: "menu-item menu-link"
= render(partial: 'users/dossiers/show/print_dossier', locals: { dossier: dossier })
- else
= render(partial: 'users/dossiers/procedure_removed_banner', locals: { dossier: dossier })
%nav.tabs
%ul

View file

@ -0,0 +1,6 @@
%span.dropdown.print-menu-opener
%button.button.dropdown-button.icon-only{ title: t('views.users.dossiers.show.header.print'), 'aria-label': 'imprimer', 'aria-expanded' => 'false', 'aria-controls' => 'print-menu' }
%span.icon.printer
%ul#print-menu.print-menu.dropdown-content
%li
= link_to t('views.users.dossiers.show.header.print_dossier'), dossier_path(dossier, format: :pdf), target: "_blank", rel: "noopener", class: "menu-item menu-link"