Add mail templates to manager
This commit is contained in:
parent
a6910d668e
commit
1dc2c30b24
3 changed files with 24 additions and 0 deletions
|
@ -29,6 +29,11 @@ class ProcedureDashboard < Administrate::BaseDashboard
|
|||
archived_at: Field::DateTime,
|
||||
whitelisted_at: Field::DateTime,
|
||||
service: Field::BelongsTo,
|
||||
initiated_mail_template: MailTemplateField,
|
||||
received_mail_template: MailTemplateField,
|
||||
closed_mail_template: MailTemplateField,
|
||||
refused_mail_template: MailTemplateField,
|
||||
without_continuation_mail_template: MailTemplateField,
|
||||
}.freeze
|
||||
|
||||
# COLLECTION_ATTRIBUTES
|
||||
|
@ -68,6 +73,11 @@ class ProcedureDashboard < Administrate::BaseDashboard
|
|||
:individual_with_siret,
|
||||
:auto_archive_on,
|
||||
:gestionnaires,
|
||||
:initiated_mail_template,
|
||||
:received_mail_template,
|
||||
:closed_mail_template,
|
||||
:refused_mail_template,
|
||||
:without_continuation_mail_template,
|
||||
].freeze
|
||||
|
||||
# FORM_ATTRIBUTES
|
||||
|
|
7
app/fields/mail_template_field.rb
Normal file
7
app/fields/mail_template_field.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
require "administrate/field/base"
|
||||
|
||||
class MailTemplateField < Administrate::Field::Base
|
||||
def name
|
||||
data.class::DISPLAYED_NAME
|
||||
end
|
||||
end
|
7
app/views/fields/mail_template_field/_show.html.haml
Normal file
7
app/views/fields/mail_template_field/_show.html.haml
Normal file
|
@ -0,0 +1,7 @@
|
|||
%strong Sujet
|
||||
%pre
|
||||
= field.data.subject
|
||||
|
||||
%strong Corps
|
||||
%pre
|
||||
= field.data.body
|
Loading…
Reference in a new issue