2017-11-17 23:40:51 +01:00
|
|
|
- content_for(:title, "#{@procedure.libelle}")
|
|
|
|
|
2017-07-11 16:09:03 +02:00
|
|
|
#procedure-show
|
2018-04-23 17:22:20 +02:00
|
|
|
.sub-header
|
2017-07-18 15:12:55 +02:00
|
|
|
.container.flex
|
2017-07-11 16:09:03 +02:00
|
|
|
|
2019-08-28 13:11:58 +02:00
|
|
|
.procedure-logo{ style: "background-image: url(#{@procedure.logo_url})",
|
2018-09-05 14:48:42 +02:00
|
|
|
role: 'img', 'aria-label': "logo de la démarche #{@procedure.libelle}" }
|
2017-09-14 10:11:45 +02:00
|
|
|
|
2021-12-03 16:21:41 +01:00
|
|
|
= render partial: 'header', locals: { procedure: @procedure, statut: @statut }
|
|
|
|
|
|
|
|
.procedure-actions
|
2022-05-17 17:54:41 +02:00
|
|
|
- if @can_download_dossiers
|
|
|
|
= render Dossiers::ExportComponent.new(procedure: @procedure, exports: @exports)
|
2022-03-11 13:57:53 +01:00
|
|
|
|
2021-12-03 16:21:41 +01:00
|
|
|
.container.flex= render partial: "tabs", locals: { procedure: @procedure,
|
2021-09-23 15:03:20 +02:00
|
|
|
statut: @statut,
|
2022-03-31 18:28:12 +02:00
|
|
|
a_suivre_count: @counts[:a_suivre],
|
|
|
|
suivis_count: @counts[:suivis],
|
|
|
|
traites_count: @counts[:traites],
|
|
|
|
tous_count: @counts[:tous],
|
|
|
|
supprimes_recemment_count: @counts[:supprimes_recemment],
|
|
|
|
archives_count: @counts[:archives],
|
|
|
|
expirant_count: @counts[:expirant],
|
2021-09-23 15:03:20 +02:00
|
|
|
has_en_cours_notifications: @has_en_cours_notifications,
|
|
|
|
has_termine_notifications: @has_termine_notifications }
|
2017-07-11 15:40:09 +02:00
|
|
|
|
|
|
|
.container
|
2019-07-11 10:58:40 +02:00
|
|
|
- if @statut == 'a-suivre'
|
2022-04-13 15:44:29 +02:00
|
|
|
%p.explication-onglet
|
|
|
|
= t('views.instructeurs.dossiers.tab_explainations.a_suivre')
|
2019-07-11 10:58:40 +02:00
|
|
|
- if @statut == 'suivis'
|
2022-04-13 15:44:29 +02:00
|
|
|
%p.explication-onglet
|
|
|
|
= t('views.instructeurs.dossiers.tab_explainations.suivis')
|
2019-07-11 10:58:40 +02:00
|
|
|
- if @statut == 'traites'
|
2022-04-13 15:44:29 +02:00
|
|
|
%p.explication-onglet
|
2022-05-06 19:25:12 +02:00
|
|
|
= t('views.instructeurs.dossiers.tab_explainations.traites_html', archives_path: instructeur_archives_path(@procedure))
|
2019-07-11 10:58:40 +02:00
|
|
|
- if @statut == 'tous'
|
2022-04-13 15:44:29 +02:00
|
|
|
%p.explication-onglet
|
|
|
|
= t('views.instructeurs.dossiers.tab_explainations.tous')
|
2022-01-27 17:02:02 +01:00
|
|
|
- if @statut == 'supprimes_recemment'
|
2022-04-13 15:44:29 +02:00
|
|
|
%p.explication-onglet
|
|
|
|
= t('views.instructeurs.dossiers.tab_explainations.supprimes_recemment')
|
2019-07-11 10:58:40 +02:00
|
|
|
- if @statut == 'archives'
|
2020-05-11 16:21:55 +02:00
|
|
|
%p.explication-onglet
|
2022-04-13 15:44:29 +02:00
|
|
|
= t('views.instructeurs.dossiers.tab_explainations.archives')
|
2020-05-11 16:21:55 +02:00
|
|
|
%br
|
|
|
|
Ces dossiers seront supprimés lorsque leur délai de conservation dans Démarches-simplifiées
|
|
|
|
- if @procedure.duree_conservation_dossiers_dans_ds
|
|
|
|
= "(#{@procedure.duree_conservation_dossiers_dans_ds} mois)"
|
|
|
|
sera expiré.
|
|
|
|
= link_to 'En savoir plus', ARCHIVAGE_DOC_URL
|
2020-03-20 17:59:16 +01:00
|
|
|
.afficher-dossiers-supprimes
|
|
|
|
= link_to deleted_dossiers_instructeur_procedure_path(@procedure) do
|
|
|
|
%span.icon.delete
|
|
|
|
Afficher les dossiers supprimés
|
2021-12-01 17:39:47 +01:00
|
|
|
- if @statut == 'expirant'
|
2022-04-13 15:44:29 +02:00
|
|
|
%p.explication-onglet
|
|
|
|
= t('views.instructeurs.dossiers.tab_explainations.expirant')
|
2021-04-25 21:29:31 +02:00
|
|
|
- if @filtered_sorted_paginated_ids.present? || @current_filters.count > 0
|
2021-04-25 21:32:22 +02:00
|
|
|
- pagination = paginate @filtered_sorted_paginated_ids
|
|
|
|
= pagination
|
2022-04-05 15:57:19 +02:00
|
|
|
.flex
|
|
|
|
.flex-grow
|
2022-06-14 07:46:12 +02:00
|
|
|
= render partial: "dossiers_filter", locals: { procedure: @procedure, procedure_presentation: @procedure_presentation, current_filters: @current_filters, statut: @statut, filterable_fields_for_select: @filterable_fields_for_select }
|
2022-04-06 17:08:22 +02:00
|
|
|
- if @dossiers_count > 0
|
|
|
|
.dossiers-export
|
2022-05-06 12:24:01 +02:00
|
|
|
= render Dossiers::ExportComponent.new(procedure: @procedure, exports: @exports, statut: @statut, count: @dossiers_count)
|
2017-09-28 11:04:18 +02:00
|
|
|
|
2017-07-31 15:01:26 +02:00
|
|
|
%table.table.dossiers-table.hoverable
|
|
|
|
%thead
|
2017-07-11 15:40:09 +02:00
|
|
|
%tr
|
2019-09-23 15:36:27 +02:00
|
|
|
- if @statut.in? %w(suivis traites tous)
|
2017-11-01 20:40:33 +01:00
|
|
|
= render partial: "header_field", locals: { field: { "label" => "●", "table" => "notifications", "column" => "notifications" }, classname: "notification-col" }
|
|
|
|
- else
|
|
|
|
%th.notification-col
|
|
|
|
|
2022-04-14 10:30:23 +02:00
|
|
|
- @procedure_presentation.displayed_fields_for_headers.each do |field|
|
|
|
|
= render partial: "header_field", locals: { field: field, classname: field['classname'] }
|
2017-10-02 17:03:38 +02:00
|
|
|
|
2019-01-16 15:34:38 +01:00
|
|
|
%th.action-col.follow-col
|
2022-05-11 16:08:48 +02:00
|
|
|
%span.dropdown{ data: { controller: 'menu-button', popover: 'true' } }
|
|
|
|
%button.button.dropdown-button{ data: { menu_button_target: 'button' } }
|
2022-04-13 15:44:29 +02:00
|
|
|
= t('views.instructeurs.dossiers.personalize')
|
2022-05-11 16:08:48 +02:00
|
|
|
#custom-menu.dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' } }
|
2021-04-23 13:45:04 +02:00
|
|
|
= form_tag update_displayed_fields_instructeur_procedure_path(@procedure), method: :patch, class: 'dropdown-form large columns-form' do
|
2022-01-05 11:42:33 +01:00
|
|
|
= hidden_field_tag :values, nil
|
|
|
|
= react_component("ComboMultiple",
|
2022-06-14 07:46:12 +02:00
|
|
|
options: @displayable_fields_for_select,
|
|
|
|
selected: @displayable_fields_selected,
|
2022-01-05 11:42:33 +01:00
|
|
|
disabled: [],
|
|
|
|
label: 'Colonne à afficher',
|
|
|
|
group: '.columns-form',
|
|
|
|
name: 'values')
|
2021-02-11 15:32:00 +01:00
|
|
|
|
2022-04-13 15:44:29 +02:00
|
|
|
= submit_tag t('views.instructeurs.dossiers.save'), class: 'button'
|
2017-10-02 17:03:38 +02:00
|
|
|
|
2017-07-31 15:01:26 +02:00
|
|
|
%tbody
|
2021-04-21 12:03:15 +02:00
|
|
|
- @projected_dossiers.each do |p|
|
2021-04-26 10:35:22 +02:00
|
|
|
- path = instructeur_dossier_path(@procedure, p.dossier_id)
|
2021-11-24 10:35:34 +01:00
|
|
|
%tr{ class: [p.hidden_by_user_at.present? && "file-hidden-by-user"] }
|
2017-11-01 20:40:33 +01:00
|
|
|
%td.folder-col
|
2022-03-11 13:57:53 +01:00
|
|
|
- if p.hidden_by_administration_at.present?
|
|
|
|
%span.cell-link
|
|
|
|
%span.icon.folder
|
|
|
|
- else
|
|
|
|
%a.cell-link{ href: path }
|
|
|
|
%span.icon.folder
|
|
|
|
- if @not_archived_notifications_dossier_ids.include?(p.dossier_id)
|
|
|
|
%span.notifications{ 'aria-label': 'notifications' }
|
2017-11-01 20:40:33 +01:00
|
|
|
|
2017-07-31 15:01:26 +02:00
|
|
|
%td.number-col
|
2022-03-11 13:57:53 +01:00
|
|
|
- if p.hidden_by_administration_at.present?
|
|
|
|
%span.cell-link= p.dossier_id
|
|
|
|
- else
|
|
|
|
%a.cell-link{ href: path }= p.dossier_id
|
2017-10-02 17:03:38 +02:00
|
|
|
|
2021-04-21 12:03:15 +02:00
|
|
|
- p.columns.each do |column|
|
2017-10-02 17:03:38 +02:00
|
|
|
%td
|
2022-03-11 13:57:53 +01:00
|
|
|
- if p.hidden_by_administration_at.present?
|
|
|
|
%span.cell-link
|
|
|
|
= column
|
|
|
|
= "- #{t('views.instructeurs.dossiers.deleted_by_user')}" if p.hidden_by_user_at.present?
|
|
|
|
- else
|
|
|
|
%a.cell-link{ href: path }
|
|
|
|
= column
|
|
|
|
= "- #{t('views.instructeurs.dossiers.deleted_by_user')}" if p.hidden_by_user_at.present?
|
2017-10-02 17:03:38 +02:00
|
|
|
|
2017-07-31 15:01:26 +02:00
|
|
|
%td.status-col
|
2022-03-11 13:57:53 +01:00
|
|
|
- if p.hidden_by_administration_at.present?
|
|
|
|
%span.cell-link= status_badge(p.state)
|
|
|
|
- else
|
|
|
|
%a.cell-link{ href: path }= status_badge(p.state)
|
|
|
|
|
|
|
|
%td.action-col.follow-col= render partial: 'dossier_actions',
|
|
|
|
locals: { procedure_id: @procedure.id,
|
|
|
|
dossier_id: p.dossier_id,
|
|
|
|
state: p.state,
|
|
|
|
archived: p.archived,
|
|
|
|
dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id),
|
|
|
|
close_to_expiration: @statut == 'expirant',
|
|
|
|
hidden_by_administration: @statut == 'supprimes_recemment' }
|
2021-04-20 20:54:20 +02:00
|
|
|
|
2021-04-25 21:32:22 +02:00
|
|
|
= pagination
|
2017-07-11 15:40:09 +02:00
|
|
|
- else
|
2022-04-13 15:44:29 +02:00
|
|
|
%h2.empty-text
|
|
|
|
= t('views.instructeurs.dossiers.no_file')
|