Fix link bug.
This commit is contained in:
parent
3a92c8ec03
commit
1136e0ff7c
|
@ -94,7 +94,9 @@ class Course
|
|||
pd_data = []
|
||||
fields_to_show.collect do |t|
|
||||
if t == "title"
|
||||
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_course')}' target='_blank'>#{p.send(t)}" }
|
||||
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>")
|
||||
pd_data << { "data_title" => link }
|
||||
elsif t == "course_category"
|
||||
pd_data << {"data_title" => (p.course_category.title rescue "")}
|
||||
else
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
<% end %>
|
||||
<td><%= course.year %></td>
|
||||
<td>
|
||||
<%= link_to course.title, OrbitHelper.url_to_plugin_show(course.to_param,'personal_course').to_s, target: "blank"%>
|
||||
<% link = OrbitHelper.url_to_plugin_show(course.to_param,'personal_course') %>
|
||||
<%= (link = (link == "#") ? course.title : link_to(course.title, link, target: "blank")) %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
<% if has_access? %>
|
||||
|
|
Loading…
Reference in New Issue