Update personal_journals_controller.rb
This commit is contained in:
parent
5881bbea9e
commit
a5abf0b2ef
|
@ -36,8 +36,8 @@ class PersonalJournalsController < ApplicationController
|
|||
journal_papers_show = journal_papers_temp.select {|value| search_all_words((value.send("publication_date").strftime("%Y/%m/%d") rescue ""), params[:keywords])}
|
||||
when "author_type"
|
||||
journal_papers_show = journal_papers_temp.select {|value| search_all_words(value.journal_paper_author_types.collect{|jat| jat.title}.join(", "), params[:keywords])}
|
||||
when "paper_types"
|
||||
journal_papers_show = journal_papers_temp.select {|value| search_all_words(value.journal_paper_types.collect{|x| x.title}.join(", "), params[:keywords])}
|
||||
when "paper_type"
|
||||
journal_papers_show = journal_papers_temp.select {|value| search_all_words(value.journal_paper_type.collect{|x| x.title}.join(", "), params[:keywords])}
|
||||
when "language"
|
||||
journal_papers_show = journal_papers_temp.select {|value| search_all_words((!value.language.nil? ? t("#{value.language}") : ""), params[:keywords])}
|
||||
else
|
||||
|
@ -70,8 +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 "paper_types"
|
||||
t << {"value" => ( !journal_paper.journal_paper_types.blank? ? "(#{journal_paper.journal_paper_types.collect{|x| x.title}.join(', ')})" : nil)}
|
||||
when "paper_type"
|
||||
t << {"value" => ( !journal_paper.journal_paper_type.blank? ? "(#{journal_paper.journal_paper_type.collect{|x| x.title}.join(', ')})" : nil)}
|
||||
when "language"
|
||||
t << {"value" => (!journal_paper.language.nil? ? t("#{journal_paper.language}") : "")}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue