parent
7c338ff4bc
commit
4bc6962248
|
@ -39,6 +39,8 @@ class PersonalBooksController < ApplicationController
|
||||||
books_show = books_temp.select {|value| search_all_words((value.send(params[:selectbox]).strftime("%Y/%m/%d") rescue ""), params[:keywords])}
|
books_show = books_temp.select {|value| search_all_words((value.send(params[:selectbox]).strftime("%Y/%m/%d") rescue ""), params[:keywords])}
|
||||||
when "author_type"
|
when "author_type"
|
||||||
books_show = books_temp.select {|value| search_all_words(value.book_author_types.collect{|bat| bat.title}.join(", "), params[:keywords])}
|
books_show = books_temp.select {|value| search_all_words(value.book_author_types.collect{|bat| bat.title}.join(", "), params[:keywords])}
|
||||||
|
when "book_paper_type"
|
||||||
|
books_show = books_temp.select {|value| search_all_words((value.book_type.title rescue ""), params[:keywords])}
|
||||||
when "language"
|
when "language"
|
||||||
books_show = books_temp.select {|value| search_all_words((!value.language.nil? ? t("#{value.language}") : ""), params[:keywords])}
|
books_show = books_temp.select {|value| search_all_words((!value.language.nil? ? t("#{value.language}") : ""), params[:keywords])}
|
||||||
else
|
else
|
||||||
|
@ -71,6 +73,8 @@ class PersonalBooksController < ApplicationController
|
||||||
t << {"value" => (book.book_author_types.collect{|bat| bat.title}.join(", ") rescue "")}
|
t << {"value" => (book.book_author_types.collect{|bat| bat.title}.join(", ") rescue "")}
|
||||||
when "language"
|
when "language"
|
||||||
t << {"value" => (!book.language.nil? ? t("#{book.language}") : "")}
|
t << {"value" => (!book.language.nil? ? t("#{book.language}") : "")}
|
||||||
|
when "book_paper_type"
|
||||||
|
t << {"value" => (book.book_type.title rescue "")}
|
||||||
else
|
else
|
||||||
t << {"value" => (book.send(fs) rescue "")}
|
t << {"value" => (book.send(fs) rescue "")}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue