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 {
|
||||
width: 200px;
|
||||
.fr-btn {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,32 +1,31 @@
|
|||
%span.dropdown.print-menu-opener{ data: { controller: 'menu-button' } }
|
||||
%button.button.dropdown-button.icon-only{ title: 'imprimer', 'aria-label': 'imprimer', data: { menu_button_target: 'button' } }
|
||||
%span.icon.printer
|
||||
%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?
|
||||
%ul.fr-btns-group.fr-btns-group--sm.fr-btns-group--inline-md.fr-btns-group--icon-right
|
||||
%li.dropdown.print-menu-opener{ data: { controller: 'menu-button' } }
|
||||
%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' } }
|
||||
%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' } }
|
||||
%button.button.dropdown-button.icon-only{ data: { menu_button_target: 'button' } }
|
||||
%span.icon.attached
|
||||
%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.dropdown.print-menu-opener{ data: { controller: 'menu-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
|
||||
%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"
|
||||
|
||||
= render partial: "instructeurs/procedures/dossier_actions",
|
||||
locals: { procedure_id: dossier.procedure.id,
|
||||
dossier_id: dossier.id,
|
||||
state: dossier.state,
|
||||
archived: dossier.archived,
|
||||
dossier_is_followed: current_instructeur&.follow?(dossier),
|
||||
close_to_expiration: dossier.close_to_expiration?,
|
||||
hidden_by_administration: dossier.hidden_by_administration? }
|
||||
%li
|
||||
= render partial: "instructeurs/procedures/dossier_actions",
|
||||
locals: { procedure_id: dossier.procedure.id,
|
||||
dossier_id: dossier.id,
|
||||
state: dossier.state,
|
||||
archived: dossier.archived,
|
||||
dossier_is_followed: current_instructeur&.follow?(dossier),
|
||||
close_to_expiration: dossier.close_to_expiration?,
|
||||
hidden_by_administration: dossier.hidden_by_administration? }
|
||||
|
||||
|
||||
.state-button
|
||||
= render partial: "state_button", locals: { dossier: dossier }
|
||||
%li.state-button
|
||||
= render partial: "state_button", locals: { dossier: dossier }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.dropdown{ data: { controller: 'menu-button', popover: 'true' } }
|
||||
-# 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
|
||||
|
||||
-# Dropdown content
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
- 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')
|
||||
- elsif close_to_expiration || Dossier::TERMINE.include?(state)
|
||||
.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
|
||||
.dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' }, id: "dossier_#{dossier_id}_actions_menu" }
|
||||
%ul.dropdown-items
|
||||
|
@ -33,10 +33,8 @@
|
|||
|
||||
- elsif Dossier::EN_CONSTRUCTION_OU_INSTRUCTION.include?(state)
|
||||
- if dossier_is_followed
|
||||
= link_to unfollow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'button' do
|
||||
%span.icon.unfollow>
|
||||
= link_to unfollow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'fr-btn fr-btn--secondary fr-icon-star-fill' do
|
||||
= t('views.instructeurs.dossiers.stop_follow')
|
||||
- else
|
||||
= link_to follow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'button' do
|
||||
%span.icon.follow>
|
||||
= link_to follow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'fr-btn fr-btn--secondary fr-icon-star-line' do
|
||||
= t('views.instructeurs.dossiers.follow_file')
|
||||
|
|
|
@ -89,5 +89,5 @@
|
|||
= t('.utils.negative')
|
||||
|
||||
.send-wrapper
|
||||
= link_to t('.buttons.back_to_procedure'), instructeur_procedure_path(@procedure), class: 'button mr-1'
|
||||
= form.submit t('.buttons.save'), class: "button primary"
|
||||
= 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: "fr-btn"
|
||||
|
|
|
@ -134,14 +134,15 @@
|
|||
- else
|
||||
%a.cell-link{ href: path }= status_badge(p.state)
|
||||
|
||||
%td.action-col.follow-col= render partial: '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' }
|
||||
%td.action-col.follow-col
|
||||
%ul.inline.fr-btns-group.fr-btns-group--sm.fr-btns-group--inline.fr-btns-group--icon-right
|
||||
= render partial: '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' }
|
||||
|
||||
= pagination
|
||||
- else
|
||||
|
|
Loading…
Reference in a new issue