diff --git a/app/controllers/personal_journals_controller.rb b/app/controllers/personal_journals_controller.rb index 8dbfa2e..55ea657 100644 --- a/app/controllers/personal_journals_controller.rb +++ b/app/controllers/personal_journals_controller.rb @@ -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' => ("#{journal_paper.url}" 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[