fix(turbo): rerender only top part of the header
This commit is contained in:
parent
636e6aa6cb
commit
7076d6d99e
5 changed files with 54 additions and 53 deletions
|
@ -6,49 +6,8 @@
|
|||
pour voir si l'opération est finie.
|
||||
|
||||
.sub-header
|
||||
.container.turbo-header
|
||||
.flex.fr-mb-3w
|
||||
%div
|
||||
%h1.fr-h2.fr-mb-1w
|
||||
= "Dossier nº #{dossier.id}"
|
||||
|
||||
= status_badge(dossier.state, 'super')
|
||||
= link_to dossier.procedure.libelle.truncate_words(10), instructeur_procedure_path(dossier.procedure), title: dossier.procedure.libelle, class: "fr-link"
|
||||
= procedure_badge(dossier.procedure)
|
||||
|
||||
.header-actions.fr-ml-auto
|
||||
= render partial: 'instructeurs/dossiers/header_actions', locals: { dossier: dossier }
|
||||
= render(partial: 'instructeurs/dossiers/print_and_export_actions', locals: {dossier: dossier})
|
||||
|
||||
= render(partial: 'instructeurs/dossiers/expiration_banner', locals: {dossier: dossier})
|
||||
|
||||
- if dossier.user_deleted?
|
||||
%p.fr-mb-1w
|
||||
%small L’usager a supprimé son compte. Vous pouvez archiver puis supprimer le dossier.
|
||||
|
||||
.container
|
||||
%nav.tabs
|
||||
%ul
|
||||
- notifications_summary = current_instructeur.notifications_for_dossier(dossier)
|
||||
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.request'),
|
||||
instructeur_dossier_path(dossier.procedure, dossier),
|
||||
notification: notifications_summary[:demande])
|
||||
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.private_annotations'),
|
||||
annotations_privees_instructeur_dossier_path(dossier.procedure, dossier),
|
||||
notification: notifications_summary[:annotations_privees])
|
||||
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.external_opinion'),
|
||||
avis_instructeur_dossier_path(dossier.procedure, dossier),
|
||||
notification: notifications_summary[:avis])
|
||||
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.messaging'),
|
||||
messagerie_instructeur_dossier_path(dossier.procedure, dossier),
|
||||
notification: notifications_summary[:messagerie])
|
||||
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.involved_persons'),
|
||||
personnes_impliquees_instructeur_dossier_path(dossier.procedure, dossier))
|
||||
= render partial: 'instructeurs/dossiers/header_top', locals: { dossier: }
|
||||
= render partial: 'instructeurs/dossiers/header_bottom', locals: { dossier: }
|
||||
|
||||
.container
|
||||
.print-header
|
||||
|
|
23
app/views/instructeurs/dossiers/_header_bottom.html.haml
Normal file
23
app/views/instructeurs/dossiers/_header_bottom.html.haml
Normal file
|
@ -0,0 +1,23 @@
|
|||
#header-bottom.container
|
||||
%nav.tabs
|
||||
%ul
|
||||
- notifications_summary = current_instructeur.notifications_for_dossier(dossier)
|
||||
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.request'),
|
||||
instructeur_dossier_path(dossier.procedure, dossier),
|
||||
notification: notifications_summary[:demande])
|
||||
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.private_annotations'),
|
||||
annotations_privees_instructeur_dossier_path(dossier.procedure, dossier),
|
||||
notification: notifications_summary[:annotations_privees])
|
||||
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.external_opinion'),
|
||||
avis_instructeur_dossier_path(dossier.procedure, dossier),
|
||||
notification: notifications_summary[:avis])
|
||||
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.messaging'),
|
||||
messagerie_instructeur_dossier_path(dossier.procedure, dossier),
|
||||
notification: notifications_summary[:messagerie])
|
||||
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.involved_persons'),
|
||||
personnes_impliquees_instructeur_dossier_path(dossier.procedure, dossier))
|
19
app/views/instructeurs/dossiers/_header_top.html.haml
Normal file
19
app/views/instructeurs/dossiers/_header_top.html.haml
Normal file
|
@ -0,0 +1,19 @@
|
|||
#header-top.container
|
||||
.flex.fr-mb-3w
|
||||
%div
|
||||
%h1.fr-h2.fr-mb-1w
|
||||
= "Dossier nº #{dossier.id}"
|
||||
|
||||
= status_badge(dossier.state, 'super')
|
||||
= link_to dossier.procedure.libelle.truncate_words(10), instructeur_procedure_path(dossier.procedure), title: dossier.procedure.libelle, class: "fr-link"
|
||||
= procedure_badge(dossier.procedure)
|
||||
|
||||
.header-actions.fr-ml-auto
|
||||
= render partial: 'instructeurs/dossiers/header_actions', locals: { dossier: }
|
||||
= render partial: 'instructeurs/dossiers/print_and_export_actions', locals: { dossier: }
|
||||
|
||||
= render partial: 'instructeurs/dossiers/expiration_banner', locals: { dossier: }
|
||||
|
||||
- if dossier.user_deleted?
|
||||
%p.fr-mb-1w
|
||||
%small L’usager a supprimé son compte. Vous pouvez archiver puis supprimer le dossier.
|
|
@ -1 +1 @@
|
|||
= turbo_stream.update_all '.turbo-header', partial: 'header', locals: { dossier: @dossier }
|
||||
= turbo_stream.replace 'header-top', partial: 'header_top', locals: { dossier: @dossier }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue