Sha256: 4a6027b6a5bb6ed78b039c628a40f269bf2a9f05bdca7e443acc2ae5624865c3

Contents?: true

Size: 726 Bytes

Versions: 4

Compression:

Stored size: 726 Bytes

Contents

.nested-fields
  %h5
    Content Slider
    = link_to_remove_association 'remove', f
  = f.select(:image_id, PagesCms::Image.all.collect {|p| [p.name, p.id] }, {include_blank: 'Choose a picture'}, class: 'form-control select2')
  = f.select(:link, PagesCms::Page.all.collect {|p| [p.title, p.slug] }, {include_blank: 'Choose a link'}, class: 'form-control select2')
  = f.text_field :header, placeholder: 'overlayed header', class: 'form-control'
  = f.number_field :order, placeholder: 'display order', class: 'form-control'

:javascript
  $('.select2').select2({
    tags: true,
    createTag: function (params) {
      return {
        id: params.term,
        text: params.term,
        newOption: true
      }
    }
  });

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pages_cms-1.0.3 app/views/pages_cms/admin/pages/_slider_fields.html.haml
pages_cms-1.0.2 app/views/pages_cms/admin/pages/_slider_fields.html.haml
pages_cms-1.0.1 app/views/pages_cms/admin/pages/_slider_fields.html.haml
pages_cms-1.0.0 app/views/pages_cms/admin/pages/_slider_fields.html.haml