Hide/show unavailable articles via js.

This commit is contained in:
Benjamin Meichsner 2009-10-17 20:33:36 +02:00
parent 84610cc9a5
commit 036bc10282
5 changed files with 25 additions and 15 deletions

View file

@ -1,17 +1,10 @@
class StockitController < ApplicationController
def index
unless params[:show_not_available] == "1"
@stock_articles = StockArticle.without_deleted.available.all(
@stock_articles = StockArticle.without_deleted.all(
:include => [:supplier, :article_category],
:order => 'suppliers.name, article_categories.name, articles.name'
)
else
@stock_articles = StockArticle.without_deleted.all(
:include => [:supplier, :article_category],
:order => 'suppliers.name, article_categories.name, articles.name'
)
end
end
def new