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

65 lines
1.4 KiB
Plaintext

$('#reward_result_<%= @biding_project_id %>').html('<%= j(
if get_prize(@b_p).nil? or get_prize(@b_p) == ""
if @bid.deadline < Date.today
puts '未评奖'
end
else
case @bid.reward_type
when 1
case get_prize(@b_p)
when '6'
image_tag("/images/bid/win_bid.png")
when '7'
image_tag("/images/bid/candidate.png")
when '8'
image_tag("/images/bid/obsolete.png")
end
when 2
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
when 3
case get_prize(@b_p)
when '10'
image_tag("/images/bid/A.jpg")
when '11'
image_tag("/images/bid/B+.jpg")
when '12'
image_tag("/images/bid/B.jpg")
when '13'
image_tag("/images/bid/C+.jpg")
when '14'
image_tag("/images/bid/C.jpg")
when '15'
image_tag("/images/bid/D+.jpg")
when '16'
image_tag("/images/bid/D.jpg")
when '17'
image_tag("/images/bid/E+.png")
when '18'
image_tag("/images/bid/E.png")
when '19'
image_tag("/images/bid/F.jpg")
end
end
end
)
%>')
$('#<%= @biding_project_id %>').hide()