refactor(views): do not use instance variable in views

This commit is contained in:
Eric Leroy-Terquem 2024-10-11 11:52:30 +02:00
parent 3397beb71d
commit 3b054c5369
No known key found for this signature in database
GPG key ID: 53D8FAECEF207605
10 changed files with 10 additions and 10 deletions

View file

@ -7,7 +7,7 @@
.sub-header .sub-header
= render partial: 'instructeurs/dossiers/header_top', locals: { dossier: } = render partial: 'instructeurs/dossiers/header_top', locals: { dossier: }
= render partial: 'instructeurs/dossiers/header_bottom', locals: { dossier: } = render partial: 'instructeurs/dossiers/header_bottom', locals: { dossier:, gallery_attachments: }
.fr-container .fr-container
.print-header .print-header

View file

@ -7,7 +7,7 @@
instructeur_dossier_path(dossier.procedure, dossier), instructeur_dossier_path(dossier.procedure, dossier),
notification: notifications_summary[:demande]) notification: notifications_summary[:demande])
- if @gallery_attachments.present? - if gallery_attachments.present?
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.attachments'), = dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.attachments'),
pieces_jointes_instructeur_dossier_path(dossier.procedure, dossier), pieces_jointes_instructeur_dossier_path(dossier.procedure, dossier),
notification: notifications_summary[:pieces_jointes]) notification: notifications_summary[:pieces_jointes])

View file

@ -1,6 +1,6 @@
- content_for(:title, "Annotations privées · Dossier nº #{@dossier.id} (#{@dossier.owner_name})") - content_for(:title, "Annotations privées · Dossier nº #{@dossier.id} (#{@dossier.owner_name})")
= render partial: "header", locals: { dossier: @dossier } = render partial: "header", locals: { dossier: @dossier, gallery_attachments: @gallery_attachments }
#dossier-annotations-privees #dossier-annotations-privees
.fr-container .fr-container

View file

@ -1,6 +1,6 @@
- content_for(:title, "Avis · Dossier nº #{@dossier.id} (#{@dossier.owner_name})") - content_for(:title, "Avis · Dossier nº #{@dossier.id} (#{@dossier.owner_name})")
= render partial: "header", locals: { dossier: @dossier } = render partial: "header", locals: { dossier: @dossier, gallery_attachments: @gallery_attachments }
.container .container
.fr-grid-row .fr-grid-row

View file

@ -1,6 +1,6 @@
- content_for(:title, "Avis · Dossier nº #{@dossier.id} (#{@dossier.owner_name})") - content_for(:title, "Avis · Dossier nº #{@dossier.id} (#{@dossier.owner_name})")
= render partial: "header", locals: { dossier: @dossier } = render partial: "header", locals: { dossier: @dossier, gallery_attachments: @gallery_attachments }
.container .container
.fr-grid-row .fr-grid-row

View file

@ -1,5 +1,5 @@
- content_for(:title, "Messagerie · Dossier nº #{@dossier.id} (#{@dossier.owner_name})") - content_for(:title, "Messagerie · Dossier nº #{@dossier.id} (#{@dossier.owner_name})")
= render partial: "header", locals: { dossier: @dossier } = render partial: "header", locals: { dossier: @dossier, gallery_attachments: @gallery_attachments }
= render partial: "shared/dossiers/messagerie", locals: { dossier: @dossier, connected_user: current_instructeur, messagerie_seen_at: @messagerie_seen_at , new_commentaire: @commentaire, form_url: commentaire_instructeur_dossier_path(@dossier.procedure, @dossier) } = render partial: "shared/dossiers/messagerie", locals: { dossier: @dossier, connected_user: current_instructeur, messagerie_seen_at: @messagerie_seen_at , new_commentaire: @commentaire, form_url: commentaire_instructeur_dossier_path(@dossier.procedure, @dossier) }

View file

@ -1,6 +1,6 @@
- content_for(:title, "Personnes impliquées · Dossier nº #{@dossier.id} (#{@dossier.owner_name})") - content_for(:title, "Personnes impliquées · Dossier nº #{@dossier.id} (#{@dossier.owner_name})")
= render partial: "header", locals: { dossier: @dossier } = render partial: "header", locals: { dossier: @dossier, gallery_attachments: @gallery_attachments }
.personnes-impliquees.container .personnes-impliquees.container
= render partial: 'instructeurs/dossiers/envoyer_dossier_block', locals: { dossier: @dossier, potential_recipients: @potential_recipients } = render partial: 'instructeurs/dossiers/envoyer_dossier_block', locals: { dossier: @dossier, potential_recipients: @potential_recipients }

View file

@ -1,6 +1,6 @@
- content_for(:title, "Pièces jointes") - content_for(:title, "Pièces jointes")
= render partial: "header", locals: { dossier: @dossier } = render partial: "header", locals: { dossier: @dossier, gallery_attachments: @gallery_attachments }
.fr-container .fr-container
.gallery.gallery-pieces-jointes{ "data-controller": "lightbox" } .gallery.gallery-pieces-jointes{ "data-controller": "lightbox" }

View file

@ -1,6 +1,6 @@
- content_for(:title, "Réaffectation · Dossier nº #{@dossier.id} (#{@dossier.owner_name})") - content_for(:title, "Réaffectation · Dossier nº #{@dossier.id} (#{@dossier.owner_name})")
= render partial: "header", locals: { dossier: @dossier } = render partial: "header", locals: { dossier: @dossier, gallery_attachments: @gallery_attachments }
.container.groupe-instructeur .container.groupe-instructeur

View file

@ -1,6 +1,6 @@
- content_for(:title, "Demande · Dossier nº #{@dossier.id} (#{@dossier.owner_name})") - content_for(:title, "Demande · Dossier nº #{@dossier.id} (#{@dossier.owner_name})")
= render partial: "header", locals: { dossier: @dossier } = render partial: "header", locals: { dossier: @dossier, gallery_attachments: @gallery_attachments }
- if @dossier.etablissement&.as_degraded_mode? - if @dossier.etablissement&.as_degraded_mode?