Sha256: fa94f16e5a1b7c23eb0a4e0dfe067a3acbd2808a774b56a18a93461241e8a5d6

Contents?: true

Size: 996 Bytes

Versions: 4

Compression:

Stored size: 996 Bytes

Contents

- photo_association_name = f.object.polygallery_settings[:association_names][:photos]
= f.input_field :title, :as => :hidden, :value => f.object.title
= f.input_field :galleryable_id, :as => :hidden
= f.input_field :galleryable_type, :as => :hidden

%h3.lead
  = link_to_add_association 'Add Photo', f, :photos, 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'}
  = f.object.title.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
      = f.simple_fields_for :photos do |pf| # photo_association_name do |pf|
        = render 'polygallery/photos/simple_fields_for', f: pf

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
polygallery-0.4.4 app/views/polygallery/galleries/_simple_fields_for.html.haml
polygallery-0.4.2 app/views/polygallery/galleries/_simple_fields_for.html.haml
polygallery-0.4.1 app/views/polygallery/galleries/_simple_fields_for.html.haml
polygallery-0.4.0 app/views/polygallery/galleries/_simple_fields_for.html.haml