layout
This commit is contained in:
parent
217793c5c8
commit
b08011cff7
5 changed files with 42 additions and 11 deletions
|
@ -53,6 +53,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
&.no-list {
|
||||
ul {
|
||||
list-style: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: disc;
|
||||
list-style-position: inside;
|
||||
|
|
|
@ -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 })
|
||||
|
|
22
app/views/users/dossiers/_procedure_removed_banner.html.haml
Normal file
22
app/views/users/dossiers/_procedure_removed_banner.html.haml
Normal 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')
|
||||
|
|
@ -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
|
||||
|
|
6
app/views/users/dossiers/show/_print_dossier.html.haml
Normal file
6
app/views/users/dossiers/show/_print_dossier.html.haml
Normal 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"
|
Loading…
Reference in a new issue