<!-- fq -->
<% contests.each do |contest|%>
<table width="95%" border="0" style="padding-left: 10px; padding-top: 10px;">
	<tr>
		<td colspan="2" valign="top" width="50" >
            <% unless contest.author.nil? %>
                <%= link_to(image_tag(url_to_avatar(contest.author), :class => 'avatar'),
                          user_path(contest.author),
                          :class => "avatar")
                %>
          <% end %>
        </td>
		<td>
		<table width="100%" border="0">
			<tr>
				<td colspan="2" valign="top"><strong>
                  <% unless contest.author.nil? %>
                      <%= link_to(contest.author,
                               user_path(contest.author),
                               :class => 'bid_user')
                      %>:
                  <% end %>
                     &nbsp;<%= link_to(contest.name,
                                     contest_contestnotifications_path(contest),
                                     :class => 'bid_path',
                                     :target => "_blank") %></strong></td>
			</tr>
			<tr>
				<td width="500">
				<table border="0">
					<tr>
						<td>  
							<strong><%= l(:label_contests_reward_method) %>:&nbsp;&nbsp;
                              <span style="word-break: break-all; color: #15bccf; font-family: 14px; font-family: '微软雅黑'">
                                <%= contest.budget%>
                              </span>
                            </strong>
						</td>	
					</tr>
					
					<tr>
						<td class="font_lighter">
							<!-- <span class="font_lighter">
							<%#= l(:label_contest_project,
                                :count => contest.contesting_projects.count)
                        %>
                            (<strong><span style="font-size: 17px">
                            <%#= link_to(contest.contesting_projects.count,
                                     show_project_contest_path(contest),
                                     :target => "_blank")
                        %></span></strong>)</span>
							<span class="font_lighter">
							<%#= l(:label_contest_softapplication,
                               :count => contest.contesting_softapplications.count)
                        %>
                        (<strong><span style="font-size: 17px">
                        <%#= link_to(contest.contesting_softapplications.count,
                                 show_softapplication_contest_path(contest),
                                 :target => "_blank")
                        %>
                        </span></strong>)</span> -->
                            <!-- modified by longjun
                                将 or 改成 || -->
							<% if contest.id == 2 || contest.id == 3 || contest.id == 6 %>
								<%= l(:label_contest_work,
                                   :count => contest.contesting_projects.count)
                             %>
                              (<strong>
                                    <span style="font-size: 17px">
                                      <%= link_to(contest.projects.where('is_public=1').count,
                                              show_attendingcontest_contest_path(contest),
                                              :target => "_blank")
                                  %>
                                    </span>
                                </strong>)
							<% else %>
								<%= l(:label_contest_work,
                                   :count => contest.contesting_softapplications.count)
                             %>
                                      (<strong>
                                        <span style="font-size: 17px">
                                            <%= link_to(contest.contesting_softapplications.count,
                                                   show_attendingcontest_contest_path(contest),
                                                   :target => "_blank") %>
                                        </span>
                              </strong>)
							<% end %>
						</td>
					</tr>
					
				</table></td>
				<td width="200" align="right" class="a">
                  <span class="font_lighter">
                    <%= l :label_create_time %>: <%= format_time contest.created_on %>
                  </span>
                </td>
			</tr>
			<tr>
				<td>
					<div class="bid-description" style="border-left:  1px solid #d9d8d8; border-bottom: 1px solid #d9d8d8; padding-left: 20px; padding-bottom: 10px; margin-bottom: 20px;">
						<table width="100%">
							<tr>
								<!-- <td> <%#= contest.description%> </td> -->
							</tr>
						</table>
					</div>
				</td>
			</tr>
		</table></td>
	</tr>
</table>
<% end %>
<div class="pagination">
	<ul>
		
	</ul>
</div>

