forked from saurabh/personal-honor
Fix link bug.
This commit is contained in:
parent
e1b52466fb
commit
8888c3e98c
|
@ -75,7 +75,9 @@ class Honor
|
|||
pd_data = []
|
||||
fields_to_show.collect do |t|
|
||||
if t == "award_name"
|
||||
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_honor')}' title='#{p.send(t)}' target='_blank'>#{p.send(t)}</a>" }
|
||||
link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_honor')
|
||||
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 == "honor_type"
|
||||
pd_data << {"data_title" => (p.honor_type.title rescue "")}
|
||||
elsif t == "award_date"
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
<% end %>
|
||||
<td><%= honor.year %></td>
|
||||
<td>
|
||||
<%= link_to honor.award_name, OrbitHelper.url_to_plugin_show(honor.to_param,'personal_honor'), target: "blank"%>
|
||||
<% link = OrbitHelper.url_to_plugin_show(honor.to_param,'personal_honor') %>
|
||||
<%= (link = (link == "#") ? honor.award_name : link_to(honor.award_name, link, target: "blank"))%>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
<% if has_access? %>
|
||||
|
|
Loading…
Reference in New Issue