2018-04-03 14:22:53 +02:00
|
|
|
- if params[:id] == 'closed_mail'
|
|
|
|
= render partial: 'admin/closed_mail_template_attestation_inconsistency_alert'
|
2017-01-24 14:36:43 +01:00
|
|
|
.white-back
|
|
|
|
%h3
|
2017-03-06 23:18:16 +01:00
|
|
|
= @mail_template.class.const_get(:DISPLAYED_NAME)
|
2017-01-24 14:36:43 +01:00
|
|
|
|
2019-10-08 10:57:35 +02:00
|
|
|
= form_for @mail_template,
|
2017-04-04 15:28:39 +02:00
|
|
|
as: 'mail_template',
|
2017-05-27 00:52:32 +02:00
|
|
|
url: admin_procedure_mail_template_path(@procedure, @mail_template.class.const_get(:SLUG)),
|
2017-03-05 11:05:28 +01:00
|
|
|
method: :put do |f|
|
2017-01-24 14:36:43 +01:00
|
|
|
.row
|
|
|
|
.col-md-6
|
2019-10-08 10:57:35 +02:00
|
|
|
.form-group.string.optional.mail_template_subject
|
|
|
|
= f.label :subject, "Objet de l'email", class: 'control-label string optional'
|
|
|
|
= f.text_field :subject, class: 'form-control string optional'
|
|
|
|
|
|
|
|
.form-group.text.optional.mail_template_body
|
|
|
|
= f.label :body, "Corps de l'email", class: 'control-label string optional'
|
|
|
|
= f.text_area :body, class: 'wysihtml5 form-control text optional'
|
|
|
|
|
2017-01-24 14:36:43 +01:00
|
|
|
.text-right
|
|
|
|
= link_to "Annuler", admin_procedure_mail_templates_path(@procedure), class: "btn btn-default"
|
2019-10-08 10:57:35 +02:00
|
|
|
= f.submit 'Mettre à jour', class: "btn btn-default btn-success"
|
2019-03-14 14:58:01 +01:00
|
|
|
= link_to "Prévisualiser", preview_procedure_mail_template_path(@procedure, @mail_template.class.const_get(:SLUG)), class: "btn btn-primary", target: "_blank"
|
2017-01-24 14:36:43 +01:00
|
|
|
|
|
|
|
.row
|
2017-05-03 11:50:02 +02:00
|
|
|
.col-md-12
|
2017-01-24 14:36:43 +01:00
|
|
|
%table.table
|
|
|
|
%tr
|
2017-05-03 11:50:02 +02:00
|
|
|
%th.col-md-3
|
2017-01-24 14:36:43 +01:00
|
|
|
Balise
|
|
|
|
%th
|
|
|
|
Description
|
2017-12-22 21:33:04 +01:00
|
|
|
- @mail_template.tags.each do |tag|
|
2017-01-24 14:36:43 +01:00
|
|
|
%tr
|
2018-03-14 16:16:18 +01:00
|
|
|
%td
|
2018-03-14 16:16:06 +01:00
|
|
|
%code{ style: "white-space: pre-wrap;" }
|
|
|
|
= "--#{tag[:libelle]}--"
|
2017-01-24 14:36:43 +01:00
|
|
|
%td
|
2017-05-27 00:43:47 +02:00
|
|
|
= tag[:description]
|