diff --git a/app/controllers/personal_journals_controller.rb b/app/controllers/personal_journals_controller.rb index c4170b6..805f9db 100644 --- a/app/controllers/personal_journals_controller.rb +++ b/app/controllers/personal_journals_controller.rb @@ -37,6 +37,8 @@ class PersonalJournalsController < ApplicationController journal_papers_show = journal_papers_temp.select {|value| value.send("publication_date").strftime("%Y/%m").collect{|x| x.title}.join(', ').include? params[:keywords]} when "author_type" journal_papers_show = journal_papers_temp.select {|value| value.journal_paper_author_types.collect{|jat| jat.title}.join(", ").include? params[:keywords]} + when "language" + journal_papers_show = journal_papers_temp.select {|value| (!value.language.nil? ? t("#{value.language}") : "").include? params[:keywords]} else journal_papers_show = journal_papers_temp.select {|value| value.send(params[:selectbox]).to_s.include? params[:keywords]} end @@ -68,6 +70,8 @@ class PersonalJournalsController < ApplicationController t << {"value" => (journal_paper.send(fs).strftime("%Y/%m") rescue "")} when "author_type" t << {"value" => (journal_paper.journal_paper_author_types.collect{|jat| jat.title}.join(", ") rescue "")} + when "language" + t << {"value" => (!journal_paper.language.nil? ? t("#{journal_paper.language}") : "")} else t << {"value" => journal_paper.send(fs)} end