2017-11-17 23:40:51 +01:00
|
|
|
|
- content_for(:title, "#{@procedure.libelle}")
|
|
|
|
|
|
2017-07-11 16:09:03 +02:00
|
|
|
|
#procedure-show
|
2017-11-30 16:49:01 +01:00
|
|
|
|
.accompagnateur-header
|
2017-07-18 15:12:55 +02:00
|
|
|
|
.container.flex
|
2017-07-11 16:09:03 +02:00
|
|
|
|
|
2017-12-05 11:16:16 +01:00
|
|
|
|
.procedure-logo{ style: @procedure.logo.present? ? "background-image: url(#{@procedure.logo.url})" : nil,
|
|
|
|
|
role: 'img', 'aria-label': "logo de la procédure #{@procedure.libelle}" }
|
2017-09-14 10:11:45 +02:00
|
|
|
|
|
|
|
|
|
.procedure-header
|
2017-07-11 16:09:03 +02:00
|
|
|
|
%h1= @procedure.libelle
|
2017-08-28 10:52:25 +02:00
|
|
|
|
%ul.tabs
|
2017-07-11 16:09:03 +02:00
|
|
|
|
%li{ class: (@statut == 'a-suivre') ? 'active' : nil }>
|
2018-02-21 14:50:52 +01:00
|
|
|
|
= link_to(gestionnaire_procedure_path(@procedure, statut: 'a-suivre')) do
|
2017-07-11 16:09:03 +02:00
|
|
|
|
à suivre
|
2017-08-28 10:52:25 +02:00
|
|
|
|
%span.badge= @a_suivre_dossiers.count
|
2017-07-11 16:09:03 +02:00
|
|
|
|
|
|
|
|
|
%li{ class: (@statut == 'suivis') ? 'active' : nil }>
|
2017-10-23 10:29:46 +02:00
|
|
|
|
- if current_gestionnaire.notifications_for_procedure(@procedure).present?
|
2017-08-30 15:31:17 +02:00
|
|
|
|
%span.notifications{ 'aria-label': 'notifications' }
|
2018-02-21 14:50:52 +01:00
|
|
|
|
= link_to(gestionnaire_procedure_path(@procedure, statut: 'suivis')) do
|
2017-07-11 16:09:03 +02:00
|
|
|
|
= t('pluralize.followed', count: @followed_dossiers.count)
|
2017-08-28 10:52:25 +02:00
|
|
|
|
%span.badge= @followed_dossiers.count
|
2017-07-11 16:09:03 +02:00
|
|
|
|
|
|
|
|
|
%li{ class: (@statut == 'traites') ? 'active' : nil }>
|
2018-02-20 15:53:07 +01:00
|
|
|
|
- if current_gestionnaire.notifications_for_procedure(@procedure, :termine).present?
|
|
|
|
|
%span.notifications{ 'aria-label': 'notifications' }
|
2018-02-21 14:50:52 +01:00
|
|
|
|
= link_to(gestionnaire_procedure_path(@procedure, statut: 'traites')) do
|
2017-07-11 16:09:03 +02:00
|
|
|
|
= t('pluralize.processed', count: @termines_dossiers.count)
|
2017-08-28 10:52:25 +02:00
|
|
|
|
%span.badge= @termines_dossiers.count
|
2017-07-11 16:09:03 +02:00
|
|
|
|
|
|
|
|
|
%li{ class: (@statut == 'tous') ? 'active' : nil }>
|
2018-02-21 14:50:52 +01:00
|
|
|
|
= link_to(gestionnaire_procedure_path(@procedure, statut: 'tous')) do
|
2017-07-11 16:09:03 +02:00
|
|
|
|
tous les dossiers
|
2017-08-28 10:52:25 +02:00
|
|
|
|
%span.badge= @all_state_dossiers.count
|
2017-07-11 16:09:03 +02:00
|
|
|
|
|
|
|
|
|
%li{ class: (@statut == 'archives') ? 'active' : nil }>
|
2018-02-21 14:50:52 +01:00
|
|
|
|
= link_to(gestionnaire_procedure_path(@procedure, statut: 'archives')) do
|
2017-07-11 16:09:03 +02:00
|
|
|
|
= t('pluralize.archived', count: @archived_dossiers.count)
|
2017-08-28 10:52:25 +02:00
|
|
|
|
%span.badge= @archived_dossiers.count
|
2017-07-11 15:40:09 +02:00
|
|
|
|
|
2017-09-15 14:46:17 +02:00
|
|
|
|
.procedure-actions
|
2017-11-21 18:00:02 +01:00
|
|
|
|
= render partial: "download_dossiers", locals: { procedure: @procedure }
|
2017-09-15 14:46:17 +02:00
|
|
|
|
|
2017-07-11 15:40:09 +02:00
|
|
|
|
.container
|
2017-09-28 11:04:18 +02:00
|
|
|
|
- if @dossiers.present? || @current_filters.count > 0
|
|
|
|
|
%span.button.dropdown
|
|
|
|
|
Filtrer
|
|
|
|
|
.dropdown-content.left-aligned.fade-in-down
|
2018-02-21 13:42:11 +01:00
|
|
|
|
= form_tag add_filter_gestionnaire_procedure_path(@procedure), method: :post, class: 'dropdown-form large' do
|
2017-09-28 11:04:18 +02:00
|
|
|
|
= label_tag :field, "Colonne"
|
|
|
|
|
= select_tag :field, options_for_select(@available_fields_to_filters)
|
|
|
|
|
%br
|
|
|
|
|
= label_tag :value, "Valeur"
|
|
|
|
|
= text_field_tag :value
|
|
|
|
|
= hidden_field_tag :statut, @statut
|
|
|
|
|
%br
|
|
|
|
|
= submit_tag "Ajouter le filtre", class: 'button'
|
|
|
|
|
|
|
|
|
|
- @current_filters.each do |filter|
|
|
|
|
|
%span.filter
|
|
|
|
|
= "#{filter['label']} : #{filter['value']}"
|
2018-02-21 13:42:11 +01:00
|
|
|
|
= link_to remove_filter_gestionnaire_procedure_path(@procedure, statut: @statut, table: filter['table'], column: filter['column']) do
|
2017-09-28 11:04:18 +02:00
|
|
|
|
%img.close-icon{ src: image_url("close.svg") }
|
|
|
|
|
|
2017-07-31 15:01:26 +02:00
|
|
|
|
%table.table.dossiers-table.hoverable
|
|
|
|
|
%thead
|
2017-07-11 15:40:09 +02:00
|
|
|
|
%tr
|
2017-11-01 20:40:33 +01:00
|
|
|
|
- if @statut == 'suivis' || @statut == 'tous'
|
|
|
|
|
= render partial: "header_field", locals: { field: { "label" => "●", "table" => "notifications", "column" => "notifications" }, classname: "notification-col" }
|
|
|
|
|
- else
|
|
|
|
|
%th.notification-col
|
|
|
|
|
|
2017-09-25 10:46:09 +02:00
|
|
|
|
= render partial: "header_field", locals: { field: { "label" => "Nº dossier", "table" => "self", "column" => "id" }, classname: "number-col" }
|
2017-10-02 17:03:38 +02:00
|
|
|
|
|
|
|
|
|
- @displayed_fields.each do |field|
|
2017-09-25 10:46:09 +02:00
|
|
|
|
= render partial: "header_field", locals: { field: field, classname: "" }
|
|
|
|
|
|
|
|
|
|
= render partial: "header_field", locals: { field: { "label" => "Statut", "table" => "self", "column" => "state" }, classname: "status-col" }
|
2017-10-02 17:03:38 +02:00
|
|
|
|
|
2017-07-31 15:01:26 +02:00
|
|
|
|
%th.follow-col
|
2017-10-02 17:03:38 +02:00
|
|
|
|
%span.button.dropdown
|
|
|
|
|
Personnaliser
|
|
|
|
|
.dropdown-content.fade-in-down
|
2018-02-21 13:42:10 +01:00
|
|
|
|
= form_tag update_displayed_fields_gestionnaire_procedure_path(@procedure), method: :patch, class: 'dropdown-form' do
|
2017-10-02 17:03:38 +02:00
|
|
|
|
= select_tag :values,
|
|
|
|
|
options_for_select(@procedure.fields_for_select,
|
|
|
|
|
selected: @displayed_fields_values),
|
|
|
|
|
multiple: true,
|
|
|
|
|
class: 'select2-limited'
|
|
|
|
|
= submit_tag "Enregistrer", class: 'button'
|
|
|
|
|
|
2017-07-31 15:01:26 +02:00
|
|
|
|
%tbody
|
|
|
|
|
- @dossiers.each do |dossier|
|
|
|
|
|
%tr
|
2017-11-01 20:40:33 +01:00
|
|
|
|
%td.folder-col
|
2018-02-21 14:40:41 +01:00
|
|
|
|
= link_to(gestionnaire_dossier_path(@procedure, dossier), class: 'cell-link') do
|
2018-02-07 20:40:15 +01:00
|
|
|
|
%span.icon.folder
|
2018-02-20 15:53:07 +01:00
|
|
|
|
- if current_gestionnaire.notifications_for_procedure(@procedure, :not_archived).include?(dossier.id)
|
2018-02-07 20:40:15 +01:00
|
|
|
|
%span.notifications{ 'aria-label': 'notifications' }
|
2017-11-01 20:40:33 +01:00
|
|
|
|
|
2017-07-31 15:01:26 +02:00
|
|
|
|
%td.number-col
|
2018-02-21 14:40:41 +01:00
|
|
|
|
= link_to(gestionnaire_dossier_path(@procedure, dossier), class: 'cell-link') do
|
2017-07-31 15:01:26 +02:00
|
|
|
|
= dossier.id
|
2017-10-02 17:03:38 +02:00
|
|
|
|
|
|
|
|
|
- @displayed_fields.each do |field|
|
|
|
|
|
%td
|
2018-02-21 14:40:41 +01:00
|
|
|
|
= link_to(gestionnaire_dossier_path(@procedure, dossier), class: 'cell-link') do
|
2017-10-02 17:03:38 +02:00
|
|
|
|
= dossier.get_value(field['table'], field['column'])
|
|
|
|
|
|
2017-07-31 15:01:26 +02:00
|
|
|
|
%td.status-col
|
2018-02-21 14:40:41 +01:00
|
|
|
|
= link_to(gestionnaire_dossier_path(@procedure, dossier), class: 'cell-link') do
|
2018-03-29 10:33:57 +02:00
|
|
|
|
= render partial: 'shared/dossiers/status', locals: { dossier: dossier }
|
2017-07-31 15:01:26 +02:00
|
|
|
|
%td.follow-col= render partial: 'dossier_actions', locals: { procedure: @procedure, dossier: dossier, dossier_is_followed: @followed_dossiers_id.include?(dossier.id) }
|
2017-09-21 16:47:43 +02:00
|
|
|
|
= paginate @dossiers
|
2017-07-11 15:40:09 +02:00
|
|
|
|
- else
|
2017-09-20 17:07:09 +02:00
|
|
|
|
%h2.empty-text Aucun dossier
|