fix category heading

This commit is contained in:
wvengen 2013-10-10 19:22:43 +02:00
parent a339ae4c7c
commit 23b38b5a46
2 changed files with 3 additions and 3 deletions

View file

@ -7,12 +7,12 @@ class ArticlesController < ApplicationController
sort = case params['sort'] sort = case params['sort']
when "name" then "articles.name" when "name" then "articles.name"
when "unit" then "articles.unit" when "unit" then "articles.unit"
when "category" then "article_categories.name" when "article_category" then "article_categories.name"
when "note" then "articles.note" when "note" then "articles.note"
when "availability" then "articles.availability" when "availability" then "articles.availability"
when "name_reverse" then "articles.name DESC" when "name_reverse" then "articles.name DESC"
when "unit_reverse" then "articles.unit DESC" when "unit_reverse" then "articles.unit DESC"
when "category_reverse" then "article_categories.name DESC" when "article_category_reverse" then "article_categories.name DESC"
when "note_reverse" then "articles.note DESC" when "note_reverse" then "articles.note DESC"
when "availability_reverse" then "articles.availability DESC" when "availability_reverse" then "articles.availability DESC"
end end

View file

@ -8,7 +8,7 @@
%th %th
%th= sort_link_helper heading_helper(Article, :name), "name" %th= sort_link_helper heading_helper(Article, :name), "name"
%th %th
%th= sort_link_helper heading_helper(Article, :category), "category" %th= sort_link_helper heading_helper(Article, :article_category), "article_category"
%th= sort_link_helper heading_helper(Article, :unit), "unit" %th= sort_link_helper heading_helper(Article, :unit), "unit"
%th= sort_link_helper heading_helper(Article, :note), "note" %th= sort_link_helper heading_helper(Article, :note), "note"
%th{:style => "width: 4em;"}= heading_helper Article, :unit_quantity, short: true %th{:style => "width: 4em;"}= heading_helper Article, :unit_quantity, short: true