added site domain for search

This commit is contained in:
Harry Bomrah 2015-08-28 18:10:30 +08:00
parent e791f2c277
commit f66b53a691
1 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ class Admin::RegisteredSitesController < OrbitAdminController
@tags = @module_app.tags @tags = @module_app.tags
@categories = @module_app.categories.enabled @categories = @module_app.categories.enabled
@filter_fields = filter_fields_without_status(@categories, @tags) @filter_fields = filter_fields_without_status(@categories, @tags)
@registeredsites = search_data(@registeredsites,[:title]).page(params[:page]).per(10) @registeredsites = search_data(@registeredsites,[:title,:site_domain]).page(params[:page]).per(10)
if request.xhr? if request.xhr?
render :partial => "index" render :partial => "index"
@ -51,7 +51,7 @@ class Admin::RegisteredSitesController < OrbitAdminController
@registeredsites = RegisteredSite.all.order_by(sort) @registeredsites = RegisteredSite.all.order_by(sort)
.with_categories(filters("category")) .with_categories(filters("category"))
.with_tags(filters("tag")).desc(:created_at) .with_tags(filters("tag")).desc(:created_at)
@registeredsites = search_data(@registeredsites,[:title]).page(params[:page]).per(10) @registeredsites = search_data(@registeredsites,[:title,:site_domain]).page(params[:page]).per(10)
# render :partial => "index" # render :partial => "index"
end end
@ -61,11 +61,11 @@ class Admin::RegisteredSitesController < OrbitAdminController
registeredsite.destroy registeredsite.destroy
end end
@table_fields = table_fields @table_fields = table_fields
@registeredsites = RegisteredSite.all.order_by(sort) @registeredsites = RegisteredSite.all.order_by(sort)
.with_categories(filters("category")) .with_categories(filters("category"))
.with_tags(filters("tag")).desc(:created_at) .with_tags(filters("tag")).desc(:created_at)
@registeredsites = search_data(@registeredsites,[:title]).page(params[:page]).per(10) @registeredsites = search_data(@registeredsites,[:title,:site_domain]).page(params[:page]).per(10)
end end
private private