Fix link.

This commit is contained in:
BoHung Chiu 2022-12-15 17:33:19 +08:00
parent 8fa0413daa
commit 649e16793c
1 changed files with 4 additions and 3 deletions

View File

@ -97,8 +97,9 @@ class Course
fields_to_show.collect do |t| fields_to_show.collect do |t|
if t == "title" if t == "title"
link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_course') link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_course')
link = (link == "#" ? p.send(t) : "<a href='#{link}' title=\"#{p.send(t)}\" target='_blank'>#{p.send(t)}</a>") url_to_plugin_show_blank = OrbitHelper.instance_variable_get(:@url_to_plugin_show_blank)
pd_data << { "data_title" => link } tmp_title = p.title
pd_data << { "data_title" => (url_to_plugin_show_blank ? tmp_title : "<a title=\"#{tmp_title}\" href=\"#{link}\" target=\"_blank\">#{tmp_title}") }
elsif t == "course_category" elsif t == "course_category"
pd_data << {"data_title" => (p.course_category.title rescue "")} pd_data << {"data_title" => (p.course_category.title rescue "")}
else else