Merge branch 'master' into 'master'

add link to award winner

add link to award winner

See merge request !2
This commit is contained in:
EricTYL 2019-12-30 11:42:23 +08:00
commit 9729eecb31
1 changed files with 4 additions and 1 deletions

View File

@ -33,7 +33,10 @@ class PersonalHonorsController < ApplicationController
when "honor_type" when "honor_type"
t << {"value" => (honor.send("honor_type").title rescue "")} t << {"value" => (honor.send("honor_type").title rescue "")}
when "authors" when "authors"
t << {"value" => (honor.send(:member_profile).name rescue "")} member_profile = honor.send(:member_profile)
role_status_id = member_profile.role_status_ids.first.to_s
link = OrbitHelper.member_url_to_show(member_profile.to_param, role_status_id) rescue '#'
t << {"value" => "<a href='#{link}'>" + (member_profile.name rescue "") + "</a>" }
when "award_date" when "award_date"
t << {"value" => (honor.send(fs).strftime("%Y/%m") rescue "")} t << {"value" => (honor.send(fs).strftime("%Y/%m") rescue "")}
else else