- content_for(:title, "#{@procedure.libelle}") #procedure-show .sub-header .fr-container.flex .procedure-logo{ style: "background-image: url(#{@procedure.logo_url})", role: 'img', 'aria-label': "logo de la démarche #{@procedure.libelle}" } = render partial: 'header', locals: { procedure: @procedure, statut: @statut } .procedure-actions - if @can_download_dossiers = render Dossiers::ExportDropdownComponent.new(procedure: @procedure, export_templates: current_instructeur.export_templates_for(@procedure), export_url: method(:download_export_instructeur_procedure_path)) .fr-container.flex= render partial: "tabs", locals: { procedure: @procedure, statut: @statut, 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], 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: 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_recemment' %p = t('views.instructeurs.dossiers.tab_explainations.supprimes_recemment').html_safe - if @statut == 'archives' %p = t('views.instructeurs.dossiers.tab_explainations.archives') %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 - 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 = render partial: "dossiers_filter_dropdown", locals: { procedure: @procedure, statut: @statut} = render Dossiers::NotifiedToggleComponent.new(procedure: @procedure, procedure_presentation: @procedure_presentation) .fr-ml-auto - if @statut == 'archives' = link_to deleted_dossiers_instructeur_procedure_path(@procedure), class: "fr-link fr-icon-delete-line fr-link--icon-left fr-mr-2w" do = t('views.instructeurs.dossiers.show_deleted_dossiers') - if @dossiers_count > 0 %span.dossiers-export = render Dossiers::ExportDropdownComponent.new(procedure: @procedure, export_templates: current_instructeur.export_templates_for(@procedure), statut: @statut, count: @dossiers_count, class_btn: 'fr-btn--tertiary', export_url: method(:download_export_instructeur_procedure_path)) - if @filtered_sorted_paginated_ids.present? || @current_filters.count > 0 = render partial: "dossiers_filter_tags", locals: { procedure: @procedure, procedure_presentation: @procedure_presentation, current_filters: @current_filters, statut: @statut } - 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) %div{ data: batch_operation_component.render? ? { controller: 'batch-operation' } : {} } .flex.align-center.fr-mt-2w %span.fr-h6.fr-mb-0.fr-mr-2w = page_entries_info @filtered_sorted_paginated_ids = render batch_operation_component .fr-table.fr-table--bordered %table.table.dossiers-table.hoverable.min-height-300 %thead %tr - if batch_operation_component.render? %th.text-center %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') } } - @procedure_presentation.displayed_fields_for_headers.each do |field| = render partial: "header_field", locals: { field: field, classname: field['classname'] } %th.follow-col Actions %th.text-right = render Dropdown::MenuComponent.new(wrapper: :span, button_options: { class: ['fr-btn--sm', 'fr-btn--tertiary-no-outline', 'fr-btn--icon-right', 'fr-icon-settings-5-line'] }, menu_options: { id: 'custom-menu' }) do |menu| - menu.with_button_inner_html do = t('views.instructeurs.dossiers.personalize') - menu.with_form do = form_tag update_displayed_fields_instructeur_procedure_path(@procedure), method: :patch, class: 'dropdown-form large columns-form' do %react-fragment = render ReactComponent.new "ComboBox/MultiComboBox", items: @displayable_fields_for_select, selected_keys: @displayable_fields_selected, name: 'values[]', 'aria-label': 'Colonne à afficher' = submit_tag t('views.instructeurs.dossiers.save'), class: 'fr-btn fr-btn--secondary' %tbody = render Dossiers::BatchSelectMoreComponent.new(dossiers_count: @dossiers_count, filtered_sorted_ids: @filtered_sorted_ids) - @projected_dossiers.each do |p| - path = instructeur_dossier_path(@procedure, p.dossier_id) %tr{ class: [p.hidden_by_user_at.present? && "file-hidden-by-user"] } - if batch_operation_component.render? %td.text-center - if p.batch_operation_id.present? = check_box_tag :"batch_operation[dossier_ids][]", p.dossier_id, true, disabled: true, id: dom_id(BatchOperation.new, "checkbox_#{p.dossier_id}"), aria: { label: t('views.instructeurs.dossiers.batch_operation.disabled', dossier_id: p.dossier_id) } - else = check_box_tag :"batch_operation[dossier_ids][]", p.dossier_id, false, data: { batch_operation_target: "input", action: "batch-operation#onCheckOne", operations: batch_operation_component.operations_for_dossier(p).join(',') }, form: dom_id(BatchOperation.new), id: dom_id(BatchOperation.new, "checkbox_#{p.dossier_id}"), aria: { label: t('views.instructeurs.dossiers.batch_operation.enabled', dossier_id: p.dossier_id) } %td.number-col - if p.hidden_by_administration_at.present? %span.cell-link= p.dossier_id - else %a.cell-link.relative{ href: path } = p.dossier_id - if @not_archived_notifications_dossier_ids.include?(p.dossier_id) %span.notifications{ 'aria-label': 'notifications' } - p.columns.each do |column| %td - 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? %td.status-col - status = [status_badge(p.state)] - if p.pending_correction? - status << pending_correction_badge(:for_instructeur, html_class: "fr-mt-1v") - elsif p.state.to_sym == :en_construction && p.resolved_corrections? - status << correction_resolved_badge(html_class: "fr-mt-1v") = link_to_if(p.hidden_by_administration_at.blank?, safe_join(status), path, class: class_names("cell-link": true, "fr-py-0": status.many?)) - if @procedure.sva_svr_enabled? %td %span.cell-link = link_to_if p.hidden_by_administration_at.blank?, render(Instructeurs::SVASVRDecisionBadgeComponent.new(projection_or_dossier: p, procedure: @procedure)), path %td.follow-col{ colspan:'2' } %ul.inline.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, 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', sva_svr: @procedure.sva_svr_enabled?, has_blocking_pending_correction: @procedure.feature_enabled?(:blocking_pending_correction) && p.pending_correction?, turbo: false, with_menu: false } %tfoot %tr %td.force-table-100{ colspan: @procedure_presentation.displayed_fields_for_headers.size + 2 } = paginate @filtered_sorted_paginated_ids, views_prefix: 'shared' - else %h2.empty-text = t('views.instructeurs.dossiers.no_file')