Merge pull request #2492 from betagouv/frederic/fix-1946/show-retention-time-to-users
[#1946] Show data retention time in footer
This commit is contained in:
commit
acfbba69c6
4 changed files with 16 additions and 6 deletions
|
@ -22,6 +22,7 @@ footer {
|
|||
.footer-columns {
|
||||
@extend %horizontal-list;
|
||||
justify-content: flex-start;
|
||||
margin: 0 -20px;
|
||||
}
|
||||
|
||||
.footer-column {
|
||||
|
@ -29,7 +30,9 @@ footer {
|
|||
font-size: 14px;
|
||||
vertical-align: top;
|
||||
flex-grow: 1;
|
||||
min-width: 320px;
|
||||
min-width: 280px;
|
||||
margin: 0 20px;
|
||||
margin-bottom: 20px;
|
||||
|
||||
@media (max-width: 1000px) {
|
||||
width: 100%;
|
||||
|
|
|
@ -7,13 +7,13 @@ module ConservationDeDonneesHelper
|
|||
|
||||
def conservation_dans_ds(procedure)
|
||||
if procedure.duree_conservation_dossiers_dans_ds.present?
|
||||
"dans demarches-simplifiees.fr #{procedure.duree_conservation_dossiers_dans_ds} mois après le début de l’instruction du dossier"
|
||||
"Dans demarches-simplifiees.fr : #{procedure.duree_conservation_dossiers_dans_ds} mois"
|
||||
end
|
||||
end
|
||||
|
||||
def conservation_hors_ds(procedure)
|
||||
if procedure.duree_conservation_dossiers_hors_ds.present?
|
||||
"hors demarches-simplifiees.fr pendant #{procedure.duree_conservation_dossiers_hors_ds} mois"
|
||||
"Par l’administration : #{procedure.duree_conservation_dossiers_hors_ds} mois"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -29,6 +29,13 @@
|
|||
%p
|
||||
Horaires : #{ service.horaires.sub(/\S/, &:downcase) }
|
||||
|
||||
- politiques = politiques_conservation_de_donnees(dossier.procedure)
|
||||
- if politiques.present?
|
||||
%li.footer-column
|
||||
%h3.footer-header Conservation des données :
|
||||
- politiques.each do |politique|
|
||||
%p= politique
|
||||
|
||||
.footer-bottom-line
|
||||
= link_to "Accessibilité", accessibilite_index_path, :class => "footer-link"
|
||||
–
|
||||
|
|
|
@ -10,21 +10,21 @@ RSpec.describe ConservationDeDonneesHelper, type: :helper do
|
|||
let(:dans_ds) { 3 }
|
||||
let(:hors_ds) { 6 }
|
||||
|
||||
it { is_expected.to eq([ "dans demarches-simplifiees.fr 3 mois après le début de l’instruction du dossier", "hors demarches-simplifiees.fr pendant 6 mois" ]) }
|
||||
it { is_expected.to eq([ "Dans demarches-simplifiees.fr : 3 mois", "Par l’administration : 6 mois" ]) }
|
||||
end
|
||||
|
||||
context "when only in-app retention time is set" do
|
||||
let(:dans_ds) { 3 }
|
||||
let(:hors_ds) { nil }
|
||||
|
||||
it { is_expected.to eq([ "dans demarches-simplifiees.fr 3 mois après le début de l’instruction du dossier" ]) }
|
||||
it { is_expected.to eq([ "Dans demarches-simplifiees.fr : 3 mois" ]) }
|
||||
end
|
||||
|
||||
context "when only out of app retention time is set" do
|
||||
let(:dans_ds) { nil }
|
||||
let(:hors_ds) { 6 }
|
||||
|
||||
it { is_expected.to eq([ "hors demarches-simplifiees.fr pendant 6 mois" ]) }
|
||||
it { is_expected.to eq([ "Par l’administration : 6 mois" ]) }
|
||||
end
|
||||
|
||||
context "when the retention time is not set" do
|
||||
|
|
Loading…
Reference in a new issue