Remove searching shared articles by list.
This is necessary to go with newest fixes in sharedlists app.
This commit is contained in:
parent
8c3d046cf4
commit
e9383e0d17
4 changed files with 1 additions and 12 deletions
|
@ -268,8 +268,6 @@ class ArticlesController < ApplicationController
|
||||||
conditions << "supplier_id = #{@supplier.shared_supplier.id}"
|
conditions << "supplier_id = #{@supplier.shared_supplier.id}"
|
||||||
# check for keywords
|
# check for keywords
|
||||||
conditions << params[:import_query].split(' ').collect { |keyword| "name LIKE '%#{keyword}%'" }.join(' AND ') unless params[:import_query].blank?
|
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
|
# check for regional articles
|
||||||
conditions << "origin = 'REG'" if params[:regional]
|
conditions << "origin = 'REG'" if params[:regional]
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,6 @@ class SharedSupplier < ActiveRecord::Base
|
||||||
has_one :supplier
|
has_one :supplier
|
||||||
has_many :shared_articles, :foreign_key => :supplier_id
|
has_many :shared_articles, :foreign_key => :supplier_id
|
||||||
|
|
||||||
# save the lists as an array
|
|
||||||
serialize :lists
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# == Schema Information
|
# == Schema Information
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
%p= pagination_links_remote @articles, :per_page => 10, |
|
%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
|
%table.list
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
|
|
|
@ -32,12 +32,6 @@
|
||||||
:method => :get do |
|
:method => :get do |
|
||||||
= text_field_tag :import_query, params['import_query'], :size => 10
|
= text_field_tag :import_query, params['import_query'], :size => 10
|
||||||
= submit_tag "Suchen"
|
= 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:
|
Nur aus der Region:
|
||||||
= check_box_tag "regional", "1", false
|
= check_box_tag "regional", "1", false
|
||||||
#search_results
|
#search_results
|
||||||
|
|
Loading…
Reference in a new issue