added search box
This commit is contained in:
parent
a0dec48727
commit
310297f01b
|
@ -8,9 +8,11 @@ class Admin::GalleriesController < OrbitAdminController
|
|||
@filter_fields = filter_fields(categories, @tags)
|
||||
@filter_fields.delete(:status)
|
||||
@albums = Album.where(:order => -1).desc(:created_at).with_categories(filters("category")).with_tags(filters("tag"))
|
||||
@albums = search_data(@albums,[:name])
|
||||
albums = Album.where(:order.gt => -1).asc(:order).with_categories(filters("category")).with_tags(filters("tag"))
|
||||
albums = search_data(albums,[:name])
|
||||
@albums = @albums.concat(albums)
|
||||
|
||||
|
||||
if request.xhr?
|
||||
render :partial => "album", :collection => @albums
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue