refactor(dossiers): table in new dsfr design
- remove obsolete css - handle check / check all dsfr UI - min height hack does not work anymore (pending a new solution)
This commit is contained in:
parent
753c602802
commit
e7768bbf4b
15 changed files with 228 additions and 282 deletions
|
@ -1,70 +1,20 @@
|
||||||
@import 'colors';
|
@import 'colors';
|
||||||
@import 'constants';
|
@import 'constants';
|
||||||
|
|
||||||
.table.dossiers-table {
|
.dossiers-table {
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
th {
|
|
||||||
padding: (2 * $default-spacer) $default-spacer;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
background-image: none; // remove DSFR underline
|
background-image: none; // remove DSFR underline
|
||||||
}
|
}
|
||||||
|
|
||||||
.caret-icon {
|
|
||||||
vertical-align: top;
|
|
||||||
margin-top: 9px;
|
|
||||||
margin-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-link {
|
|
||||||
// In order to have identical height in the table header and the table rows,
|
|
||||||
// we compensate for the height difference between the biggest element of the header
|
|
||||||
// (the Personnaliser button, 38px) and the biggest cell-link element of the rows (the label, 28px)
|
|
||||||
padding: calc((2 * #{$default-spacer}) + ((38px - 28px) / 2))
|
|
||||||
$default-spacer;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.deleted-cell {
|
|
||||||
padding: (2 * $default-spacer) $default-spacer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.notification-col {
|
|
||||||
a {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.number-col,
|
|
||||||
.fr-badge {
|
.fr-badge {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-center {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-col {
|
|
||||||
width: 175px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.updated-at-col {
|
|
||||||
width: 110px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.follow-col {
|
.follow-col {
|
||||||
width: 450px;
|
|
||||||
|
|
||||||
.fr-btn {
|
.fr-btn {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-border {
|
|
||||||
background-image: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-hidden-by-user {
|
.file-hidden-by-user {
|
||||||
|
@ -74,7 +24,3 @@
|
||||||
background-color: rgba(242, 137, 0, 0.6) !important;
|
background-color: rgba(242, 137, 0, 0.6) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
table.display-table {
|
|
||||||
display: table;
|
|
||||||
}
|
|
||||||
|
|
|
@ -56,6 +56,10 @@
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.flex-no-grow {
|
||||||
|
flex-grow: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.flex-no-shrink {
|
.flex-no-shrink {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,15 +9,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#procedure-show {
|
#procedure-show {
|
||||||
.titre-dossiers {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dossiers-table {
|
|
||||||
margin-top: $default-spacer;
|
|
||||||
margin-bottom: 3 * $default-spacer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.procedure-actions {
|
.procedure-actions {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
@ -48,9 +39,4 @@
|
||||||
.fr-ds-combobox__multiple {
|
.fr-ds-combobox__multiple {
|
||||||
margin-bottom: $default-fields-spacer;
|
margin-bottom: $default-fields-spacer;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fix/dsfr
|
|
||||||
.fr-checkbox-group.fix-dsfr-notified-toggle-component {
|
|
||||||
margin-top: -0.5rem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,12 +27,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.hoverable {
|
|
||||||
tbody tr:hover {
|
|
||||||
background-color: var(--hover);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.vertical {
|
&.vertical {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
|
@ -66,8 +60,3 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hacky css to display dropdown "customize table" for table with only 1 or 2 lines
|
|
||||||
table.min-height-300 {
|
|
||||||
min-height: 300px;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
%tr#js_batch_select_more.fr-background-alt--blue-france.hidden
|
%tr#js_batch_select_more.hidden
|
||||||
%td.fr-py-2w.text-center{ colspan: 100 }
|
%td.fr-py-2w.fr-cell--center.fr-background-alt--blue-france{ colspan: 100 }
|
||||||
#not_selected
|
#not_selected
|
||||||
%p{ role: "status" }
|
%p{ role: "status" }
|
||||||
= t('.pagination_files_selected_html')
|
= t('.pagination_files_selected_html')
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
%table
|
%table
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%th.number-col N° dossier
|
%th N° dossier
|
||||||
%th Libellé de la démarche
|
%th Libellé de la démarche
|
||||||
%th Raison de suppression
|
%th Raison de suppression
|
||||||
%th Date de suppression
|
%th Date de suppression
|
||||||
|
|
|
@ -10,7 +10,6 @@ class Instructeurs::ColumnTableHeaderComponent < ApplicationComponent
|
||||||
private
|
private
|
||||||
|
|
||||||
def classname(column)
|
def classname(column)
|
||||||
return 'status-col' if column.dossier_state?
|
|
||||||
return 'number-col' if column.dossier_id?
|
return 'number-col' if column.dossier_id?
|
||||||
return 'sva-col' if column.column == 'sva_svr_decision_on'
|
return 'sva-col' if column.column == 'sva_svr_decision_on'
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,10 +17,16 @@ export class BatchOperationController extends ApplicationController {
|
||||||
onCheckAll(event: Event) {
|
onCheckAll(event: Event) {
|
||||||
const target = event.target as HTMLInputElement;
|
const target = event.target as HTMLInputElement;
|
||||||
|
|
||||||
this.inputTargets.forEach((e) => (e.checked = target.checked));
|
this.inputTargets.forEach((e) => {
|
||||||
|
e.checked = target.checked;
|
||||||
|
e.dispatchEvent(new Event('change')); // dispatch change for dsfr checkbox behavior
|
||||||
|
});
|
||||||
|
|
||||||
this.toggleSubmitButtonWhenNeeded();
|
this.toggleSubmitButtonWhenNeeded();
|
||||||
|
|
||||||
const pagination = document.querySelector('tfoot .fr-pagination');
|
const pagination = document.querySelector(
|
||||||
|
'.fr-table__footer .fr-pagination'
|
||||||
|
);
|
||||||
if (pagination) {
|
if (pagination) {
|
||||||
displayNotice(this.inputTargets);
|
displayNotice(this.inputTargets);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import '@gouvfr/dsfr/dist/scheme/scheme.module';
|
||||||
import '@gouvfr/dsfr/dist/component/display/display.module';
|
import '@gouvfr/dsfr/dist/component/display/display.module';
|
||||||
import '@gouvfr/dsfr/dist/component/toggle/toggle.module';
|
import '@gouvfr/dsfr/dist/component/toggle/toggle.module';
|
||||||
import '@gouvfr/dsfr/dist/component/breadcrumb/breadcrumb.module';
|
import '@gouvfr/dsfr/dist/component/breadcrumb/breadcrumb.module';
|
||||||
|
import '@gouvfr/dsfr/dist/component/checkbox/checkbox.module';
|
||||||
import '@gouvfr/dsfr/dist/component/modal/modal.module';
|
import '@gouvfr/dsfr/dist/component/modal/modal.module';
|
||||||
import '@gouvfr/dsfr/dist/component/navigation/navigation.module';
|
import '@gouvfr/dsfr/dist/component/navigation/navigation.module';
|
||||||
import '@gouvfr/dsfr/dist/component/segmented/segmented.module';
|
import '@gouvfr/dsfr/dist/component/segmented/segmented.module';
|
||||||
|
|
|
@ -29,20 +29,28 @@
|
||||||
|
|
||||||
.fr-container
|
.fr-container
|
||||||
- if @avis.present?
|
- if @avis.present?
|
||||||
%table.table.dossiers-table.hoverable
|
.fr-table.fr-table--no-scroll.fr-table--bordered
|
||||||
%thead
|
.fr-table__wrapper
|
||||||
%tr
|
.fr-table__container
|
||||||
%th.number-col Nº dossier
|
.fr-table__content
|
||||||
%th Demandeur
|
%table.dossiers-table
|
||||||
%th Démarche
|
%thead
|
||||||
%tbody
|
%tr
|
||||||
- @avis.each do |avis|
|
%th Nº dossier
|
||||||
%tr
|
%th Demandeur
|
||||||
%td.number-col
|
%th Démarche
|
||||||
= link_to(expert_avis_path(avis.procedure, avis), class: 'cell-link') do
|
%tbody
|
||||||
= avis.dossier.id
|
- @avis.each do |avis|
|
||||||
%td= link_to(avis.dossier.user_email_for(:display), expert_avis_path(avis.procedure, avis), class: 'cell-link')
|
%tr
|
||||||
%td= link_to(avis.procedure.libelle, expert_avis_path(avis.procedure, avis), class: 'cell-link')
|
%td.number-col
|
||||||
= paginate @avis, views_prefix: 'shared'
|
= link_to(expert_avis_path(avis.procedure, avis), class: 'cell-link') do
|
||||||
|
= avis.dossier.id
|
||||||
|
%td= link_to(avis.dossier.user_email_for(:display), expert_avis_path(avis.procedure, avis), class: 'cell-link')
|
||||||
|
%td= link_to(avis.procedure.libelle, expert_avis_path(avis.procedure, avis), class: 'cell-link')
|
||||||
|
.fr-table__footer
|
||||||
|
.fr-table__footer--start
|
||||||
|
.fr-table__footer--middle
|
||||||
|
= paginate @avis, views_prefix: 'shared'
|
||||||
|
.fr-table__footer--end.flex-no-grow
|
||||||
- else
|
- else
|
||||||
%h2.empty-text Aucun avis
|
%h2.empty-text Aucun avis
|
||||||
|
|
|
@ -82,92 +82,109 @@
|
||||||
= render batch_operation_component
|
= render batch_operation_component
|
||||||
|
|
||||||
.fr-table.fr-table--bordered
|
.fr-table.fr-table--bordered
|
||||||
%table.table.dossiers-table.hoverable.min-height-300
|
.fr-table__wrapper
|
||||||
%thead
|
.fr-table__container
|
||||||
%tr
|
.fr-table__content
|
||||||
- if batch_operation_component.render?
|
%table#table-dossiers.dossiers-table
|
||||||
%th.text-center
|
%thead
|
||||||
%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') } }
|
%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)
|
= render Instructeurs::ColumnTableHeaderComponent.new(procedure_presentation: @procedure_presentation)
|
||||||
|
|
||||||
%th.follow-col
|
%th.follow-col{ scope: 'col' }
|
||||||
Actions
|
Actions
|
||||||
|
|
||||||
%th.text-right
|
%th.fr-cell--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|
|
= 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
|
- menu.with_button_inner_html do
|
||||||
= t('views.instructeurs.dossiers.personalize')
|
= t('views.instructeurs.dossiers.personalize')
|
||||||
- menu.with_form do
|
- menu.with_form do
|
||||||
= render Instructeurs::ColumnPickerComponent.new(procedure: @procedure, procedure_presentation: @procedure_presentation)
|
= render Instructeurs::ColumnPickerComponent.new(procedure: @procedure, procedure_presentation: @procedure_presentation)
|
||||||
|
|
||||||
%tbody
|
%tbody
|
||||||
= render Dossiers::BatchSelectMoreComponent.new(dossiers_count: @dossiers_count, filtered_sorted_ids: @filtered_sorted_ids)
|
= render Dossiers::BatchSelectMoreComponent.new(dossiers_count: @dossiers_count, filtered_sorted_ids: @filtered_sorted_ids)
|
||||||
|
|
||||||
- @projected_dossiers.each do |p|
|
- @projected_dossiers.each do |p|
|
||||||
- path = instructeur_dossier_path(@procedure, p.dossier_id)
|
- path = instructeur_dossier_path(@procedure, p.dossier_id)
|
||||||
%tr{ class: [p.hidden_by_user_at.present? && "file-hidden-by-user"] }
|
%tr{ class: class_names("file-hidden-by-user" => p.hidden_by_user_at.present?), id: "table-dossiers-row-#{p.dossier_id}", "aria-selected" => "false", "data-row-key" => p.dossier_id }
|
||||||
- if batch_operation_component.render?
|
- if batch_operation_component.render?
|
||||||
%td.text-center
|
%th.fr-cell--fixed{ scope: 'row' }
|
||||||
- if p.batch_operation_id.present?
|
.fr-checkbox-group.fr-checkbox-group--sm
|
||||||
= 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) }
|
- if p.batch_operation_id.present?
|
||||||
- else
|
= check_box_tag "batch_operation[dossier_ids][]", p.dossier_id, true, disabled: true,
|
||||||
= 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) }
|
id: dom_id(BatchOperation.new, "checkbox_#{p.dossier_id}"),
|
||||||
|
aria: { label: t('views.instructeurs.dossiers.batch_operation.disabled', dossier_id: p.dossier_id) },
|
||||||
|
data: { "fr-row-select" => "true" }
|
||||||
|
- 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(','), "fr-row-select" => "true" },
|
||||||
|
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) }
|
||||||
|
= label_tag dom_id(BatchOperation.new, "checkbox_#{p.dossier_id}"), "Sélectionner le dossier #{p.dossier_id}", class: 'fr-label'
|
||||||
|
|
||||||
%td.number-col
|
%td.number-col
|
||||||
- if p.hidden_by_administration_at.present?
|
- if p.hidden_by_administration_at.present?
|
||||||
%span.cell-link= p.dossier_id
|
%span.cell-link= p.dossier_id
|
||||||
- else
|
- else
|
||||||
%a.cell-link.relative{ href: path }
|
%a.cell-link.relative{ href: path }
|
||||||
= p.dossier_id
|
= p.dossier_id
|
||||||
- if @not_archived_notifications_dossier_ids.include?(p.dossier_id)
|
- if @not_archived_notifications_dossier_ids.include?(p.dossier_id)
|
||||||
%span.notifications{ 'aria-label': 'notifications' }
|
%span.notifications{ 'aria-label': 'notifications' }
|
||||||
|
|
||||||
|
|
||||||
- p.columns.each do |column|
|
- p.columns.each do |column|
|
||||||
%td
|
%td
|
||||||
- if p.hidden_by_administration_at.present?
|
- if p.hidden_by_administration_at.present?
|
||||||
%span.cell-link
|
%span.cell-link
|
||||||
= column.is_a?(Hash) ? tags_label(column[:value]) : column
|
= column.is_a?(Hash) ? tags_label(column[:value]) : column
|
||||||
- if p.hidden_by_user_at.present?
|
- if p.hidden_by_user_at.present?
|
||||||
= "- #{t("views.instructeurs.dossiers.deleted_reason.#{p.hidden_by_reason}")}"
|
= "- #{t("views.instructeurs.dossiers.deleted_reason.#{p.hidden_by_reason}")}"
|
||||||
- else
|
- else
|
||||||
%a.cell-link{ href: path }
|
%a.cell-link{ href: path }
|
||||||
= column.is_a?(Hash) ? tags_label(column[:value]) : column
|
= column.is_a?(Hash) ? tags_label(column[:value]) : column
|
||||||
= "- #{t("views.instructeurs.dossiers.deleted_reason.#{p.hidden_by_reason}")}" if p.hidden_by_user_at.present?
|
= "- #{t("views.instructeurs.dossiers.deleted_reason.#{p.hidden_by_reason}")}" if p.hidden_by_user_at.present?
|
||||||
|
|
||||||
%td.status-col
|
%td
|
||||||
- status = [status_badge(p.state)]
|
- status = [status_badge(p.state)]
|
||||||
- if p.pending_correction?
|
- if p.pending_correction?
|
||||||
- status << pending_correction_badge(:for_instructeur, html_class: "fr-mt-1v")
|
- status << pending_correction_badge(:for_instructeur, html_class: "fr-mt-1v")
|
||||||
- elsif p.state.to_sym == :en_construction && p.resolved_corrections?
|
- elsif p.state.to_sym == :en_construction && p.resolved_corrections?
|
||||||
- status << correction_resolved_badge(html_class: "fr-mt-1v")
|
- 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?))
|
= link_to_if(p.hidden_by_administration_at.blank?, safe_join(status), path, class: "cell-link flex column")
|
||||||
|
|
||||||
- if @procedure.sva_svr_enabled?
|
- if @procedure.sva_svr_enabled?
|
||||||
%td
|
%td
|
||||||
%span.cell-link
|
%span.cell-link
|
||||||
= link_to_if p.hidden_by_administration_at.blank?, render(Instructeurs::SVASVRDecisionBadgeComponent.new(projection_or_dossier: p, procedure: @procedure)), path
|
= 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' }
|
%td.follow-col
|
||||||
%ul.inline.fr-btns-group.fr-btns-group--sm.fr-btns-group--inline.fr-btns-group--icon-right
|
%ul.fr-btns-group.fr-btns-group--lg.fr-btns-group--inline-lg.fr-btns-group--icon-right
|
||||||
= render partial: 'instructeurs/procedures/dossier_actions', locals: { procedure_id: @procedure.id,
|
= render partial: 'instructeurs/procedures/dossier_actions', locals: { procedure_id: @procedure.id,
|
||||||
dossier_id: p.dossier_id,
|
dossier_id: p.dossier_id,
|
||||||
state: p.state,
|
state: p.state,
|
||||||
archived: p.archived,
|
archived: p.archived,
|
||||||
dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id),
|
dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id),
|
||||||
close_to_expiration: @statut == 'expirant',
|
close_to_expiration: @statut == 'expirant',
|
||||||
hidden_by_administration: @statut == 'supprimes',
|
hidden_by_administration: @statut == 'supprimes',
|
||||||
hidden_by_expired: p.hidden_by_reason == 'expired',
|
hidden_by_expired: p.hidden_by_reason == 'expired',
|
||||||
sva_svr: @procedure.sva_svr_enabled?,
|
sva_svr: @procedure.sva_svr_enabled?,
|
||||||
has_blocking_pending_correction: @procedure.feature_enabled?(:blocking_pending_correction) && p.pending_correction?,
|
has_blocking_pending_correction: @procedure.feature_enabled?(:blocking_pending_correction) && p.pending_correction?,
|
||||||
turbo: false,
|
turbo: false,
|
||||||
with_menu: false }
|
with_menu: false }
|
||||||
|
|
||||||
%tfoot
|
.fr-table__footer
|
||||||
%tr
|
.fr-table__footer--start
|
||||||
%td.force-table-100{ colspan: @procedure_presentation.displayed_fields_for_headers.size + 2 }
|
%p.fr-table__detail
|
||||||
= paginate @filtered_sorted_paginated_ids, views_prefix: 'shared'
|
= 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
|
- else
|
||||||
%h2.empty-text
|
%h2.empty-text
|
||||||
|
|
|
@ -9,5 +9,5 @@
|
||||||
= user_email
|
= user_email
|
||||||
= "- #{t('views.instructeurs.dossiers.deleted_by_administration')}" if p.hidden_by_administration_at.present?
|
= "- #{t('views.instructeurs.dossiers.deleted_by_administration')}" if p.hidden_by_administration_at.present?
|
||||||
|
|
||||||
%td.status-col
|
%td
|
||||||
%p.cell-link= status_badge(p.state)
|
%p.cell-link.flex.column= status_badge(p.state)
|
||||||
|
|
|
@ -9,108 +9,113 @@
|
||||||
.fr-alert.fr-alert--info.fr-alert--sm.fr-mt-3w
|
.fr-alert.fr-alert--info.fr-alert--sm.fr-mt-3w
|
||||||
= p t('views.instructeurs.search.deleted_dossier', dossier_id: @deleted_dossier.dossier_id, procedure_libelle: @deleted_dossier.procedure.libelle, deleted_at: l(@deleted_dossier.deleted_at))
|
= p t('views.instructeurs.search.deleted_dossier', dossier_id: @deleted_dossier.dossier_id, procedure_libelle: @deleted_dossier.procedure.libelle, deleted_at: l(@deleted_dossier.deleted_at))
|
||||||
|
|
||||||
.page-title
|
|
||||||
Résultat de la recherche :
|
|
||||||
= t('pluralize.dossier_trouve', count: @dossiers_count)
|
|
||||||
|
|
||||||
- if @projected_dossiers.present?
|
- if @projected_dossiers.present?
|
||||||
= paginate @paginated_ids, views_prefix: 'shared'
|
.fr-table.fr-table--no-scroll.fr-table--bordered
|
||||||
.fr-table.fr-table--bordered
|
.fr-table__wrapper
|
||||||
%table.table.dossiers-table.hoverable
|
.fr-table__container
|
||||||
%thead
|
.fr-table__content
|
||||||
%tr
|
%table.dossiers-table
|
||||||
%th.number-col Nº dossier
|
%caption
|
||||||
%th Démarche
|
Résultat de la recherche :
|
||||||
%th Demandeur
|
= t('pluralize.dossier_trouve', count: @dossiers_count)
|
||||||
%th.status-col Statut
|
%thead
|
||||||
%th.follow-col
|
%tr
|
||||||
%tbody
|
%th Nº dossier
|
||||||
- @projected_dossiers.each do |p|
|
%th Démarche
|
||||||
- procedure_libelle, user_email, procedure_id = p.columns
|
%th Demandeur
|
||||||
- instructeur_dossier = @instructeur_dossiers_ids.include?(p.dossier_id)
|
%th Statut
|
||||||
- expert_dossier = @dossier_avis_ids_h[p.dossier_id].present?
|
%th.follow-col
|
||||||
- hidden_by_administration = p.hidden_by_administration_at.present?
|
%tbody
|
||||||
- instructeur_and_expert_dossier = instructeur_dossier && expert_dossier
|
- @projected_dossiers.each do |p|
|
||||||
- path = instructeur_dossier ? instructeur_dossier_path(procedure_id, p.dossier_id) : expert_avis_path(procedure_id, @dossier_avis_ids_h[p.dossier_id])
|
- procedure_libelle, user_email, procedure_id = p.columns
|
||||||
|
- instructeur_dossier = @instructeur_dossiers_ids.include?(p.dossier_id)
|
||||||
|
- expert_dossier = @dossier_avis_ids_h[p.dossier_id].present?
|
||||||
|
- hidden_by_administration = p.hidden_by_administration_at.present?
|
||||||
|
- instructeur_and_expert_dossier = instructeur_dossier && expert_dossier
|
||||||
|
- path = instructeur_dossier ? instructeur_dossier_path(procedure_id, p.dossier_id) : expert_avis_path(procedure_id, @dossier_avis_ids_h[p.dossier_id])
|
||||||
|
|
||||||
%tr{ class: [p.hidden_by_administration_at.present? && "file-hidden-by-user"] }
|
%tr{ class: [p.hidden_by_administration_at.present? && "file-hidden-by-user"] }
|
||||||
- if instructeur_and_expert_dossier
|
- if instructeur_and_expert_dossier
|
||||||
%td.number-col
|
%td.number-col
|
||||||
.cell-link.relative
|
.cell-link.relative
|
||||||
= p.dossier_id
|
= p.dossier_id
|
||||||
- if @notifications_dossier_ids.include?(p.dossier_id)
|
- if @notifications_dossier_ids.include?(p.dossier_id)
|
||||||
%span.notifications{ 'aria-label': 'notifications' }
|
%span.notifications{ 'aria-label': 'notifications' }
|
||||||
%td
|
%td
|
||||||
.cell-link= procedure_libelle
|
.cell-link= procedure_libelle
|
||||||
%td
|
%td
|
||||||
.cell-link= user_email
|
.cell-link= user_email
|
||||||
%td.status-col
|
%td
|
||||||
.cell-link= status_badge(p.state)
|
.cell-link.flex.column= status_badge(p.state)
|
||||||
|
|
||||||
- elsif hidden_by_administration
|
- elsif hidden_by_administration
|
||||||
= render partial: "recherche/hidden_dossier", locals: {p: p, procedure_libelle: procedure_libelle, user_email: user_email}
|
= render partial: "recherche/hidden_dossier", locals: {p: p, procedure_libelle: procedure_libelle, user_email: user_email}
|
||||||
|
|
||||||
- else
|
- else
|
||||||
%td.number-col
|
%td.number-col
|
||||||
%a.cell-link.relative{ href: path }
|
%a.cell-link.relative{ href: path }
|
||||||
= p.dossier_id
|
= p.dossier_id
|
||||||
- if @notifications_dossier_ids.include?(p.dossier_id)
|
- if @notifications_dossier_ids.include?(p.dossier_id)
|
||||||
%span.notifications{ 'aria-label': 'notifications' }
|
%span.notifications{ 'aria-label': 'notifications' }
|
||||||
|
|
||||||
%td
|
%td
|
||||||
%a.cell-link{ href: path }= procedure_libelle
|
%a.cell-link{ href: path }= procedure_libelle
|
||||||
|
|
||||||
%td
|
%td
|
||||||
%a.cell-link{ href: path }= user_email
|
%a.cell-link{ href: path }= user_email
|
||||||
|
|
||||||
%td.status-col
|
%td
|
||||||
%a.cell-link{ href: path }= status_badge(p.state)
|
%a.cell-link.flex.column{ href: path }= status_badge(p.state)
|
||||||
|
|
||||||
|
|
||||||
- if instructeur_dossier && expert_dossier
|
- if instructeur_dossier && expert_dossier
|
||||||
%td.follow-col
|
%td.follow-col
|
||||||
= render Dropdown::MenuComponent.new(wrapper: :div, button_options: {class: ['fr-btn--sm']}) do |menu|
|
= render Dropdown::MenuComponent.new(wrapper: :div, button_options: {class: ['fr-btn--sm']}) do |menu|
|
||||||
- menu.with_button_inner_html do
|
- menu.with_button_inner_html do
|
||||||
Actions
|
Actions
|
||||||
|
|
||||||
- menu.with_item do
|
- menu.with_item do
|
||||||
= link_to(instructeur_dossier_path(procedure_id, p.dossier_id), role: 'menuitem') do
|
= link_to(instructeur_dossier_path(procedure_id, p.dossier_id), role: 'menuitem') do
|
||||||
= dsfr_icon('fr-icon-file-text-fill', :sm)
|
= dsfr_icon('fr-icon-file-text-fill', :sm)
|
||||||
.dropdown-description
|
.dropdown-description
|
||||||
Voir le dossier
|
Voir le dossier
|
||||||
|
|
||||||
- menu.with_item do
|
- menu.with_item do
|
||||||
= link_to(expert_avis_path(procedure_id, @dossier_avis_ids_h[p.dossier_id]), role: 'menuitem') do
|
= link_to(expert_avis_path(procedure_id, @dossier_avis_ids_h[p.dossier_id]), role: 'menuitem') do
|
||||||
= dsfr_icon('fr-icon-chat-3-fill', :sm)
|
= dsfr_icon('fr-icon-chat-3-fill', :sm)
|
||||||
.dropdown-description
|
.dropdown-description
|
||||||
Donner mon avis
|
Donner mon avis
|
||||||
|
|
||||||
- elsif instructeur_dossier
|
- elsif instructeur_dossier
|
||||||
- if hidden_by_administration
|
- if hidden_by_administration
|
||||||
%td.follow-col
|
%td.follow-col
|
||||||
= link_to restore_instructeur_dossier_path(procedure_id, p.dossier_id), method: :patch, class: "button primary" do
|
= link_to restore_instructeur_dossier_path(procedure_id, p.dossier_id), method: :patch, class: "button primary" do
|
||||||
= t('views.instructeurs.dossiers.restore')
|
= t('views.instructeurs.dossiers.restore')
|
||||||
|
|
||||||
- else
|
- else
|
||||||
%td.follow-col
|
%td.follow-col
|
||||||
%ul.inline.fr-btns-group.fr-btns-group--sm.fr-btns-group--inline.fr-btns-group--icon-right
|
%ul.fr-btns-group.fr-btns-group--sm.fr-btns-group--inline-lg.fr-btns-group--icon-right
|
||||||
= render partial: "instructeurs/procedures/dossier_actions",
|
= render partial: "instructeurs/procedures/dossier_actions",
|
||||||
locals: { procedure_id: procedure_id,
|
locals: { procedure_id: procedure_id,
|
||||||
dossier_id: p.dossier_id,
|
dossier_id: p.dossier_id,
|
||||||
state: p.state,
|
state: p.state,
|
||||||
archived: p.archived,
|
archived: p.archived,
|
||||||
dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id),
|
dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id),
|
||||||
close_to_expiration: nil,
|
close_to_expiration: nil,
|
||||||
hidden_by_administration: nil,
|
hidden_by_administration: nil,
|
||||||
hidden_by_expired: nil,
|
hidden_by_expired: nil,
|
||||||
sva_svr: p.sva_svr_decision_on.present?,
|
sva_svr: p.sva_svr_decision_on.present?,
|
||||||
has_blocking_pending_correction: p.pending_correction? && Flipper.enabled?(:blocking_pending_correction, ProcedureFlipperActor.new(procedure_id)),
|
has_blocking_pending_correction: p.pending_correction? && Flipper.enabled?(:blocking_pending_correction, ProcedureFlipperActor.new(procedure_id)),
|
||||||
turbo: false,
|
turbo: false,
|
||||||
with_menu: false }
|
with_menu: false }
|
||||||
|
|
||||||
- else
|
- else
|
||||||
%td
|
%td
|
||||||
= paginate @paginated_ids, views_prefix: 'shared'
|
.fr-table__footer
|
||||||
|
.fr-table__footer--start
|
||||||
|
.fr-table__footer--middle
|
||||||
|
= paginate @paginated_ids, views_prefix: 'shared'
|
||||||
|
.fr-table__footer--end
|
||||||
|
|
||||||
- else
|
- else
|
||||||
%h2 Aucun dossier correspondant à votre recherche n’a été trouvé
|
%h2.fr-h4.fr-my-4w Aucun dossier correspondant à votre recherche n’a été trouvé
|
||||||
|
|
|
@ -180,21 +180,6 @@
|
||||||
%td Table Data 3
|
%td Table Data 3
|
||||||
%td Table Data 4
|
%td Table Data 4
|
||||||
|
|
||||||
%h2 Hoverable (.table.hoverable)
|
|
||||||
|
|
||||||
%table.table.hoverable
|
|
||||||
%thead
|
|
||||||
%tr
|
|
||||||
%th Header 1
|
|
||||||
%th Header 2
|
|
||||||
%tbody
|
|
||||||
%tr
|
|
||||||
%td Table Data 1
|
|
||||||
%td Table Data 2
|
|
||||||
%tr
|
|
||||||
%td Table Data 3
|
|
||||||
%td Table Data 4
|
|
||||||
|
|
||||||
%h2 Vertical layout (.table.vertical)
|
%h2 Vertical layout (.table.vertical)
|
||||||
|
|
||||||
%table.table.vertical
|
%table.table.vertical
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
%table.table.hoverable.archive-table
|
%table.archive-table
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%th
|
%th
|
||||||
|
|
Loading…
Reference in a new issue