diff --git a/app/models/journal_paper.rb b/app/models/journal_paper.rb index bcce783..943884b 100644 --- a/app/models/journal_paper.rb +++ b/app/models/journal_paper.rb @@ -119,7 +119,9 @@ class JournalPaper if !page.nil? && page.custom_string_field == "table" case t when "paper_title" - pd_data << { "data_title" => "#{p.paper_title}" } + link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_journal') + paper_title = link=='#' ? p.paper_title : "#{p.paper_title}" + pd_data << { "data_title" => paper_title } when "level_type" pd_data << {"data_title" => ( !p.journal_levels.blank? ? "(#{p.journal_levels.collect{|x| x.title}.join(', ')})" : nil)} when "publication_date" @@ -131,7 +133,9 @@ class JournalPaper end else if t == "paper_title" - pd_data << { "data_title" => "#{p.create_link}" } + link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_journal') + paper_title = link=='#' ? p.paper_title : "#{p.create_link}" + pd_data << { "data_title" => paper_title } else pd_data << { "data_title" => p.send(t) } end diff --git a/app/views/plugin/personal_journal/_profile.html.erb b/app/views/plugin/personal_journal/_profile.html.erb index 1af5d4f..6d78feb 100644 --- a/app/views/plugin/personal_journal/_profile.html.erb +++ b/app/views/plugin/personal_journal/_profile.html.erb @@ -44,7 +44,8 @@ <% end -%> <%= writing_journal.year %> - <%= link_to writing_journal.create_link, OrbitHelper.url_to_plugin_show(writing_journal.to_param,'personal_journal'), target: "blank"%> + <% link = OrbitHelper.url_to_plugin_show(writing_journal.to_param,'personal_journal') %> + <%= link=='#' ? writing_journal.create_link : link_to writing_journal.create_link, link, target: "blank"%>