Sha256: 654ec6b6205f4b680f3bd5d8c843fea08ee3110033670b7036fda72d4353eed1

Contents?: true

Size: 1.37 KB

Versions: 9

Compression:

Stored size: 1.37 KB

Contents

- url = email_template.new_record? ? email_templates_path : email_template_path(email_template.id)

.email-templates--form
  = form_for email_template, url: url do |f|
    .row
      .col-md-4
        .field
          = f.label :slug
          = f.text_field :slug
      .col-md-4
        .field
          = f.label :layout
          = f.select :layout, options_for_select(Ish::EmailTemplate::LAYOUTS, selected: email_template.layout)
      .col-md-4
        .field
          = f.label "From"
          = f.select :from_email, options_for_select(Ish::EmailContext.from_email_list, selected: email_template.from_email)
    .field.field-subject
      = f.label :subject
      = f.text_field :subject
    .field
      = f.label :preview_str
      = f.text_field :preview_str

    .tab-labels
      %a.label-raw{ href: "javascript: void(0)", data: { ref: '.tab-raw' } } Raw
      %a.label-preview.active{ href: "javascript: void(0)", data: { ref: '.tab-preview' } } Preview
      .label-save-preview= f.submit 'Save & Preview'
    .tabs
      .tab-raw
        = f.text_area :body
      .tab-preview
        - if email_template.persisted?
          -# .descr= render "ish_manager/email_templates/#{email_template.layout}", ctx: Ish::EmailContext.new, tmpl: email_template
          %iframe{ src: email_template_iframe_path(email_template), width: '100%', height: '100%' }
    .actions
      = f.submit 'Save'

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ish_manager-0.1.8.385 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.384 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.383 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.382 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.381 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.380 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.379 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.378 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.377 app/views/ish_manager/email_templates/_form.haml