Sha256: ccebbe9009923f5facca66c79ac513ad3abb7c13ed7bd1ff7ea445963d8ab292

Contents?: true

Size: 1.69 KB

Versions: 8

Compression:

Stored size: 1.69 KB

Contents

= form_for @location do |f|
  = f.error_messages
  = tabs do

    = tab :content do
      .field
        = f.label :name
        = f.text_field :name

      .field
        = f.label :body
        = f.text_area :body, class: 'ckeditor'

    = tab :seo, 'SEO' do
      = render 'c/admin/seo', f: f

    = tab :media do
      .reorderable
        = f.fields_for :images, f.object.images.sort_by(&:weight) do |f|
          .fields_for.columns{class: ('not_persisted' if f.object.image_cache.present?)}
            = f.hidden_field :image_cache
            = f.hidden_field :weight, class: 'order_field'
            .column
              .sort_handle= fa_icon('ellipsis-v')

            .column
              .image_preview
                = image_tag f.object.image.preview
            .column
              .field
                = f.label :alt
                = f.text_field :alt
            .column
              .field
                = f.label :caption
                = f.text_field :caption
            .column
              .field
                = f.label :_destroy, 'Delete Image?'
                = f.check_box :_destroy, class: '_destroy'

      = f.label :new_images
      - if @location.new_record?
        = f.file_field :new_images, multiple: true
      - else
        = f.file_field :new_images, multiple: true, data: {auto_submit: :upload}
        = button_tag 'Upload', name: :commit, value: :upload

    = tab :publish do
      .field
        = f.label :published do
          = f.check_box :published
          %span Publish Page


  .actions.form-page__actions
    = f.submit class: 'btn'
    = link_to_delete 'Delete', @location, redirection: locations_path, class: 'btn btn--secondary' unless @location.new_record?

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cd2_catton_cms-1.1.35 app/views/c/admin/locations/_form.html.haml
cd2_catton_cms-1.1.34 app/views/c/admin/locations/_form.html.haml
cd2_catton_cms-1.1.33 app/views/c/admin/locations/_form.html.haml
cd2_catton_cms-1.1.32 app/views/c/admin/locations/_form.html.haml
cd2_catton_cms-1.1.31 app/views/c/admin/locations/_form.html.haml
cd2_catton_cms-1.1.30 app/views/c/admin/locations/_form.html.haml
cd2_catton_cms-1.1.20 app/views/c/admin/locations/_form.html.haml
cd2_catton_cms-1.1.10 app/views/c/admin/locations/_form.html.haml