diff --git a/app/controllers/admin/web_resources_controller.rb b/app/controllers/admin/web_resources_controller.rb index d3af595..0503333 100644 --- a/app/controllers/admin/web_resources_controller.rb +++ b/app/controllers/admin/web_resources_controller.rb @@ -8,11 +8,14 @@ class Admin::WebResourcesController < OrbitAdminController @filter_fields = filter_fields(@categories, @tags) @table_fields = [:status, :category, :title] - @links = WebLink.order_by(sort).with_categories(filters("category")).with_tags(filters("tag")).with_status(filters("status")).page(params[:page]).per(10) + @links = WebLink.order_by(sort) + .with_categories(filters("category")) + .with_tags(filters("tag")) + .with_status(filters("status")) - if request.xhr? - render :partial => "index" - end + @links = search_data(@links,[:title]).page(params[:page]).per(10) + + render :partial => "index" if request.xhr? end def new diff --git a/app/views/admin/web_resources/index.html.erb b/app/views/admin/web_resources/index.html.erb index 31d9a3b..80f6fa7 100644 --- a/app/views/admin/web_resources/index.html.erb +++ b/app/views/admin/web_resources/index.html.erb @@ -1,81 +1,4 @@ -<% content_for :right_nav do %> -
-