Merge pull request #9135 from demarches-simplifiees/add-link-notice-on-procedure-description-page
[refonte page accueil demarche] ajouter lien vers la notice
This commit is contained in:
commit
247194f6a9
13 changed files with 23 additions and 41 deletions
|
@ -90,14 +90,6 @@
|
|||
display: none !important;
|
||||
}
|
||||
|
||||
.visible-on-previous-hover {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
:hover + .visible-on-previous-hover {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
// sizing
|
||||
.width-100 {
|
||||
width: 100%;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
en:
|
||||
virus_not_analyzed: this file has not been scanned by our antivirus, download it with care
|
||||
errors:
|
||||
virus_infected: Virus detected, download is blocked.
|
||||
corrupted_file: The file is corrupted, the download is blocked.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
fr:
|
||||
virus_not_analyzed: ce fichier n’a pas été analysé par notre antivirus, téléchargez-le avec précaution
|
||||
errors:
|
||||
virus_infected: "Virus détecté, le téléchargement est bloqué."
|
||||
corrupted_file: "Le fichier est corrompu, le téléchargement est bloqué."
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
%div{ id: dom_id(attachment, :show), class: class_names("attachment-error": error?, "fr-mb-2w": !should_display_link?) }
|
||||
- if should_display_link?
|
||||
= render Dsfr::DownloadComponent.new(attachment: attachment, new_tab: new_tab) do |c|
|
||||
- if !attachment.virus_scanner.started?
|
||||
- c.right do
|
||||
= "(#{t(".virus_not_analyzed")})"
|
||||
= render Dsfr::DownloadComponent.new(attachment: attachment, virus_not_analyzed: !attachment.virus_scanner.started?, new_tab: new_tab)
|
||||
|
||||
- else
|
||||
.attachment-filename.fr-mb-1w.fr-mr-1w= attachment.filename.to_s
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
class Dsfr::DownloadComponent < ApplicationComponent
|
||||
renders_one :right
|
||||
|
||||
attr_reader :attachment
|
||||
attr_reader :html_class
|
||||
attr_reader :name
|
||||
attr_reader :ephemeral_link
|
||||
attr_reader :virus_not_analyzed
|
||||
attr_reader :new_tab
|
||||
|
||||
def initialize(attachment:, name: nil, url: nil, new_tab: false)
|
||||
def initialize(attachment:, name: nil, url: nil, ephemeral_link: false, virus_not_analyzed: false, new_tab: false)
|
||||
@attachment = attachment
|
||||
@name = name || attachment.filename.to_s
|
||||
@url = url
|
||||
@ephemeral_link = ephemeral_link
|
||||
@virus_not_analyzed = virus_not_analyzed
|
||||
@new_tab = new_tab
|
||||
end
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
en:
|
||||
title: "Download file %{filename}"
|
||||
ephemeral_link: This link is ephemeral and should not be shared.
|
||||
virus_not_analyzed: this file has not been scanned by our antivirus, download it with care
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
fr:
|
||||
title: "Télécharger le fichier %{filename}"
|
||||
ephemeral_link: Ce lien est éphémère et ne devrait pas être partagé.
|
||||
virus_not_analyzed: ce fichier n’a pas été analysé par notre antivirus, téléchargez-le avec précaution
|
||||
|
|
|
@ -4,5 +4,11 @@
|
|||
= name
|
||||
%span.fr-download__detail
|
||||
= helpers.download_details(attachment)
|
||||
- if ephemeral_link
|
||||
%span.fr-ml-2w.fr-text--xs.fr-text-mention--grey
|
||||
%span.fr-icon-questionnaire-line{ "aria-hidden": "true" }
|
||||
= t('.ephemeral_link')
|
||||
|
||||
= right
|
||||
- if virus_not_analyzed
|
||||
.fr-text--xs.fr-text-mention--grey
|
||||
= t('.virus_not_analyzed')
|
||||
|
|
|
@ -1,7 +1 @@
|
|||
= render Dsfr::DownloadComponent.new(attachment: champ.type_de_champ.piece_justificative_template, url: champs_piece_justificative_template_path(champ), name: "Modèle à télécharger") do |c|
|
||||
- if administrateur_signed_in?
|
||||
- c.with_right do
|
||||
%span.fr-ml-2w.fr-text--xs.fr-text-mention--grey.visible-on-previous-hover
|
||||
%span.fr-text-action-high--blue-france.fr-icon-questionnaire-line{ "aria-hidden": "true" }
|
||||
= t('shared.ephemeral_link')
|
||||
|
||||
= render Dsfr::DownloadComponent.new(attachment: champ.type_de_champ.piece_justificative_template, url: champs_piece_justificative_template_path(champ), name: "Modèle à télécharger", ephemeral_link: administrateur_signed_in? )
|
||||
|
|
|
@ -49,3 +49,7 @@
|
|||
= t('shared.procedure_description.estimated_fill_duration_title')
|
||||
#accordion-116.fr-collapse.js_description_target_audience
|
||||
= t('shared.procedure_description.estimated_fill_duration_detail', estimated_minutes: estimated_fill_duration_minutes(procedure))
|
||||
|
||||
- if notice_url(procedure).present?
|
||||
.fr-my-3w
|
||||
= render Dsfr::DownloadComponent.new(attachment: procedure.notice , url: notice_url(procedure), name: t("views.shared.dossiers.edit.notice"), ephemeral_link: administrateur_signed_in?)
|
||||
|
|
|
@ -17,18 +17,7 @@
|
|||
= t('views.shared.dossiers.edit.autosave')
|
||||
|
||||
- if notice_url(dossier.procedure).present?
|
||||
.fr-download
|
||||
%p
|
||||
= link_to notice_url(dossier.procedure), download: "", class: "fr-download__link mr-2", title: t("views.shared.dossiers.edit.notice_title") do
|
||||
= t("views.shared.dossiers.edit.notice")
|
||||
- if dossier.procedure.notice.attached?
|
||||
%span.fr-download__detail
|
||||
= download_details(dossier.procedure.notice)
|
||||
|
||||
- if administrateur_signed_in?
|
||||
%span.fr-text--xs.fr-text-mention--grey.visible-on-previous-hover
|
||||
%span.fr-text-action-high--blue-france.fr-icon-questionnaire-line{ "aria-hidden": "true" }
|
||||
= t('shared.ephemeral_link')
|
||||
= render Dsfr::DownloadComponent.new(attachment: dossier.procedure.notice , url: notice_url(dossier.procedure), name: t("views.shared.dossiers.edit.notice"), ephemeral_link: administrateur_signed_in?)
|
||||
|
||||
- if dossier.show_groupe_instructeur_selector?
|
||||
%span{ data: { controller: 'autosave' } }
|
||||
|
|
|
@ -331,7 +331,6 @@ en:
|
|||
edit:
|
||||
autosave: Your file is automatically saved after each modification. You can close the window at any time and pick up where you left off later.
|
||||
notice: "Download the notice of the procedure"
|
||||
notice_title: "To help you complete your file, you can consult the notice to this procedure."
|
||||
pending_correction:
|
||||
confirm_label: I certify that I have made all corrections requested by the administration.
|
||||
messages:
|
||||
|
@ -803,7 +802,6 @@ en:
|
|||
connection_done: "The accounts for FranceConnect and %{application_name} are now merged."
|
||||
merger_token_expired: "Le delay to merge your FranceConnect and %{application_name} accounts is expired. Please retry."
|
||||
shared:
|
||||
ephemeral_link: This link is ephemeral and should not be shared.
|
||||
procedures:
|
||||
stats:
|
||||
usual_processing_time: "Usual processing time"
|
||||
|
|
|
@ -331,7 +331,6 @@ fr:
|
|||
edit:
|
||||
autosave: Votre dossier est enregistré automatiquement après chaque modification. Vous pouvez à tout moment fermer la fenêtre et reprendre plus tard là où vous en étiez.
|
||||
notice: Télécharger le guide de la démarche
|
||||
notice_title: "Pour vous aider à remplir votre dossier, vous pouvez consulter le guide de cette démarche."
|
||||
pending_correction:
|
||||
confirm_label: Je certifie avoir effectué toutes les corrections demandées par l’administration.
|
||||
messages:
|
||||
|
@ -849,7 +848,6 @@ fr:
|
|||
connection_done: "Les comptes FranceConnect et %{application_name} sont à présent fusionnés"
|
||||
merger_token_expired: "Le délai pour fusionner les comptes FranceConnect et %{application_name} est expirée. Veuillez recommencer la procédure pour vous fusionner les comptes."
|
||||
shared:
|
||||
ephemeral_link: Ce lien est éphémère et ne devrait pas être partagé.
|
||||
procedures:
|
||||
stats:
|
||||
usual_processing_time: "Temps de traitement usuel"
|
||||
|
|
Loading…
Add table
Reference in a new issue