调整竞赛页面加入竞赛,关注以及配置竞赛的显示样式

This commit is contained in:
wanglinchun 2014-04-16 21:16:51 +08:00
parent 1a6a20e761
commit 28ffd44e55
2 changed files with 28 additions and 21 deletions

View File

@ -56,29 +56,34 @@
<tr> <tr>
<td align="left" width="100px"> <td align="left" width="100px">
<%= image_tag(url_to_avatar(@user), :class => "avatar2") %> <%= image_tag(url_to_avatar(@user), :class => "avatar2") %>
</td> </td>
<td>
<table>
<tr>
<td class="info_font" style=" word-wrap: break-word; word-break: break-all"><%= h @contest.name %></td>
</tr>
<% if User.current.login? %>
<tr colspan='3'>
<td valign="middle">
<span style="display:block; margin-left:20px;"><%= join_in_competition(@contest, User.current)%></span>
<span style="display:block; margin-left:20px;"><span class="icon-fav icon"></span><%= new_watcher_link(@contest, User.current) %></span>
</td>
</tr>
<% end %>
</table> <td>
<!-- 竞赛的配置 --> <table>
<tr>
<td class="info_font" style=" word-wrap: break-word; word-break: break-all"><%= h @contest.name %></td>
</tr>
<% if User.current.login? %>
<tr colspan='3'>
<td valign="middle">
<span style="display:block; margin-left:20px; margin-bottom: 5px"><%= join_in_competition(@contest, User.current)%></span>
<span style="display:block; margin-left:20px;"><%= new_watcher_link(@contest, User.current) %></span>
</td>
</tr>
<% end %>
<!-- 竞赛的配置 -->
<% if User.current.logged? %> <% if User.current.logged? %>
<% if @contest.author.id == User.current.id %> <% if @contest.author.id == User.current.id %>
<%= link_to l(:label_contest_modify_settings), {:controller => 'contests', :action => 'settings', :id => @contest} %> <tr colspan='3'>
<td valign="middle">
<span style="display:block; margin-left:20px;"><%= link_to l(:label_contest_modify_settings), {:controller => 'contests', :action => 'settings', :id => @contest} %></span>
</td>
</tr>
<% end %> <% end %>
<% end %> <% end %>
</td> </table>
</td>
</tr>
</table> </table>
</div> </div>
<!-- 参与人和参与项目的数量显示 --> <!-- 参与人和参与项目的数量显示 -->
@ -201,8 +206,10 @@
</table> </table>
</div> </div>
</div> </div>
<div class="user_underline"></div>
</div> </div>
<div id="content"> <div id="content">
<% if display_main_menu?(@contest) %> <% if display_main_menu?(@contest) %>
<div class="tabs_new"> <div class="tabs_new">

View File

@ -119,7 +119,7 @@
<!--搜索框--> <!--搜索框-->
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;"> <div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
<%= form_tag({controller: 'contests', action: 'index'}, method: :get) do %> <%= form_tag({controller: 'contests', action: 'index'}, method: :get) do %>
<%= text_field_tag 'name', params[:name], placeholder:'请输入要搜索的关键字', name: "name", :class => 'blueinputbar', :style => 'width:240px;'%> <%= text_field_tag 'name', params[:name], placeholder:'请输入要搜索的关键字', name: "name", :class => 'blueinputbar', :style => 'width:240px; padding-right:50px;'%>
&nbsp; &nbsp;
<%= hidden_field_tag 'project_type', params[:project_type] %> <%= hidden_field_tag 'project_type', params[:project_type] %>
<%= submit_tag l(:label_search), :class => "enterprise" , :name => nil%> <%= submit_tag l(:label_search), :class => "enterprise" , :name => nil%>
@ -175,7 +175,7 @@
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span> <span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
<div class="d-p-projectlist-box"> <div class="d-p-projectlist-box">
<ul class="d-p-projectlist"> <ul class="d-p-projectlist">
<% find_new_forum_topics(10).each do |topic|%> <% find_new_forum_topics(11).each do |topic|%>
<li class="message-brief-intro" style="min-height: 60px; line-height:2em; "> <li class="message-brief-intro" style="min-height: 60px; line-height:2em; ">
<div style="display: inline-block; width: 100%;"> <div style="display: inline-block; width: 100%;">
<span style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;