tech(review): add missing sticky behaviour to summary for instructeur
Co-Authored-By: LeSim <mail@simon.lehericey.net>
This commit is contained in:
parent
d46dc7055d
commit
2f6772c879
4 changed files with 10 additions and 6 deletions
|
@ -5,9 +5,13 @@ class TypesDeChampEditor::HeaderSectionsSummaryComponent < ApplicationComponent
|
|||
end
|
||||
|
||||
def header_sections
|
||||
@procedure.draft_revision
|
||||
.send(@is_private ? :revision_types_de_champ_private : :revision_types_de_champ_public)
|
||||
.filter { _1.type_de_champ.header_section? }
|
||||
coordinates = if @is_private
|
||||
@procedure.draft_revision.revision_types_de_champ_private
|
||||
else
|
||||
@procedure.draft_revision.revision_types_de_champ_public
|
||||
end
|
||||
|
||||
coordinates.filter { _1.type_de_champ.header_section? }
|
||||
end
|
||||
|
||||
def href(header_section) # used by type de champ editor to anchor elements
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#summary
|
||||
#summary{ class: header_sections.present? ? 'fr-col-12 fr-col-md-3' : '' }
|
||||
- if header_sections.present?
|
||||
%nav.fr-sidemenu.sticky.fr-hidden.fr-unhidden-md{ "aria-labelledby" => "fr-summary-title", role: "navigation" }
|
||||
%ul.fr-sidemenu__list
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
#dossier-annotations-privees
|
||||
.fr-container
|
||||
.fr-grid-row.fr-grid-row--center
|
||||
.fr-col-md-3= render ViewableChamp::HeaderSectionsSummaryComponent.new(dossier: @dossier, is_private: true)
|
||||
= render ViewableChamp::HeaderSectionsSummaryComponent.new(dossier: @dossier, is_private: true)
|
||||
.fr-col-md-9
|
||||
= render partial: "shared/dossiers/edit_annotations", locals: { dossier: @dossier, seen_at: @annotations_privees_seen_at }
|
||||
|
|
|
@ -16,6 +16,6 @@
|
|||
|
||||
.fr-container
|
||||
.fr-grid-row.fr-grid-row--center
|
||||
.fr-col-md-3= render ViewableChamp::HeaderSectionsSummaryComponent.new(dossier: @dossier, is_private: false)
|
||||
= render ViewableChamp::HeaderSectionsSummaryComponent.new(dossier: @dossier, is_private: false)
|
||||
.fr-col-md-9
|
||||
= render partial: "shared/dossiers/demande", locals: { dossier: @dossier, demande_seen_at: @demande_seen_at, profile: 'instructeur' }
|
||||
|
|
Loading…
Reference in a new issue