Sha256: 9e801196735bc59ce60c63a471e88bb53d9cbe1e378041711eed26af60af0852

Contents?: true

Size: 1.53 KB

Versions: 3

Compression:

Stored size: 1.53 KB

Contents

- photo_association_name = gallery.polygallery_settings[:association_names][:photos]
= f.simple_fields_for gallery.title.to_sym do |ff|
  = ff.input_field :title, :as => :hidden, :value => gallery.title
  = ff.input_field :galleryable_id, :as => :hidden
  = ff.input_field :galleryable_type, :as => :hidden

  - if options[:label]
    %h3.lead
      = link_to_add_association 'Add Photo', ff, photo_association_name, :partial => 'polygallery/photos/simple_fields_for', :class => 'btn btn-default btn-sm pull-right', :data => {:association_insertion_node => "##{photo_association_name} .photo-receptacle", :association_insertion_method => 'append'}
      - if options[:label] == true
        = gallery.title.titleize
      - else
        = options[:label].titleize
  .polygallery-cocoon-table{:id => photo_association_name.to_s}
    %table.table.table-bordered.table-striped.table-condensed.polygallery-photos-table
      %thead
        %tr
          %th.text-center{:style => 'width:85px;'} Photo
          %th File
          %th.text-center Actions
      %tbody.photo-receptacle
        = ff.simple_fields_for photo_association_name do |pf|
          = render 'polygallery/photos/simple_fields_for', :f => pf

  -#- if !options[:label]
  -#  = ff.input_field :content, options[:input_html].merge({:as => :ckeditor})
  -#- else
    -#= ff.input :content, :as => :ckeditor, :label => options[:label].is_a?(String) ? options[:label] : name.to_s.titleize, :input_html => name.is_a?(String) ? options[:input_html].merge({:value => pb.content}) : options[:input_html]

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
polygallery-0.2.5 app/views/polygallery/galleries/_simple_fields_for.html.haml
polygallery-0.2.4 app/views/polygallery/galleries/_simple_fields_for.html.haml
polygallery-0.2.3 app/views/polygallery/galleries/_simple_fields_for.html.haml