修改了竞赛列表的排序问题

This commit is contained in:
wanglinchun 2014-04-11 21:56:35 +08:00
parent 4ccc4548a1
commit f9e5dd47f6
4 changed files with 9 additions and 7 deletions

View File

@ -62,12 +62,12 @@ module ContestsHelper
content = ''.html_safe content = ''.html_safe
case state case state
when 0 when 0
content << content_tag('li', link_to(l(:label_sort_by_active), contest_path(:contest_sort_type => '1'))) content << content_tag('li', link_to(l(:label_sort_by_active), {controller: 'contests', action: 'index' ,:contest_sort_type => '1'}))
content << content_tag('li', link_to(l(:label_sort_by_time), contest_path(:contest_sort_type => '0'), :class=>"selected"), :class=>"selected") content << content_tag('li', link_to(l(:label_sort_by_time), {controller: 'contests', action: 'index' ,:contest_sort_type => '0'}, :class=>"selected"), :class=>"selected")
when 1 when 1
content << content_tag('li', link_to(l(:label_sort_by_active), contest_path(:contest_sort_type => '1'), :class=>"selected"), :class=>"selected") content << content_tag('li', link_to(l(:label_sort_by_active), {controller: 'contests', action: 'index' ,:contest_sort_type => '1'}, :class=>"selected"), :class=>"selected")
content << content_tag('li', link_to(l(:label_sort_by_time), contest_path(:contest_sort_type => '0'))) content << content_tag('li', link_to(l(:label_sort_by_time), {controller: 'contests', action: 'index' ,:contest_sort_type => '0'}))
end end
content = content_tag('ul', content) content = content_tag('ul', content)
content_tag('div', content, :class => "tabs") content_tag('div', content, :class => "tabs")

View File

@ -92,7 +92,7 @@
<%=link_to "#{@contest.projects.where('is_public=1').count}", :controller => 'contests', :action => 'show_project' %> <%=link_to "#{@contest.projects.where('is_public=1').count}", :controller => 'contests', :action => 'show_project' %>
</td> </td>
<td class="font_index"> <td class="font_index">
<%=link_to "#{@contest.projects.where('is_public=1').count}", :controller => 'contests', :action => 'show_softapplication' %> <%=link_to "#{@contest.contesting_softapplications.count}", :controller => 'contests', :action => 'show_softapplication' %>
</td> </td>
<tr class="font_aram"> <tr class="font_aram">
<td align="center" width="70px"> <%= l(:label_participate) %></td> <td align="center" width="70px"> <%= l(:label_participate) %></td>

View File

@ -53,7 +53,7 @@
<% @project = Project.find_by_id(@project.id)%> <% @project = Project.find_by_id(@project.id)%>
<table> <table>
<tr> <tr>
<td><%= image_tag(url_to_avatar(@project), :class => 'avatar2') %></td>
<td> <td>
<div class="info-course"> <div class="info-course">
<%= @project.name %> <%= @project.name %>

View File

@ -9,9 +9,11 @@
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>
<%= image_tag(url_to_avatar(@user), :class => "avatar2") %>
<div style="height: 120px"> <div style="height: 120px">
<tr> <tr>
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(@softapplication), :class => "avatar2") %></td> <td colspan="2" valign="top" width="50" >
</td>
<td> <td>
<table width="100%" border="0"> <table width="100%" border="0">
<tr style="font-size: 18px"> <tr style="font-size: 18px">