Fix link bug.
This commit is contained in:
parent
a18c1d0618
commit
82584741ba
|
@ -125,7 +125,9 @@ class WritingConference
|
|||
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_conference')}' title=\"#{p.paper_title}\" target='_blank'>#{p.paper_title}</a>" }
|
||||
link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_conference')
|
||||
link = (link == "#" ? p.paper_title : "<a href='#{link}' title=\"#{p.paper_title}\" target='_blank'>#{p.paper_title}</a>")
|
||||
pd_data << { "data_title" => link}
|
||||
when "paper_types"
|
||||
pd_data << {"data_title" => ( !p.conference_paper_types.blank? ? p.conference_paper_types.collect{|x| x.title}.join(', ') : "")}
|
||||
when "paper_levels"
|
||||
|
@ -141,7 +143,9 @@ class WritingConference
|
|||
end
|
||||
else
|
||||
if t == "paper_title"
|
||||
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_conference')}' title=\"#{p.create_link}\" target='_blank'>#{p.create_link}</a>" }
|
||||
link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_conference')
|
||||
link = (link == "#" ? p.create_link : "<a href='#{link}' title=\"#{p.create_link}\" target='_blank'>#{p.create_link}</a>")
|
||||
pd_data << { "data_title" => link }
|
||||
else
|
||||
pd_data << { "data_title" => p.send(t) }
|
||||
end
|
||||
|
|
|
@ -45,7 +45,8 @@
|
|||
<% end %>
|
||||
<td><%= writing_conference.year %></td>
|
||||
<td>
|
||||
<%= link_to writing_conference.paper_title, OrbitHelper.url_to_plugin_show(writing_conference.to_param,'personal_conference'), target: "blank"%>
|
||||
<% link = OrbitHelper.url_to_plugin_show(writing_conference.to_param,'personal_conference') %>
|
||||
<%= (link == "#" ? writing_conference.paper_title : link_to(writing_conference.paper_title, link , target: "blank")) %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
<% if has_access? %>
|
||||
|
|
Loading…
Reference in New Issue