Sha256: ddb1ed092435db67621aa92ba2d0af28d8666f5900168061b63e57b14ec54d04

Contents?: true

Size: 1.62 KB

Versions: 13

Compression:

Stored size: 1.62 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::EmailTemplate.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
    .field
      = f.label :can_unsubscribe
      = f.check_box :can_unsubscribe


    .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%' }

    .field
      = f.label :config_json
      = f.text_area :config_json

    .field
      = f.label :config_exe
      = f.text_area :config_exe

    .actions
      = f.submit 'Save'

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ish_manager-0.1.8.482 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.481 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.480 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.479 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.478 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.477 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.476 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.475 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.474 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.473 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.472 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.471 app/views/ish_manager/email_templates/_form.haml
ish_manager-0.1.8.470 app/views/ish_manager/email_templates/_form.haml