
<% contesting_project.each do |c_project|%>
	<% if c_project.project %>
		<table width="90%" border="0" align='center'>
			<tr>
				<td>
					<table width="660px" border="0" align='center'>
						<tr>
							<td width="50px" valign="top" colspan="2" align="middle">
							<div style="width: 50px; height: 50px;">
								<%= image_tag(url_to_avatar(c_project.project), :class => 'avatar3') %>
								
							</div></td>
							<td width="65%" valign="top">
								<table width="100%" valign="top">
									<tr>
										<td colspan="2" valign="top" width="50%">
											<strong>
												<%= link_to(c_project.project.name, project_path(c_project.project)) %>
											</strong>
											<span class="font_lighter"><%= l(:label_joined_contest)%></span>
										</td>
										
										<!-- 如果需求到期     并且是该需求的管理员  -->
										
										<td style="color: #ec6300;" align="right" valign="0.1em" width="16%">
											<strong>
												<span id="reward_result_<%=c_project.id%>"> <!-- 调用js进行刷新 -->
											    	<%=  l(:label_system_grade) %>:
                                                    <%= (c_project.project.project_status.nil? ? 0.0 : c_project.project.project_status.grade) unless (c_project.project.project_status.nil? && c_project.project.nil?) %>
													<% if get_prize(c_project).nil? || get_prize(c_project) == "" %>
														<% if  @contest.deadline < Date.today %>
										    	           	<%= l(:label_noawards)%>
										    	        <% 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 %>   					    
												</span>
											</strong>
									    </td>
									    
									    <!-- 评价显隐控制按钮-->		    
									</tr>
									<tr>
										<td valign="top" width="50%" style=" word-wrap: break-word; word-break: break-all"><%= c_project.project.description %></td>
									</tr>
								
									<tr>
										<td valign="top"><span class="font_lighter">
											<%= format_time c_project.created_at%>
										</span></td>
									</tr>
								</table>
							</td>
							
							<td width="30%">
								<div class="bid-user-message" style="border-left:  1px solid rgb(225, 225, 225); margin-left: 20px; padding-left: 20px;">
									<table width="100%">
											<tr>
												<td>
													<strong>
														<%= l(:label_contest_user) %>											
														<% unless c_project.user.nil? %>
                                                         <!-- modified by zjc 添加超链接 -->
                                                            <%= link_to c_project.user.lastname + c_project.user.firstname,
                                                                        user_path(c_project.user)
                                                            %>
														<% end %>
													</strong>
											
												</td>
																				
											</tr>
											<tr>
												<td style=" word-wrap: break-word; word-break: break-all">
													<%= l(:label_contest_reason) %>										
													<%= c_project.description %>
												</td>
											</tr>								
									</table>
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	<% end %>
<% end %>
	<div class="pagination">
      <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
    </div>

