Sha256: 15b37346e1124596068d71712f1e55a73076440216a87169a4f39a50e147eedb

Contents?: true

Size: 1.87 KB

Versions: 13

Compression:

Stored size: 1.87 KB

Contents

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

.email-templates--form
  = form_for email_template, as: :template, url: url do |f|
    .field
      %label Slug
      = f.text_field :slug
    .flex-row
      %label Layout
      = f.select :layout, options_for_select(WcoEmail::EmailTemplate::LAYOUTS, selected: email_template.layout), {}, class: 'select2'
      %label From
      = f.select :from_email, options_for_select(WcoEmail::EmailTemplate.from_emails_list, selected: email_template.from_email), {}, class: 'select2'
    .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.flex-row
      %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
        -## 2024-01-xx No class tinymce, cannot have tinymce mess with my own templating.
        -## 2024-02-05 re-addedd tinymce
        -##            ah! I meant, erb templates are ruined by summernote.
        = f.text_area :body

      .tab-preview
        - if email_template.persisted?
          %iframe{ src: email_template_iframe_path(email_template), width: '100%', height: '100%' }
    - if email_template.persisted?
      .gray.mini= link_to email_template_iframe_path(email_template), email_template_iframe_path(email_template), target: :_blank

    .row
      .col-md-6
        .field
          = f.label :config_json
          = f.text_area :config_json
      .col-md-6
        .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
wco_email-0.1.1.65 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.64 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.63 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.62 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.61 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.60 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.59 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.58 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.56 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.55 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.54 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.53 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.52 app/views/wco_email/email_templates/_form.haml