Sha256: bb468f4d6da8167b055d04e782eb7a0491a4ef1f53ec05bce88b14fdf5304b9d

Contents?: true

Size: 1.4 KB

Versions: 48

Compression:

Stored size: 1.4 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
        .flex-row
          = f.label :layout
          = f.select :layout, options_for_select(Ish::EmailTemplate::LAYOUTS, selected: email_template.layout), {}, class: 'select2'
      .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

48 entries across 48 versions & 1 rubygems

Version Path
ish_manager-0.1.8.468 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.467 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.466 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.465 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.464 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.463 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.462 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.461 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.460 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.459 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.458 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.457 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.456 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.455 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.454 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.453 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.452 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.451 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.450 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.449 app/views/ish_manager/email_templates/_form.haml