Update personal_journals_controller.rb
This commit is contained in:
parent
61d3fe5a52
commit
9553ede2f9
|
@ -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]}
|
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"
|
when "author_type"
|
||||||
journal_papers_show = journal_papers_temp.select {|value| value.journal_paper_author_types.collect{|jat| jat.title}.join(", ").include? params[:keywords]}
|
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
|
else
|
||||||
journal_papers_show = journal_papers_temp.select {|value| value.send(params[:selectbox]).to_s.include? params[:keywords]}
|
journal_papers_show = journal_papers_temp.select {|value| value.send(params[:selectbox]).to_s.include? params[:keywords]}
|
||||||
end
|
end
|
||||||
|
@ -68,6 +70,8 @@ class PersonalJournalsController < ApplicationController
|
||||||
t << {"value" => (journal_paper.send(fs).strftime("%Y/%m") rescue "")}
|
t << {"value" => (journal_paper.send(fs).strftime("%Y/%m") rescue "")}
|
||||||
when "author_type"
|
when "author_type"
|
||||||
t << {"value" => (journal_paper.journal_paper_author_types.collect{|jat| jat.title}.join(", ") rescue "")}
|
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
|
else
|
||||||
t << {"value" => journal_paper.send(fs)}
|
t << {"value" => journal_paper.send(fs)}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue