demarches-normaliennes/app/views/instructeurs/procedures/show.html.haml

193 lines
11 KiB
Text
Raw Normal View History

2017-11-17 23:40:51 +01:00
- content_for(:title, "#{@procedure.libelle}")
2017-07-11 16:09:03 +02:00
#procedure-show
.sub-header
.fr-container.flex.column
= render partial: 'instructeurs/breadcrumbs',
locals: { steps: [[t('show_procedure', scope: [:layouts, :breadcrumb], libelle: @procedure.libelle.truncate(22)), instructeur_procedure_path(@procedure)]] }
= render partial: 'header', locals: { procedure: @procedure, statut: @statut }
2024-11-19 21:17:05 +01:00
%hr
%h1.fr-h5.fr-mb-0= t('.file_tracking')
.fr-container.flex= render partial: "tabs", locals: { procedure: @procedure,
2021-09-23 15:03:20 +02:00
statut: @statut,
a_suivre_count: @counts[:a_suivre],
suivis_count: @counts[:suivis],
traites_count: @counts[:traites],
tous_count: @counts[:tous],
supprimes_count: @counts[:supprimes],
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 }
.fr-container.fr-highlight
- if @statut == 'a-suivre'
%p
= t('views.instructeurs.dossiers.tab_explainations.a_suivre')
- if @statut == 'suivis'
%p
= t('views.instructeurs.dossiers.tab_explainations.suivis')
- if @statut == 'traites'
%p
= t('views.instructeurs.dossiers.tab_explainations.traites_html', archives_path: list_instructeur_archives_path(@procedure))
- if @statut == 'tous'
%p
- if @procedure.routing_enabled?
= t('views.instructeurs.dossiers.tab_explainations.tous_with_routing')
- else
= t('views.instructeurs.dossiers.tab_explainations.tous')
- if @statut == 'supprimes'
%p
= t('views.instructeurs.dossiers.tab_explainations.supprimes').html_safe
- if @statut == 'archives'
%p
= t('views.instructeurs.dossiers.tab_explainations.archives')
%br
2024-11-13 18:07:01 +01:00
Ces dossiers seront supprimés lorsque leur délai de conservation dans #{APPLICATION_NAME}
- if @procedure.duree_conservation_dossiers_dans_ds
= "(#{@procedure.duree_conservation_dossiers_dans_ds} mois)"
sera expiré.
= link_to 'En savoir plus', ARCHIVAGE_DOC_URL
- if @statut == 'expirant'
%p
= t('views.instructeurs.dossiers.tab_explainations.expirant')
.fr-container--fluid.fr-mx-4w.overflow-y-visible
%hr
.flex.align-center
- if @filtered_sorted_paginated_ids.present? || @current_filters.count > 0
2024-09-27 10:00:48 +02:00
= render partial: "dossiers_filter_dropdown", locals: { procedure: @procedure, statut: @statut, procedure_presentation: @procedure_presentation }
2024-11-12 09:43:27 +01:00
= render Dossiers::NotifiedToggleComponent.new(procedure_presentation: @procedure_presentation) if @statut != 'a-suivre'
.fr-ml-auto
- if @dossiers_count > 0
2024-11-12 18:14:26 +01:00
%ul.fr-btns-group.fr-btns-group--right.fr-btns-group--sm.fr-btns-group--inline-md.fr-btns-group--icon-left
= render Dossiers::ExportDropdownComponent.new(wrapper: :li, procedure: @procedure, export_templates: current_instructeur.export_templates_for(@procedure), statut: @statut, count: @dossiers_count,
class_btn: 'fr-btn--secondary fr-icon-download-line', export_url: method(:download_export_instructeur_procedure_path))
= render Dropdown::MenuComponent.new(wrapper: :li, button_options: { class: ['fr-btn--tertiary', 'fr-icon-settings-5-line'] }, menu_options: { id: 'custom-menu' }) do |menu|
- menu.with_button_inner_html do
= t('views.instructeurs.dossiers.customize')
- menu.with_form do
= render Instructeurs::ColumnPickerComponent.new(procedure: @procedure, procedure_presentation: @procedure_presentation)
- if @filtered_sorted_paginated_ids.present? || @current_filters.count > 0
= render Instructeurs::FilterButtonsComponent.new(filters: @current_filters, procedure_presentation: @procedure_presentation, statut: @statut)
2022-12-02 17:16:29 +01:00
- batch_operation_component = Dossiers::BatchOperationComponent.new(statut: @statut, procedure: @procedure)
- if @batch_operations.present?
- @batch_operations.each do |batch_operation|
= render Dossiers::BatchAlertComponent.new(batch: batch_operation, procedure: @procedure)
2022-12-01 11:22:20 +01:00
%div{ data: batch_operation_component.render? ? { controller: 'batch-operation' } : {} }
.flex.align-center.fr-mt-2w
%span.fr-h6.fr-mb-0.fr-mr-2w
2023-01-26 15:53:57 +01:00
= page_entries_info @filtered_sorted_paginated_ids
= render batch_operation_component
2023-01-20 11:21:06 +01:00
.fr-table.fr-table--bordered
.fr-table__wrapper
.fr-table__container
.fr-table__content
%table#table-dossiers.dossiers-table
%thead
%tr
- if batch_operation_component.render?
%th.fr-cell--fixed{ role: 'columnheader', scope: 'col' }
.fr-checkbox-group.fr-checkbox-group--sm
%input{ type: "checkbox", disabled: @disable_checkbox_all, checked: @disable_checkbox_all, data: { action: "batch-operation#onCheckAll" }, id: dom_id(BatchOperation.new, :checkbox_all), aria: { label: t('views.instructeurs.dossiers.select_all') } }
= label_tag dom_id(BatchOperation.new, :checkbox_all), "Sélectionner tous les dossiers", class: 'fr-label'
= render Instructeurs::ColumnTableHeaderComponent.new(procedure_presentation: @procedure_presentation)
%th.follow-col{ scope: 'col' }
Actions
%tbody
= render Dossiers::BatchSelectMoreComponent.new(dossiers_count: @dossiers_count, filtered_sorted_ids: @filtered_sorted_ids)
- @projected_dossiers.each do |p|
2024-11-13 11:01:10 +01:00
- dossier = p.dossier
- path = instructeur_dossier_path(@procedure, dossier.id, statut: params[:statut])
2024-11-13 11:01:10 +01:00
%tr{ class: class_names("file-hidden-by-user" => dossier.hidden_by_user_at.present?), id: "table-dossiers-row-#{dossier.id}", "aria-selected" => "false", "data-row-key" => dossier.id }
- if batch_operation_component.render?
%th.fr-cell--fixed{ scope: 'row' }
.fr-checkbox-group.fr-checkbox-group--sm
2024-11-13 11:01:10 +01:00
- if dossier.batch_operation_id.present?
= check_box_tag "batch_operation[dossier_ids][]", dossier.id, true, disabled: true,
id: dom_id(BatchOperation.new, "checkbox_#{dossier.id}"),
aria: { label: t('views.instructeurs.dossiers.batch_operation.disabled', dossier_id: dossier.id) },
data: { "fr-row-select" => "true" }
- else
2024-11-13 11:01:10 +01:00
= check_box_tag "batch_operation[dossier_ids][]", dossier.id, false,
data: { batch_operation_target: "input", action: "batch-operation#onCheckOne", operations: batch_operation_component.operations_for_dossier(dossier).join(','), "fr-row-select" => "true" },
form: dom_id(BatchOperation.new), id: dom_id(BatchOperation.new, "checkbox_#{dossier.id}"),
aria: { label: t('views.instructeurs.dossiers.batch_operation.enabled', dossier_id: dossier.id) }
= label_tag dom_id(BatchOperation.new, "checkbox_#{dossier.id}"), "Sélectionner le dossier #{dossier.id}", class: 'fr-label'
2024-11-13 18:40:09 +01:00
%td.fr-cell--numeric
2024-11-13 11:01:10 +01:00
- if dossier.hidden_by_administration_at.present?
%span= dossier.id
- else
%a.fr-link.relative{ href: path }
2024-11-13 11:01:10 +01:00
= dossier.id
- if @not_archived_notifications_dossier_ids.include?(dossier.id)
%span.notifications{ 'aria-label': 'notifications' }
- p.columns.each do |column|
2024-11-25 12:31:05 +01:00
%td.fr-cell--multiline
2024-11-13 11:01:10 +01:00
- if dossier.hidden_by_administration_at.present?
%span
= column.is_a?(Hash) ? tags_label(column[:value]) : column
2024-11-13 11:01:10 +01:00
- if dossier.hidden_by_user_at.present?
= "- #{t("views.instructeurs.dossiers.deleted_reason.#{dossier.hidden_by_reason}")}"
- else
%a{ href: path }
= column.is_a?(Hash) ? tags_label(column[:value]) : column
2024-11-13 11:01:10 +01:00
= "- #{t("views.instructeurs.dossiers.deleted_reason.#{dossier.hidden_by_reason}")}" if dossier.hidden_by_user_at.present?
%td
2024-11-13 11:01:10 +01:00
- status = [status_badge(dossier.state)]
2024-11-21 11:36:49 +01:00
- if dossier.pending_correction?
- status << pending_correction_badge(:for_instructeur, html_class: "fr-mt-1v")
2024-11-21 11:36:49 +01:00
- elsif dossier.last_correction_resolved?
- status << correction_resolved_badge(html_class: "fr-mt-1v")
2024-11-13 11:01:10 +01:00
= link_to_if(dossier.hidden_by_administration_at.blank?, safe_join(status), path, class: "flex column")
- if @procedure.sva_svr_enabled?
%td
%span
2024-11-21 11:36:49 +01:00
= link_to_if dossier.hidden_by_administration_at.blank?, render(Instructeurs::SVASVRDecisionBadgeComponent.new(dossier:, procedure: @procedure)), path
%td.follow-col
2024-11-12 18:14:26 +01:00
%ul.fr-btns-group.fr-btns-group--sm.fr-btns-group--inline.fr-btns-group--icon-right
= render partial: 'instructeurs/procedures/dossier_actions', locals: { procedure_id: @procedure.id,
2024-11-13 11:01:10 +01:00
dossier_id: dossier.id,
state: dossier.state,
archived: dossier.archived,
dossier_is_followed: @followed_dossiers_id.include?(dossier.id),
close_to_expiration: @statut == 'expirant',
hidden_by_administration: @statut == 'supprimes',
2024-11-13 11:01:10 +01:00
hidden_by_expired: dossier.hidden_by_reason == 'expired',
sva_svr: @procedure.sva_svr_enabled?,
2024-11-13 11:01:10 +01:00
has_blocking_pending_correction: @procedure.feature_enabled?(:blocking_pending_correction) && dossier.pending_correction?,
turbo: false,
with_menu: false }
.fr-table__footer
.fr-table__footer--start
%p.fr-table__detail
= number_with_delimiter @dossiers_count
= t('activerecord.models.dossier', count: @dossiers_count).downcase
.fr-table__footer--middle
= paginate @filtered_sorted_paginated_ids, views_prefix: 'shared'
.fr-table__footer--end.flex-no-grow
- else
2022-04-13 15:44:29 +02:00
%h2.empty-text
= t('views.instructeurs.dossiers.no_file')