Fix link.

This commit is contained in:
BoHung Chiu 2022-12-15 19:08:43 +08:00
parent e09ecd8ca4
commit 8754efc4c1
1 changed files with 6 additions and 4 deletions

View File

@ -169,8 +169,9 @@ class WritingConference
case t
when "paper_title"
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}
url_to_plugin_show_blank = OrbitHelper.instance_variable_get(:@url_to_plugin_show_blank)
tmp_title = p.paper_title
pd_data << { "data_title" => (url_to_plugin_show_blank ? tmp_title : "<a title=\"#{tmp_title}\" href=\"#{link}\" target=\"_blank\">#{tmp_title}</a>") }
when "paper_types"
pd_data << {"data_title" => ( !p.conference_paper_types.blank? ? p.conference_paper_types.collect{|x| x.title}.join(', ') : "")}
when "paper_levels"
@ -189,8 +190,9 @@ class WritingConference
else
if t == "paper_title"
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 }
url_to_plugin_show_blank = OrbitHelper.instance_variable_get(:@url_to_plugin_show_blank)
tmp_title = p.create_link
pd_data << { "data_title" => (url_to_plugin_show_blank ? tmp_title : "<a title=\"#{tmp_title}\" href=\"#{link}\" target=\"_blank\">#{tmp_title}</a>") }
elsif t == "publication_date"
pd_data << { "data_title" => (p.publication_date.strftime(@setting.publication_date_format) rescue "") }
else