Permalink
Browse files

Fix reordering, collapsing preventing the opening of the image section.

  • Loading branch information...
1 parent 87cf823 commit 682181608b6a766763dd5bcc5bb2c3f221df584d @robyurkowski robyurkowski committed Mar 14, 2012
@@ -5,16 +5,16 @@ class ItemsController < ::Refinery::AdminController
include Refinery::Portfolio
crudify :'refinery/portfolio/item',
- :order => 'lft ASC',
+ :order => 'position ASC',
:xhr_paging => true
before_filter :find_gallery, :only => [:index]
def index
if params[:orphaned]
- @items = Item.orphaned
+ @items = Item.orphaned.order('position ASC')
elsif params[:gallery_id]
- @items = @gallery.items
+ @items = @gallery.items.order('position ASC')
else
redirect_to refinery.portfolio_admin_galleries_path and return
end
@@ -1,12 +1,8 @@
<li class='clearfix record icons' id="<%= dom_id(gallery) -%>">
<div class='clearfix'>
- <% if gallery.children.present? %>
- <span class="icon expanded" %>"></span>
- <% else %>
- <span class="icon"></span>
- <% end %>
+ <span class="icon" %></span>
- <span class='title <%= 'toggle' if gallery.children.present? %>'>
+ <span class='title'>
<%= gallery.title %>
<span class="preview">
(<%= link_to t('.item_count', :count => gallery.items.count), refinery.portfolio_admin_gallery_items_path(gallery), :rel => 'items' %>)
@@ -0,0 +1 @@
+<%= render :partial => "form" %>

0 comments on commit 6821816

Please sign in to comment.