diff --git a/app/views/instructeurs/procedures/show.html.haml b/app/views/instructeurs/procedures/show.html.haml index 30893d513..ba85ed00e 100644 --- a/app/views/instructeurs/procedures/show.html.haml +++ b/app/views/instructeurs/procedures/show.html.haml @@ -143,7 +143,7 @@ %td.status-col = link_to(instructeur_dossier_path(@procedure, dossier), class: 'cell-link') do - = render partial: 'shared/dossiers/status_badge', locals: { dossier: dossier } + = status_badge(dossier.state) %td.action-col.follow-col= render partial: 'dossier_actions', locals: { procedure: @procedure, dossier: dossier, dossier_is_followed: @followed_dossiers_id.include?(dossier.id) } = paginate @dossiers - else diff --git a/app/views/instructeurs/recherche/index.html.haml b/app/views/instructeurs/recherche/index.html.haml index 635895a60..612e1a616 100644 --- a/app/views/instructeurs/recherche/index.html.haml +++ b/app/views/instructeurs/recherche/index.html.haml @@ -30,7 +30,7 @@ %td= link_to(dossier.user.email, dossier_linked_path(current_instructeur, dossier), class: 'cell-link') %td.status-col = link_to(dossier_linked_path(current_instructeur, dossier), class: 'cell-link') do - = render partial: 'shared/dossiers/status_badge', locals: { dossier: dossier } + = status_badge(dossier.state) %td.action-col.follow-col= render partial: 'instructeurs/procedures/dossier_actions', locals: { procedure: dossier.procedure, dossier: dossier, dossier_is_followed: @followed_dossiers_id.include?(dossier.id) } - else %h2 Aucun dossier correspondant à votre recherche n'a été trouvé diff --git a/app/views/shared/dossiers/_status_badge.html.haml b/app/views/shared/dossiers/_status_badge.html.haml deleted file mode 100644 index 775a93b0f..000000000 --- a/app/views/shared/dossiers/_status_badge.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -- if dossier.brouillon? - %span.label.brouillon brouillon -- elsif dossier.en_construction? - %span.label.construction en construction -- elsif dossier.en_instruction? - %span.label.instruction en instruction -- elsif dossier.accepte? - %span.label.accepted accepté -- elsif dossier.refuse? - %span.label.refused refusé -- elsif dossier.sans_suite? - %span.label.without-continuation sans suite diff --git a/app/views/users/dossiers/index.html.haml b/app/views/users/dossiers/index.html.haml index fc4f1d4ab..b6e169488 100644 --- a/app/views/users/dossiers/index.html.haml +++ b/app/views/users/dossiers/index.html.haml @@ -44,7 +44,7 @@ = procedure_libelle(dossier.procedure) %td.status-col = link_to(url_for_dossier(dossier), class: 'cell-link') do - = render partial: 'shared/dossiers/status_badge', locals: { dossier: dossier } + = status_badge(dossier.state) %td.updated-at-col = link_to(url_for_dossier(dossier), class: 'cell-link') do = try_format_date(dossier.updated_at) diff --git a/app/views/users/dossiers/show/_header.html.haml b/app/views/users/dossiers/show/_header.html.haml index 607964cfd..8948086d2 100644 --- a/app/views/users/dossiers/show/_header.html.haml +++ b/app/views/users/dossiers/show/_header.html.haml @@ -1,6 +1,6 @@ .sub-header .container - = render partial: 'shared/dossiers/status_badge', locals: { dossier: dossier } + = status_badge(dossier.state) .title-container %span.icon.folder