diff --git a/app/controllers/admin/galleries_controller.rb b/app/controllers/admin/galleries_controller.rb index be9f663..f6a491d 100644 --- a/app/controllers/admin/galleries_controller.rb +++ b/app/controllers/admin/galleries_controller.rb @@ -324,7 +324,7 @@ class Admin::GalleriesController < OrbitAdminController @color_save = 'transparent' end if request.xhr? - render :partial => "album", :collection => @albums + render :partial => "albums" end end diff --git a/app/views/admin/galleries/_albums.html.erb b/app/views/admin/galleries/_albums.html.erb new file mode 100644 index 0000000..afb68e7 --- /dev/null +++ b/app/views/admin/galleries/_albums.html.erb @@ -0,0 +1,14 @@ +<%= render :partial => "album", :collection => @albums %> + \ No newline at end of file diff --git a/app/views/admin/galleries/index.html.erb b/app/views/admin/galleries/index.html.erb index 13d4e41..fd5da95 100644 --- a/app/views/admin/galleries/index.html.erb +++ b/app/views/admin/galleries/index.html.erb @@ -10,6 +10,9 @@ var page_no = 2 var catch_flag = true var max_page = <%= (@fiter_albums.length/@limit_count).ceil rescue 1 %> + if( max_page > 1){ + $("#edit-order-btn").hide(); + } $('.bottomnav').ready(function(){ function load_html_func(){ $('#load_html').text("<%= t('gallery.wait_time') %>") @@ -27,7 +30,8 @@ page_no++ catch_flag = true if (max_page < page_no){ - $('#load_html').hide() + $("#edit-order-btn").show(); + $('#load_html').hide(); } $('#load_html').text("<%= t('gallery.load_html') %>") }, @@ -61,7 +65,7 @@
@@ -75,5 +79,5 @@
<% else %> - <%= render :partial => "album", :collection => @albums %> + <%= render :partial => "albums" %> <% end %> \ No newline at end of file