Fix link.

This commit is contained in:
BoHung Chiu 2022-12-15 17:30:49 +08:00
parent cb8acf3f8c
commit 79f3aa17bd
1 changed files with 6 additions and 4 deletions

View File

@ -112,8 +112,9 @@ class Book
case t
when "book_title", "extracted_chapters"
link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_book')
link = (link == "#" ? p.send(t) : "<a href='#{link}' title=\"#{p.send(t)}\" target='_blank'>#{p.send(t)}</a>")
pd_data << { "data_title" => link }
url_to_plugin_show_blank = OrbitHelper.instance_variable_get(:@url_to_plugin_show_blank)
tmp_title = p.send(t)
pd_data << { "data_title" => (url_to_plugin_show_blank ? tmp_title : "<a title=\"#{tmp_title}\" href=\"#{link}\" target=\"_blank\">#{tmp_title}") }
when "publish_date", "publication_date"
pd = ""
if !p.publication_date.nil?
@ -131,8 +132,9 @@ class Book
else
if t == "book_title"
link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_book')
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}") }
else
pd_data << { "data_title" => p.send(t) }
end