Sha256: a9d2dad27934584b5083c1fa8ed492f424c71fa56c1edbb0d0169a32fedd93c7

Contents?: true

Size: 1.31 KB

Versions: 4

Compression:

Stored size: 1.31 KB

Contents

- content_for :scripts do
  :javascript
    $(function() {
      FORGE.features.nestedFields.init('#photos', {
        after: function() {
          FORGE.features.nestedFields.reorganize(4, '#photos-list li');
          FORGE.features.nestedFields.setListOrder('#photos-list li');
        }
      });
      FORGE.features.nestedFields.reorganize(4, '#photos-list li');
    });

= error_messages_for :gallery

= form_for [:forge, @gallery], :builder => ForgeFormBuilder do |f|
  #form-header= f.title_field :title, :explanation => "Give your gallery a title.", :class => 'title'

  .inner-form
    #photos{:style => "padding: 20px 0px;"}
      %h3 Photos
      %p
        Add as many photos as you like to this gallery.  You can drag and drop to re-order them, or
        = add_child_link("add another one.", :photos)
        Any changes you make (adding, removing, replacing, or re-ordering) will not take effect until you click
        %strong Save.

        %ul#photos-list.sortable.attachment-list
          = f.fields_for :photos, @gallery.photos do |pf|
            = render :partial => "photo", :locals => {:f => pf}
        .spacer
        = new_child_fields_template(f, :photos, :partial => "photo")

  #item-list-bottom
    .float-right
      Everything look good?
      = button_link "Save", "javascript:;", :class => "submit button"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
forge-cli-0.1.10 lib/forge/app/views/forge/galleries/_form.html.haml
forge-cli-0.1.9 lib/forge/app/views/forge/galleries/_form.html.haml
forge-cli-0.1.8 lib/forge/app/views/forge/galleries/_form.html.haml
forge-cli-0.1.7 lib/forge/app/views/forge/galleries/_form.html.haml