Hide/show unavailable articles via js.
This commit is contained in:
parent
84610cc9a5
commit
036bc10282
5 changed files with 25 additions and 15 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue