fix error
This commit is contained in:
parent
2929b87154
commit
3ba5e45a4c
|
@ -119,7 +119,9 @@ class JournalPaper
|
||||||
if !page.nil? && page.custom_string_field == "table"
|
if !page.nil? && page.custom_string_field == "table"
|
||||||
case t
|
case t
|
||||||
when "paper_title"
|
when "paper_title"
|
||||||
pd_data << { "data_title" => "<a href=\"#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_journal')}\" title=\"#{p.paper_title}\" target='_blank'>#{p.paper_title}</a>" }
|
link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_journal')
|
||||||
|
paper_title = link=='#' ? p.paper_title : "<a href=\"#{link}\" title=\"#{p.paper_title}\" target='_blank'>#{p.paper_title}</a>"
|
||||||
|
pd_data << { "data_title" => paper_title }
|
||||||
when "level_type"
|
when "level_type"
|
||||||
pd_data << {"data_title" => ( !p.journal_levels.blank? ? "(#{p.journal_levels.collect{|x| x.title}.join(', ')})" : nil)}
|
pd_data << {"data_title" => ( !p.journal_levels.blank? ? "(#{p.journal_levels.collect{|x| x.title}.join(', ')})" : nil)}
|
||||||
when "publication_date"
|
when "publication_date"
|
||||||
|
@ -131,7 +133,9 @@ class JournalPaper
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if t == "paper_title"
|
if t == "paper_title"
|
||||||
pd_data << { "data_title" => "<a href=\"#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_journal')}\" title=\"#{p.create_link}\" target='_blank'>#{p.create_link}</a>" }
|
link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_journal')
|
||||||
|
paper_title = link=='#' ? p.paper_title : "<a href=\"#{link}\" title=\"#{p.create_link}\" target='_blank'>#{p.create_link}</a>"
|
||||||
|
pd_data << { "data_title" => paper_title }
|
||||||
else
|
else
|
||||||
pd_data << { "data_title" => p.send(t) }
|
pd_data << { "data_title" => p.send(t) }
|
||||||
end
|
end
|
||||||
|
|
|
@ -44,7 +44,8 @@
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<td><%= writing_journal.year %></td>
|
<td><%= writing_journal.year %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= 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"%>
|
||||||
<div class="quick-edit">
|
<div class="quick-edit">
|
||||||
<ul class="nav nav-pills hide">
|
<ul class="nav nav-pills hide">
|
||||||
<% if has_access? %>
|
<% if has_access? %>
|
||||||
|
|
Loading…
Reference in New Issue