Sha256: f29a561d0c43993d79505ec5ff9aba08ebeb77d7c63287aebb4ac6a94318dc0d

Contents?: true

Size: 1.41 KB

Versions: 1

Compression:

Stored size: 1.41 KB

Contents

= f.simple_fields_for gallery.title.to_sym do |ff|
  = ff.input_field :title, :as => :hidden, :value => gallery.title

  - if options[:label]
    %h3.lead
      = link_to_add_association 'Add Photo', ff, gallery.class.polygallery_settings[:association_names][:photos], :partial => 'polygallery/photos/simple_fields_for', :class => 'btn btn-default btn-sm pull-right', :data => {:association_insertion_node => '.photo-receptacle', :association_insertion_method => 'append'}
      - if options[:label] == true
        = gallery.title.titleize
      - else
        = options[:label].titleize
  .polygallery-cocoon-table{:id => gallery.class.polygallery_settings[:association_names][:photos].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 :photos do |pf|
          = render :partial => 'polygallery/photos/simple_fields_for', :locals => {: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

1 entries across 1 versions & 1 rubygems

Version Path
polygallery-0.1.2 app/views/polygallery/galleries/_simple_fields_for.html.haml