feat(editable_champ.explication): show downloadable AttachedOne
This commit is contained in:
parent
37e8772eab
commit
f7feca5fd1
2 changed files with 4 additions and 0 deletions
|
@ -1,2 +1,4 @@
|
|||
class EditableChamp::ExplicationComponent < EditableChamp::EditableChampBaseComponent
|
||||
delegate :type_de_champ, to: :@champ
|
||||
delegate :notice_explicative, to: :type_de_champ
|
||||
end
|
||||
|
|
|
@ -8,3 +8,5 @@
|
|||
%button{ type: "button", "aria-controls": dom_id(@champ, :explanation), "aria-expanded": "false", href: dom_id(@champ, :explanation), class: "fr-btn ft-btn--sm fr-btn--secondary" } Lire plus
|
||||
.fr-collapse{ id: dom_id(@champ, :explanation) }
|
||||
= render SimpleFormatComponent.new(@champ.collapsible_explanation_text, allow_a: true)
|
||||
- if notice_explicative.attached?
|
||||
= render Dsfr::DownloadComponent.new(attachment: notice_explicative, virus_not_analyzed: !notice_explicative.virus_scanner.started?, new_tab: true)
|
Loading…
Add table
Reference in a new issue