demarches-normaliennes/app/views/admin/mail_templates/edit.html.haml

35 lines
1.2 KiB
Text
Raw Normal View History

- if params[:id] == 'closed_mail'
= render partial: 'admin/closed_mail_template_attestation_inconsistency_alert'
.white-back
%h3
= @mail_template.class.const_get(:DISPLAYED_NAME)
2017-03-06 16:52:07 +01:00
= simple_form_for @mail_template,
2017-04-04 15:28:39 +02:00
as: 'mail_template',
url: admin_procedure_mail_template_path(@procedure, @mail_template.class.const_get(:SLUG)),
method: :put do |f|
.row
.col-md-6
= f.input :subject, label: "Objet de l'email"
2017-04-06 19:10:25 +02:00
= f.input :body, label: "Corps de l'email", input_html: { class: 'wysihtml5' }
.text-right
= link_to "Annuler", admin_procedure_mail_templates_path(@procedure), class: "btn btn-default"
= f.button :submit, 'Mettre à jour', class: "btn-success"
= link_to "Prévisualiser", preview_procedure_mail_template_path(@procedure, @mail_template.class.const_get(:SLUG)), class: "btn btn-primary", target: "_blank"
.row
.col-md-12
%table.table
%tr
%th.col-md-3
Balise
%th
Description
- @mail_template.tags.each do |tag|
%tr
2018-03-14 16:16:18 +01:00
%td
%code{ style: "white-space: pre-wrap;" }
= "--#{tag[:libelle]}--"
%td
= tag[:description]