<%= l(:label_wellmeaning_intimation_contentone) %>
1) <%= l(:label_wellmeaning_intimation_contenttwo) %>
2) <%= l(:label_wellmeaning_intimation_contentthree) %>
<% if User.current.logged? %>
<%= l(:label_attending_contest) %>:
<%= link_to l(:label_new_attendingcontest_work), "javascript:void(0);", onclick: "$('#put-project-form').slideToggle();" %>
<% else %>
<%= l(:label_user_login_attending_contest) %>
<%= link_to l(:label_user_login_new), signin_path %>
<% end %>
<%= l(:label_contest_work) %>
: <%= link_to(c_project.project.name, project_path(c_project.project), :target => '_blank') %>
<% if get_prize(c_project).nil? or get_prize(c_project) == "" %>
<% if @contest.deadline < Date.today %>
<%= l(:label_noawards) %>
<% else %>
<%= l(:label_noawards_current) %>
<% end %>
<% else %>
<% case get_prize(c_project) %>
<% when '-1' %>
<%= image_tag("/images/bid/special_reward.png") %>
<% 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 %>
<% if ((User.current.id == @contest.author_id) && (@contest.deadline > Date.today))||User.current.admin %>
<%= toggle_link l(:label_reward), c_project.id.to_s %>
<%= form_for "set_reward_project", :remote => true, :url => set_reward_project_contest_path do |f| %>
<%= f.text_field :c_id, :style => "display:none", :value => c_project.id, :size => "0" %>
<%= f.select :reward, "#{l(:label_special_reward)}
#{l(:label_first_reward)}
#{l(:label_second_reward)}
#{l(:label_third_reward)}
#{l(:label_fourth_reward)}
#{l(:label_fifth_reward)}
#{l(:label_comfort_reward)} ".html_safe %>
<%= f.submit :value => l(:button_submit), :class => "submit" %>
<% end %>
<% end %>
<%= l(:label_profile) %>:
<%#= c_project.project.description.truncate(90, omission: '...') %>
<%= c_project.project.description %>
<%= l(:label_attendingcontest_time) %>
: <%= format_time c_project.created_at %>
<%= l(:label_attendingcontest_spoksman) %>
<% unless c_project.nil? || c_project.user.nil? %>
: <%= link_to c_project.user.name,user_path(c_project.user) %>
<% end %>
<% end %>
<%= l(:label_contest_work) %>:
<%= link_to(c_softapplication.softapplication.name, softapplication_path(c_softapplication.softapplication), :target => '_blank') %>
<%= l(:label_profile) %>:
<%#= c_softapplication.softapplication.description.truncate(90, omission: '...') %>
<%= c_softapplication.softapplication.description %>
<%= l(:label_attendingcontest_time) %>
: <%= format_time c_softapplication.created_at %>
<%= l(:label_attendingcontest_spoksman) %>
<% unless c_softapplication.nil? || c_softapplication.softapplication.nil? || c_softapplication.softapplication.user.nil? %>
: <%= link_to c_softapplication.softapplication.user.name,user_path(c_softapplication.softapplication.user) %>
<% end %>
<% score = c_softapplication.softapplication.average(:quality).try(:avg).try(:round, 2).to_f %>
<%= l(:label_final_scores) %>
: <%= format("%.2f" , score) %>
分
<% if get_prize(c_softapplication).nil? or get_prize(c_softapplication) == "" %>
<% if @contest.deadline < Date.today %>
<%= l(:label_noawards) %>
<% else %>
<%= l(:label_noawards_current) %>
<% end %>
<% else %>
<% case get_prize(c_softapplication) %>
<% when '-1' %>
<%= image_tag("/images/bid/special_reward.png") %>
<% 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 %>
<% if ((User.current.id == @contest.author_id) && (@contest.deadline > Date.today))||User.current.admin %>
<%= toggle_link '评奖', c_softapplication.id.to_s %>
<%= form_for "set_reward_softapplication", :remote => true, :url => set_reward_softapplication_contest_path do |f| %>
<%= f.text_field :c_id, :style => "display:none", :value => c_softapplication.id, :size => "0" %>
<%= f.select :reward, "#{l(:label_special_reward)}
#{l(:label_first_reward)}
#{l(:label_second_reward)}
#{l(:label_third_reward)}
#{l(:label_fourth_reward)}
#{l(:label_fifth_reward)}
#{l(:label_comfort_reward)} ".html_safe %>
<%= f.submit :value => l(:button_submit), :class => "submit" %>
<% end %>
<% end %>
<% end %>