Add attestation template to manager

This commit is contained in:
Mathieu Magnin 2019-03-06 14:43:04 +01:00
parent be30cb8e56
commit 97189cc3aa
3 changed files with 41 additions and 2 deletions

View file

@ -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

View file

@ -0,0 +1,4 @@
require "administrate/field/base"
class AttestationTemplateField < Administrate::Field::Base
end

View file

@ -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