Add attestation template to manager
This commit is contained in:
parent
be30cb8e56
commit
97189cc3aa
3 changed files with 41 additions and 2 deletions
|
@ -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
|
||||
|
|
4
app/fields/attestation_template_field.rb
Normal file
4
app/fields/attestation_template_field.rb
Normal file
|
@ -0,0 +1,4 @@
|
|||
require "administrate/field/base"
|
||||
|
||||
class AttestationTemplateField < Administrate::Field::Base
|
||||
end
|
33
app/views/fields/attestation_template_field/_show.html.haml
Normal file
33
app/views/fields/attestation_template_field/_show.html.haml
Normal 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
|
Loading…
Reference in a new issue