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