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"
|
||||
case t
|
||||
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"
|
||||
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" => "<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
|
||||
pd_data << { "data_title" => p.send(t) }
|
||||
end
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
<% end -%>
|
||||
<td><%= writing_journal.year %></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">
|
||||
<ul class="nav nav-pills hide">
|
||||
<% if has_access? %>
|
||||
|
|
Loading…
Reference in New Issue