diff --git a/app/dashboards/procedure_dashboard.rb b/app/dashboards/procedure_dashboard.rb index ed558de60..8191cb6e2 100644 --- a/app/dashboards/procedure_dashboard.rb +++ b/app/dashboards/procedure_dashboard.rb @@ -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 diff --git a/app/fields/mail_template_field.rb b/app/fields/mail_template_field.rb new file mode 100644 index 000000000..8d2e15a6f --- /dev/null +++ b/app/fields/mail_template_field.rb @@ -0,0 +1,7 @@ +require "administrate/field/base" + +class MailTemplateField < Administrate::Field::Base + def name + data.class::DISPLAYED_NAME + end +end diff --git a/app/views/fields/mail_template_field/_show.html.haml b/app/views/fields/mail_template_field/_show.html.haml new file mode 100644 index 000000000..e505a4989 --- /dev/null +++ b/app/views/fields/mail_template_field/_show.html.haml @@ -0,0 +1,7 @@ +%strong Sujet +%pre + = field.data.subject + +%strong Corps +%pre + = field.data.body