Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
c032fdca6e
5 changed files with 2 additions and 13 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
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
function fillNewStockArticle(text, li) {
|
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}
|
parameters: {article_id: li.id}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue