Merge pull request #5415 from betagouv/scroll-padding

Added scroll-padding property for pages with sticky-bottoms
This commit is contained in:
jpoulvel 2020-07-29 15:47:17 +02:00 committed by GitHub
commit eff6f9c09c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 67 additions and 2 deletions

View file

@ -132,7 +132,8 @@ linters:
PropertySpelling:
enabled: true
extra_properties: []
extra_properties:
- scroll-padding
disabled_properties: []
# To enable later

View file

@ -69,3 +69,6 @@
bottom: 0;
}
html.scroll-margins-for-sticky-footer {
scroll-padding: 0 0 100px 0;
}

View file

@ -1,5 +1,5 @@
!!! 5
%html{ lang: "fr" }
%html{ lang: "fr", class: yield(:root_class) }
%head
%meta{ "http-equiv": "Content-Type", content: "text/html; charset=UTF-8" }
%meta{ "http-equiv": "X-UA-Compatible", content: "IE=edge" }

View file

@ -0,0 +1,56 @@
- content_for(:root_class, 'scroll-margins-for-sticky-footer')
= render partial: 'new_administrateur/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
'Attestation'] }
.procedure-form#attestation-template-edit
.procedure-form__columns.container
= form_for @attestation_template,
url: url_for({ controller: 'new_administrateur/attestation_templates', action: :update, id: @procedure.id }),
multipart: true,
html: { class: 'form procedure-form__column--form' } do |f|
%h1.page-title
Délivrance dattestation
- if @attestation_template.activated?
%span.text-active activée
- else
%span.text-inactive désactivée
- if @attestation_template.activated && @procedure.locked?
.card.warning
%p Lattestation ne peut plus être désactivée car la démarche est publiée.
%p.notice
Lattestation, si elle est activée, est émise au moment où un dossier est accepté.
%br
Lemail daccusé dacceptation envoyé à lusager comporte alors un lien vers lattestation ;
celle-ci est également disponible au téléchargement depuis lespace personnel de lusager.
= render partial: 'new_administrateur/attestation_templates/informations', locals: { f: f }
.procedure-form__actions.sticky--bottom
.actions-left
-# Admins cannot disactivate the Attestation if it is activated and the procedure is published
- if !(@attestation_template.activated && @procedure.locked?)
%label.toggle-switch
= f.check_box :activated, class: 'toggle-switch-checkbox'
%span.toggle-switch-control.round
%span.toggle-switch-label.on Attestation activée
%span.toggle-switch-label.off Attestation désactivée
.actions-right
= link_to 'Annuler', edit_admin_procedure_attestation_template_path(id: @procedure), class: 'button', data: { confirm: 'Êtes-vous sûr de vouloir annuler les modifications effectuées ?'}
= f.button 'Enregistrer', class: 'button primary send'
.procedure-form__column--preview
.procedure-form__preview.sticky--top
%h3
.procedure-form__preview-title
Aperçu
.notice
Cet aperçu est mis à jour après chaque sauvegarde.
.procedure-preview
= render partial: 'new_administrateur/attestation_templates/apercu', locals: { procedure: @procedure }

View file

@ -1,3 +1,5 @@
- content_for(:root_class, 'scroll-margins-for-sticky-footer')
= render partial: 'new_administrateur/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path),
link_to(@procedure.libelle, admin_procedure_path(@procedure)),

View file

@ -1,3 +1,5 @@
- content_for(:root_class, 'scroll-margins-for-sticky-footer')
= render partial: 'new_administrateur/breadcrumbs',
locals: { steps: [link_to('Démarches', admin_procedures_path),
'Nouvelle'] }

View file

@ -1,3 +1,4 @@
- content_for(:root_class, 'scroll-margins-for-sticky-footer')
- content_for(:title, "Modification du brouillon nº #{@dossier.id} (#{@dossier.procedure.libelle})")
- content_for :footer do