diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index 69da3b76..75b953a5 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -268,8 +268,6 @@ class ArticlesController < ApplicationController conditions << "supplier_id = #{@supplier.shared_supplier.id}" # check for keywords conditions << params[:import_query].split(' ').collect { |keyword| "name LIKE '%#{keyword}%'" }.join(' AND ') unless params[:import_query].blank? - # check for selected lists - conditions << "(" + params[:lists].collect {|list| "list = '#{list[0]}'"}.join(" OR ") + ")" if params[:lists] # check for regional articles conditions << "origin = 'REG'" if params[:regional] diff --git a/app/models/shared_supplier.rb b/app/models/shared_supplier.rb index 0a7837f8..af4f770f 100644 --- a/app/models/shared_supplier.rb +++ b/app/models/shared_supplier.rb @@ -9,9 +9,6 @@ class SharedSupplier < ActiveRecord::Base has_one :supplier has_many :shared_articles, :foreign_key => :supplier_id - # save the lists as an array - serialize :lists - end # == Schema Information diff --git a/app/views/articles/_import_search_results.haml b/app/views/articles/_import_search_results.haml index 180425ae..56a58ea5 100644 --- a/app/views/articles/_import_search_results.haml +++ b/app/views/articles/_import_search_results.haml @@ -1,5 +1,5 @@ %p= pagination_links_remote @articles, :per_page => 10, | - :params => {:import_query => params[:import_query], :lists => params[:lists], :regional => params[:regional]} | + :params => {:import_query => params[:import_query], :regional => params[:regional]} | %table.list %thead %tr diff --git a/app/views/articles/index.haml b/app/views/articles/index.haml index b368cd82..2f7bc5df 100644 --- a/app/views/articles/index.haml +++ b/app/views/articles/index.haml @@ -32,12 +32,6 @@ :method => :get do | = text_field_tag :import_query, params['import_query'], :size => 10 = submit_tag "Suchen" - - if @supplier.shared_supplier.lists - Suche in folgenden Listen: - - @supplier.shared_supplier.lists.each do |token, name| - = check_box_tag "lists[#{token}]", "1", true - = name - | Nur aus der Region: = check_box_tag "regional", "1", false #search_results