style(instructeurs): restyle dossier actions
This commit is contained in:
parent
0e1077487a
commit
278b58ef78
6 changed files with 46 additions and 45 deletions
|
@ -85,6 +85,9 @@
|
||||||
|
|
||||||
.follow-col {
|
.follow-col {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
|
.fr-btn {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,31 @@
|
||||||
%span.dropdown.print-menu-opener{ data: { controller: 'menu-button' } }
|
%ul.fr-btns-group.fr-btns-group--sm.fr-btns-group--inline-md.fr-btns-group--icon-right
|
||||||
%button.button.dropdown-button.icon-only{ title: 'imprimer', 'aria-label': 'imprimer', data: { menu_button_target: 'button' } }
|
%li.dropdown.print-menu-opener{ data: { controller: 'menu-button' } }
|
||||||
%span.icon.printer
|
%button.fr-btn.fr-btn--secondary.fr-icon-printer-line.dropdown-button{ title: 'imprimer', 'aria-label': 'Imprimer', data: { menu_button_target: 'button' } } Imprimer
|
||||||
%ul#print-menu.print-menu.dropdown-content{ data: { menu_button_target: 'menu' } }
|
%ul#print-menu.print-menu.dropdown-content{ data: { menu_button_target: 'menu' } }
|
||||||
%li
|
|
||||||
= link_to "Tout le dossier", print_instructeur_dossier_path(dossier.procedure, dossier), target: "_blank", rel: "noopener", class: "menu-item menu-link"
|
|
||||||
%li
|
|
||||||
= link_to "Uniquement cet onglet", "#", onclick: "window.print()", class: "menu-item menu-link"
|
|
||||||
%li
|
|
||||||
= link_to "Export PDF", instructeur_dossier_path(dossier.procedure, dossier, format: :pdf), target: "_blank", rel: "noopener", class: "menu-item menu-link"
|
|
||||||
- if dossier.geo_data?
|
|
||||||
%li
|
%li
|
||||||
= link_to "Export GeoJSON", geo_data_instructeur_dossier_path(dossier.procedure, dossier), target: "_blank", rel: "noopener", class: "menu-item menu-link"
|
= link_to "Tout le dossier", print_instructeur_dossier_path(dossier.procedure, dossier), target: "_blank", rel: "noopener", class: "menu-item menu-link"
|
||||||
|
%li
|
||||||
|
= link_to "Uniquement cet onglet", "#", onclick: "window.print()", class: "menu-item menu-link"
|
||||||
|
%li
|
||||||
|
= link_to "Export PDF", instructeur_dossier_path(dossier.procedure, dossier, format: :pdf), target: "_blank", rel: "noopener", class: "menu-item menu-link"
|
||||||
|
- if dossier.geo_data?
|
||||||
|
%li
|
||||||
|
= link_to "Export GeoJSON", geo_data_instructeur_dossier_path(dossier.procedure, dossier), target: "_blank", rel: "noopener", class: "menu-item menu-link"
|
||||||
|
|
||||||
%span.dropdown.print-menu-opener{ data: { controller: 'menu-button' } }
|
%li.dropdown.print-menu-opener{ data: { controller: 'menu-button' } }
|
||||||
%button.button.dropdown-button.icon-only{ data: { menu_button_target: 'button' } }
|
%button.fr-btn.fr-btn--secondary.fr-icon-download-line.dropdown-button{ data: { menu_button_target: 'button', 'aria-label': 'Télécharger' } } Télécharger
|
||||||
%span.icon.attached
|
%ul#print-pj-menu.print-menu.dropdown-content{ data: { menu_button_target: 'menu' } }
|
||||||
%ul#print-pj-menu.print-menu.dropdown-content{ data: { menu_button_target: 'menu' } }
|
%li= link_to "Télécharger le dossier et toutes ses pièces jointes", telecharger_pjs_instructeur_dossier_path(dossier.procedure, dossier), target: "_blank", rel: "noopener", class: "menu-item menu-link"
|
||||||
%li= link_to "Télécharger le dossier et toutes ses pièces jointes", telecharger_pjs_instructeur_dossier_path(dossier.procedure, dossier), target: "_blank", rel: "noopener", class: "menu-item menu-link"
|
|
||||||
|
|
||||||
= render partial: "instructeurs/procedures/dossier_actions",
|
%li
|
||||||
locals: { procedure_id: dossier.procedure.id,
|
= render partial: "instructeurs/procedures/dossier_actions",
|
||||||
dossier_id: dossier.id,
|
locals: { procedure_id: dossier.procedure.id,
|
||||||
state: dossier.state,
|
dossier_id: dossier.id,
|
||||||
archived: dossier.archived,
|
state: dossier.state,
|
||||||
dossier_is_followed: current_instructeur&.follow?(dossier),
|
archived: dossier.archived,
|
||||||
close_to_expiration: dossier.close_to_expiration?,
|
dossier_is_followed: current_instructeur&.follow?(dossier),
|
||||||
hidden_by_administration: dossier.hidden_by_administration? }
|
close_to_expiration: dossier.close_to_expiration?,
|
||||||
|
hidden_by_administration: dossier.hidden_by_administration? }
|
||||||
|
|
||||||
|
%li.state-button
|
||||||
.state-button
|
= render partial: "state_button", locals: { dossier: dossier }
|
||||||
= render partial: "state_button", locals: { dossier: dossier }
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.dropdown{ data: { controller: 'menu-button', popover: 'true' } }
|
.dropdown{ data: { controller: 'menu-button', popover: 'true' } }
|
||||||
-# Dropdown button title
|
-# Dropdown button title
|
||||||
%button.button.primary.dropdown-button{ class: button_or_label_class(dossier), data: { menu_button_target: 'button' } }
|
%button.fr-btn.dropdown-button{ class: button_or_label_class(dossier), data: { menu_button_target: 'button' } }
|
||||||
= dossier_display_state dossier
|
= dossier_display_state dossier
|
||||||
|
|
||||||
-# Dropdown content
|
-# Dropdown content
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
- if hidden_by_administration
|
- if hidden_by_administration
|
||||||
= link_to restore_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: "button" do
|
= link_to restore_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: "fr-btn fr-btn--secondary" do
|
||||||
= t('views.instructeurs.dossiers.restore')
|
= t('views.instructeurs.dossiers.restore')
|
||||||
- elsif close_to_expiration || Dossier::TERMINE.include?(state)
|
- elsif close_to_expiration || Dossier::TERMINE.include?(state)
|
||||||
.dropdown.user-dossier-actions{ data: { controller: 'menu-button' } }
|
.dropdown.user-dossier-actions{ data: { controller: 'menu-button' } }
|
||||||
%button.button.dropdown-button{ data: { menu_button_target: 'button' } }
|
%button.fr-btn.dropdown-button{ data: { menu_button_target: 'button' } }
|
||||||
Actions
|
Actions
|
||||||
.dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' }, id: "dossier_#{dossier_id}_actions_menu" }
|
.dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' }, id: "dossier_#{dossier_id}_actions_menu" }
|
||||||
%ul.dropdown-items
|
%ul.dropdown-items
|
||||||
|
@ -33,10 +33,8 @@
|
||||||
|
|
||||||
- elsif Dossier::EN_CONSTRUCTION_OU_INSTRUCTION.include?(state)
|
- elsif Dossier::EN_CONSTRUCTION_OU_INSTRUCTION.include?(state)
|
||||||
- if dossier_is_followed
|
- if dossier_is_followed
|
||||||
= link_to unfollow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'button' do
|
= link_to unfollow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'fr-btn fr-btn--secondary fr-icon-star-fill' do
|
||||||
%span.icon.unfollow>
|
|
||||||
= t('views.instructeurs.dossiers.stop_follow')
|
= t('views.instructeurs.dossiers.stop_follow')
|
||||||
- else
|
- else
|
||||||
= link_to follow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'button' do
|
= link_to follow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'fr-btn fr-btn--secondary fr-icon-star-line' do
|
||||||
%span.icon.follow>
|
|
||||||
= t('views.instructeurs.dossiers.follow_file')
|
= t('views.instructeurs.dossiers.follow_file')
|
||||||
|
|
|
@ -89,5 +89,5 @@
|
||||||
= t('.utils.negative')
|
= t('.utils.negative')
|
||||||
|
|
||||||
.send-wrapper
|
.send-wrapper
|
||||||
= link_to t('.buttons.back_to_procedure'), instructeur_procedure_path(@procedure), class: 'button mr-1'
|
= link_to t('.buttons.back_to_procedure'), instructeur_procedure_path(@procedure), class: 'fr-btn fr-btn--secondary fr-mr-2w'
|
||||||
= form.submit t('.buttons.save'), class: "button primary"
|
= form.submit t('.buttons.save'), class: "fr-btn"
|
||||||
|
|
|
@ -134,14 +134,15 @@
|
||||||
- else
|
- else
|
||||||
%a.cell-link{ href: path }= status_badge(p.state)
|
%a.cell-link{ href: path }= status_badge(p.state)
|
||||||
|
|
||||||
%td.action-col.follow-col= render partial: 'dossier_actions',
|
%td.action-col.follow-col
|
||||||
locals: { procedure_id: @procedure.id,
|
%ul.inline.fr-btns-group.fr-btns-group--sm.fr-btns-group--inline.fr-btns-group--icon-right
|
||||||
dossier_id: p.dossier_id,
|
= render partial: 'dossier_actions', locals: { procedure_id: @procedure.id,
|
||||||
state: p.state,
|
dossier_id: p.dossier_id,
|
||||||
archived: p.archived,
|
state: p.state,
|
||||||
dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id),
|
archived: p.archived,
|
||||||
close_to_expiration: @statut == 'expirant',
|
dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id),
|
||||||
hidden_by_administration: @statut == 'supprimes_recemment' }
|
close_to_expiration: @statut == 'expirant',
|
||||||
|
hidden_by_administration: @statut == 'supprimes_recemment' }
|
||||||
|
|
||||||
= pagination
|
= pagination
|
||||||
- else
|
- else
|
||||||
|
|
Loading…
Reference in a new issue