modified date

This commit is contained in:
Harry Bomrah 2016-04-06 13:27:58 +08:00
parent 97de505179
commit e39650abca
2 changed files with 4 additions and 0 deletions

View File

@ -25,6 +25,8 @@ class PersonalHonorsController < ApplicationController
t << {"value" => (honor.send("honor_type").title rescue "")}
when "authors"
t << {"value" => (honor.send(:member_profile).name rescue "")}
when "award_date"
t << {"value" => (honor.send(fs).strftime("%Y/%m/%d") rescue "")}
else
t << {"value" => (honor.send(fs) rescue "")}
end

View File

@ -79,6 +79,8 @@ class Honor
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_honor')}' target='_blank'>#{p.send(t)}" }
elsif t == "honor_type"
pd_data << {"data_title" => (p.honor_type.title rescue "")}
elsif t == "award_date"
pd_data << {"value" => (p.send(fs).strftime("%Y/%m/%d") rescue "")}
else
pd_data << { "data_title" => p.send(t) }
end