Fix link.

This commit is contained in:
BoHung Chiu 2022-12-15 17:44:11 +08:00
parent 556858858f
commit d93b142dc9
1 changed files with 4 additions and 1 deletions

View File

@ -66,7 +66,10 @@ class Writing
pd_data = []
fields_to_show.collect do |t|
if t == "writing_title"
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_writing')}' title='#{p.send(t)}' target='_blank'>#{p.send(t)}" }
link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_writing')
url_to_plugin_show_blank = OrbitHelper.instance_variable_get(:@url_to_plugin_show_blank)
tmp_title = p.writing_title
pd_data << { "data_title" => (url_to_plugin_show_blank ? tmp_title : "<a title=\"#{tmp_title}\" href=\"#{link}\" target=\"_blank\">#{tmp_title}") }
else
pd_data << { "data_title" => p.send(t) }
end