Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Robert Waltemath 2012-11-13 08:55:50 +01:00
commit c032fdca6e
5 changed files with 2 additions and 13 deletions

View file

@ -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]

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -2,7 +2,7 @@
:javascript
function fillNewStockArticle(text, li) {
new Ajax.Updater('stock_article_form', '/stockit/fill_new_stock_article_form', {
new Ajax.Updater('stock_article_form', '#{url_for(:controller => "stockit", :action => "fill_new_stock_article_form")}', {
parameters: {article_id: li.id}
});
}