small fix for the link

This commit is contained in:
Harry Bomrah 2016-05-31 17:10:20 +08:00
parent 9ed10d1e19
commit 1fcb59b006
1 changed files with 1 additions and 3 deletions

View File

@ -72,11 +72,10 @@ class Honor
fields_to_show = fields_to_show - fields_to_remove
plugin_datas = datas.sort_for_frontend.collect.with_index do |p,index|
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')}' target='_blank'>#{p.send(t)}" }
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_honor')}' target='_blank'>#{p.send(t)}</a>" }
elsif t == "honor_type"
pd_data << {"data_title" => (p.honor_type.title rescue "")}
elsif t == "award_date"
@ -85,7 +84,6 @@ class Honor
pd_data << { "data_title" => p.send(t) }
end
end
{
"pd_datas" => pd_data,
"type-sort" => (p.honor_type.sort_position.to_i rescue 1000),