Sha256: 3edda79ff370657dd5466029f2fae72b599fa58a61c1d542ea0fbc74075e375b

Contents?: true

Size: 1.26 KB

Versions: 16

Compression:

Stored size: 1.26 KB

Contents

- unless parent.new_record?
  = page_sidebar raw("Фотографии ").concat(if editable ||= false then link_to("ред.", [:admin, parent]) end) do
    %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

16 entries across 16 versions & 1 rubygems

Version Path
redde-0.3.23 app/views/admin/redde_photos/_photos.haml
redde-0.3.22 app/views/admin/redde_photos/_photos.haml
redde-0.3.21 app/views/admin/redde_photos/_photos.haml
redde-0.3.20 app/views/admin/redde_photos/_photos.haml
redde-0.3.19 app/views/admin/redde_photos/_photos.haml
redde-0.3.18 app/views/admin/redde_photos/_photos.haml
redde-0.3.17 app/views/admin/redde_photos/_photos.haml
redde-0.3.16 app/views/admin/redde_photos/_photos.haml
redde-0.3.15 app/views/admin/redde_photos/_photos.haml
redde-0.3.14 app/views/admin/redde_photos/_photos.haml
redde-0.3.13 app/views/admin/redde_photos/_photos.haml
redde-0.3.12 app/views/admin/redde_photos/_photos.haml
redde-0.3.11 app/views/admin/redde_photos/_photos.haml
redde-0.3.10 app/views/admin/redde_photos/_photos.haml
redde-0.3.9 app/views/admin/redde_photos/_photos.haml
redde-0.3.8 app/views/admin/redde_photos/_photos.haml