Sha256: 47c5b328ee9a9a5f09a700bb2dd224f8ee51faf632be72c900e91c2e2181a0fd
Contents?: true
Size: 1.77 KB
Versions: 31
Compression:
Stored size: 1.77 KB
Contents
<% if photographable.new_record? %> <div class="alert"> <%= t('fullstack.admin.save_this_document_before', :default => "You should save this document before") %> </div> <% else %> <div class="gallery mb1" id="photos"> <%= link_to "javascript:void(0);", :class => "btn btn-success", :"data-toggle" => "collapse", :"data-target" => "#photo-uploader" do %> <i class="icon-upload icon-white"></i> <%= t('fullstack.admin.upload', :default => "Upload") %> <% end %> <div id="photo-uploader" class="photo-uploader collapse" data-session-key="<%= request.session_options[:key] %>" data-session-id="<%= request.session_options[:id] %>" data-url="<%= admin_photos_path(:photographable_id => photographable.id, :photographable_type => photographable.class.name) %>"> </div> <h4 class="page-header"><%= t('fullstack.admin.resources.photos', :default => "Photos") %> <span class="badge counter"><%= photographable.photos.size %></span></h4> <ul class="thumbnails sortable" id="photographable-thumbnails"> <% photographable.photos.order('created_at DESC').each do |photo| %> <%= render :partial => "admin/photos/photo", :locals => {:photo => photo} %> <% end %> </ul> </div> <div class="modal fade" id="edit-photo-modal"></div> <% end %> <% content_for :javascripts do -%> <script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $("#photographable-thumbnails img").css("cursor", "move"); $("#photographable-thumbnails").bind('sortstop', function(e, ui){ $(this).find("> li").each(function(i, e){ var photo_id = $(this).data('id'); var url = '<%= admin_photos_path %>/' + photo_id + ".json"; $.post(url, {_method: "put", photo: {position: i}}); }); }); }); </script> <% end -%>
Version data entries
31 entries across 31 versions & 1 rubygems