Sha256: 8d279505c941cfb5304a5388c486016b0d40ba453f94064f7500fedc846b5536

Contents?: true

Size: 1.3 KB

Versions: 8

Compression:

Stored size: 1.3 KB

Contents

- unless parent.new_record?
  = content_for(:page_sidebar) do
    .page-sidebar__title
      Фотографии
      - if editable ||= false
        = link_to "ред.", [:admin, parent]

    %ul.photos.js-photos{ "data-sortable" => { items: :li, handle: nil, axis: nil, url: url_for([:sort, :admin, :redde_photos])}.to_json }
      = render partial: 'admin/redde_photos/photo', collection: parent.photos

    -#
      #preview
      #drag-n-drop{:style => "display: none; margin-top: 5px;"}
        #drop-zone.b-dropzone{style: 'height: 100px;', data: {"upload-url" => url_for([:admin, parent, :photos])}}
          .b-dropzone__bg
          .b-dropzone__txt Перетащите файлы сюда

      #buttons-panel{style: 'margin-bottom: 10px;'}
        .b-button.js-fileapi-wrapper
          .b-button__text Загрузить файлы
          %input.b-button__input.js-fileapi{:name => "files", :type => "file",  :multiple => true, data: {"upload-url" => url_for([:admin, parent, :photos])}}

    = form_for [:admin, parent.photos.build], html: { class: 'photos-uploader js-photos-uploader' } do |f|
      = f.hidden_field :imageable_type
      = f.hidden_field :imageable_id
      %span.sbm.photos-uploader__btn.icon-upload
        Загрузить
        = f.file_field :src, class: 'photos-uploader__inp'

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
redde-0.3.7 app/views/admin/redde_photos/_photos.haml
redde-0.3.6 app/views/admin/redde_photos/_photos.haml
redde-0.3.5 app/views/admin/redde_photos/_photos.haml
redde-0.3.4 app/views/admin/redde_photos/_photos.haml
redde-0.3.3 app/views/admin/redde_photos/_photos.haml
redde-0.3.2 app/views/admin/redde_photos/_photos.haml
redde-0.3.1 app/views/admin/redde_photos/_photos.haml
redde-0.3.0 app/views/admin/redde_photos/_photos.haml