diff --git a/app/dashboards/procedure_dashboard.rb b/app/dashboards/procedure_dashboard.rb index 7e2b0df69..f56e6abed 100644 --- a/app/dashboards/procedure_dashboard.rb +++ b/app/dashboards/procedure_dashboard.rb @@ -35,7 +35,8 @@ class ProcedureDashboard < Administrate::BaseDashboard received_mail_template: MailTemplateField, closed_mail_template: MailTemplateField, refused_mail_template: MailTemplateField, - without_continuation_mail_template: MailTemplateField + without_continuation_mail_template: MailTemplateField, + attestation_template: AttestationTemplateField }.freeze # COLLECTION_ATTRIBUTES @@ -81,7 +82,8 @@ class ProcedureDashboard < Administrate::BaseDashboard :received_mail_template, :closed_mail_template, :refused_mail_template, - :without_continuation_mail_template + :without_continuation_mail_template, + :attestation_template ].freeze # FORM_ATTRIBUTES diff --git a/app/fields/attestation_template_field.rb b/app/fields/attestation_template_field.rb new file mode 100644 index 000000000..850d35d3d --- /dev/null +++ b/app/fields/attestation_template_field.rb @@ -0,0 +1,4 @@ +require "administrate/field/base" + +class AttestationTemplateField < Administrate::Field::Base +end diff --git a/app/views/fields/attestation_template_field/_show.html.haml b/app/views/fields/attestation_template_field/_show.html.haml new file mode 100644 index 000000000..60df84e18 --- /dev/null +++ b/app/views/fields/attestation_template_field/_show.html.haml @@ -0,0 +1,33 @@ +- if field.data + %strong Activée + %p + = field.data.activated + + %strong Logo + %p + - if field.data.logo.present? + = image_tag field.data.logo.url + - else + Aucun + + %strong Titre + %pre{ style: "white-space: pre-wrap;" } + = field.data.title + + %strong Corps + %pre{ style: "white-space: pre-wrap;" } + = field.data.body + + %strong Signature + %p + - if field.data.signature.present? + = image_tag field.data.signature.url + - else + Aucun + + %strong Pied de page + %pre{ style: "white-space: pre-wrap;" } + = field.data.footer + +- else + Aucun modèle d'attestation