Update personal_journals_controller.rb
This commit is contained in:
parent
d5ae586a4b
commit
c0a5af9280
|
@ -1,4 +1,5 @@
|
|||
class PersonalJournalsController < ApplicationController
|
||||
include Admin::JournalPapersHelper
|
||||
def index
|
||||
params = OrbitHelper.params
|
||||
page_data_count = OrbitHelper.page_data_count
|
||||
|
@ -42,6 +43,8 @@ class PersonalJournalsController < ApplicationController
|
|||
journal_papers_show = journal_papers_temp.select { |value| search_all_words((value.journal_paper_type.title rescue ''), params[:keywords]) }
|
||||
when 'language'
|
||||
journal_papers_show = journal_papers_temp.select { |value| search_all_words((!value.language.nil? ? t(value.language.to_s) : ''), params[:keywords]) }
|
||||
when 'authors'
|
||||
journal_papers_show = journal_papers_temp.select { |value| search_all_words(get_authors_text(value), params[:keywords]) }
|
||||
else
|
||||
journal_papers_show = journal_papers_temp.select { |value| search_all_words(value.send(params[:selectbox]).to_s, params[:keywords]) }
|
||||
end
|
||||
|
@ -74,6 +77,8 @@ class PersonalJournalsController < ApplicationController
|
|||
t << { 'value' => (!journal_paper.language.nil? ? t(journal_paper.language.to_s) : '') }
|
||||
when 'url'
|
||||
t << { 'value' => ("<a href='#{journal_paper.url}'>#{journal_paper.url}</a>" rescue '')}
|
||||
when 'authors'
|
||||
t << { 'value' => get_authors_text(journal_paper) }
|
||||
else
|
||||
t << { 'value' => (journal_paper.send(fs) rescue '') }
|
||||
end
|
||||
|
@ -163,7 +168,6 @@ class PersonalJournalsController < ApplicationController
|
|||
abstract
|
||||
language
|
||||
url
|
||||
author
|
||||
]
|
||||
@fields_to_show = @fields_to_show.map { |fs| [t("personal_journal.#{fs}"), fs] }
|
||||
@default_fields_to_show = %w[
|
||||
|
|
Loading…
Reference in New Issue