Sha256: f54de72aa8543a8d9ccf31583d6383bc97564c08794f66311bd777f899e08a3b

Contents?: true

Size: 1.35 KB

Versions: 60

Compression:

Stored size: 1.35 KB

Contents

- content_for :sidebar do
  .sidebar
    .content
      %h2 Galleries
      = link_to "New Gallery", new_gallery_path, class: 'btn btn-block btn-primary'

= error_messages_for :gallery

= autosaving_form_for @gallery do |f|
  .fields.large
    .form-group
      = f.text_field :title

    .form-group
      %p
        = link_to_add_association "Add another photo", f, :photos, 'data-association-insertion-node' => '#photo-list', 'data-association-insertion-method' => 'append'
        = link_to 'Add several', new_item_asset_path(multiple: true), class: 'btn btn-comp browse', data: {'modal-remote' => true, 'modal-title' => "Select file", 'modal-handler' => 'Tenon.features.MultipleAssetAttachment', target: '.asset-fields' }

      %ul.nested-field-list.sortable#photo-list
        = f.nested_fields :photo

  .fields.small
    %h4.box-label Publish
    .box
      .content
        - if can?(:publish, @gallery)
          = f.submit 'Save', class: 'btn btn-block btn-comp'

        - if can?(:create, Tenon::ItemVersion)
          = save_draft_button(@gallery)
          .last-autosave

      %hr
      .content
        = clear_draft_link if params[:version]
        = load_draft_link(@gallery)
        - if @gallery.persisted?
          = link_to "Delete", @gallery, :data => {:method => :delete, :confirm => "Are you sure you want to delete this?"}, :class => 'delete-link'

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
tenon-1.0.67 app/views/tenon/galleries/_form.html.haml
tenon-1.0.66 app/views/tenon/galleries/_form.html.haml
tenon-1.0.65 app/views/tenon/galleries/_form.html.haml
tenon-1.0.64 app/views/tenon/galleries/_form.html.haml
tenon-1.0.63 app/views/tenon/galleries/_form.html.haml
tenon-1.0.62 app/views/tenon/galleries/_form.html.haml
tenon-1.0.61 app/views/tenon/galleries/_form.html.haml
tenon-1.0.60 app/views/tenon/galleries/_form.html.haml
tenon-1.0.59 app/views/tenon/galleries/_form.html.haml
tenon-1.0.57 app/views/tenon/galleries/_form.html.haml
tenon-1.0.56 app/views/tenon/galleries/_form.html.haml
tenon-1.0.55 app/views/tenon/galleries/_form.html.haml
tenon-1.0.54 app/views/tenon/galleries/_form.html.haml
tenon-1.0.53 app/views/tenon/galleries/_form.html.haml
tenon-1.0.52 app/views/tenon/galleries/_form.html.haml
tenon-1.0.51 app/views/tenon/galleries/_form.html.haml
tenon-1.0.50 app/views/tenon/galleries/_form.html.haml
tenon-1.0.49 app/views/tenon/galleries/_form.html.haml
tenon-1.0.48 app/views/tenon/galleries/_form.html.haml
tenon-1.0.47 app/views/tenon/galleries/_form.html.haml