socialforge/app/views/contests/set_reward.js.erb

32 lines
702 B
Plaintext

$('#reward_result_<%= @contesting_project_id %>').html('<%= j(
if get_prize(@b_p).nil? or get_prize(@b_p) == ""
if @contest.deadline < Date.today
puts '未评奖'
end
else
case get_prize(@b_p)
when '-1'
image_tag("/images/bid/special_reward.png")
when '1'
when '0'
image_tag("/images/bid/first_reward.png")
when '1'
image_tag("/images/bid/second_reward.png")
when '2'
image_tag("/images/bid/third_reward.png")
when '3'
image_tag("/images/bid/forth_reward.png")
when '4'
image_tag("/images/bid/fifth_reward.png")
when '5'
image_tag("/images/bid/qualified.png")
end
end
)
%>')
$('#<%= @contesting_project_id %>').hide()