Sha256: 2ed365b308bf46404c90cd4aba9019b0c198afba30dccc813fbcf9b0c98615e4

Contents?: true

Size: 1.39 KB

Versions: 6

Compression:

Stored size: 1.39 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: '.tn-tc-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', data: { disable_with: "Please wait..." }

        - 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

6 entries across 6 versions & 1 rubygems

Version Path
tenon-1.1.4 app/views/tenon/galleries/_form.html.haml
tenon-1.1.3 app/views/tenon/galleries/_form.html.haml
tenon-1.1.2 app/views/tenon/galleries/_form.html.haml
tenon-1.1.1 app/views/tenon/galleries/_form.html.haml
tenon-1.0.76 app/views/tenon/galleries/_form.html.haml
tenon-1.0.75 app/views/tenon/galleries/_form.html.haml