forked from saurabh/personal-honor
Merge branch 'master' into 'master'
add link to honoree for show; use another front page url generator for index; naming change add link to honoree for show; use another front page url generator for index; naming change See merge request !3
This commit is contained in:
commit
c20baa8be3
|
@ -35,8 +35,8 @@ class PersonalHonorsController < ApplicationController
|
||||||
when "authors"
|
when "authors"
|
||||||
member_profile = honor.send(:member_profile)
|
member_profile = honor.send(:member_profile)
|
||||||
role_status_id = member_profile.role_status_ids.first.to_s
|
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 '#'
|
path = OrbitHelper.url_to_plugin_show(member_profile.to_param, 'member') rescue '#'
|
||||||
t << {"value" => "<a href='#{link}'>" + (member_profile.name rescue "") + "</a>" }
|
t << {"value" => "<a href='#{path}'>" + (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
|
||||||
|
|
|
@ -99,7 +99,8 @@ class Honor
|
||||||
def get_plugin_field_data(field)
|
def get_plugin_field_data(field)
|
||||||
case field
|
case field
|
||||||
when "honoree"
|
when "honoree"
|
||||||
value = self.member_profile.name
|
path = OrbitHelper.url_to_plugin_show(self.member_profile.to_param, 'member') rescue '#'
|
||||||
|
value = "<a href='#{path}'>" + self.member_profile.name + "</a>"
|
||||||
when "language"
|
when "language"
|
||||||
value = I18n.t(self.language) rescue ""
|
value = I18n.t(self.language) rescue ""
|
||||||
when "honor_type"
|
when "honor_type"
|
||||||
|
|
Loading…
Reference in New Issue