修改课程,竞赛layout中主页连接。

修改页面显示样式
优化代码
This commit is contained in:
sw 2014-11-26 11:44:39 +08:00
parent 851ef240c1
commit ff93a62685
2 changed files with 95 additions and 47 deletions

View File

@ -29,8 +29,16 @@
<div class="top-content"> <div class="top-content">
<table> <table>
<tr> <tr>
<td class="info_font" style="width: 240px; color: #15bccf"><%=l(:label_contest_innovate_community)%></td> <td class="info_font" style="width: 240px;" rowspan="2">
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td> <a href="http://<%= Setting.host_contest%>" style="color: #15bccf;">
<%=l(:label_contest_innovate_community)%>
</a>
</td>
<td style="width: 430px; color: #15bccf">
<strong>
<%= l(:label_user_location) %> :
</strong>
</td>
<td rowspan="2" width="250px"> <td rowspan="2" width="250px">
<div class="project-search"> <div class="project-search">
<%= form_tag(:controller => 'bids', :action => 'contest', :method => :get) do %> <%= form_tag(:controller => 'bids', :action => 'contest', :method => :get) do %>
@ -43,9 +51,13 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="padding-left: 8px"><%=link_to request.host()+"/contest", :controller => 'bids', :action => 'contest' %></td> <td >
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_contest_innovate), :controller => 'bids', :action => 'contest' %> > <%=link_to l(:field_homepage), home_path %> >
<span><%= link_to @bid.name, bid_path %></span></td> <%= l(:label_contest_innovate)%> >
<span>
<%= link_to @bid.name, bid_path %>
</span>
</td>
</tr> </tr>
</table> </table>
</div> </div>
@ -58,27 +70,29 @@
<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> <td>
<table> <table>
<tr> <tr>
<td class="info_font" style=" word-wrap: break-word; word-break: break-all"><%= h @bid.name %></td> <td class="info_font" style=" word-wrap: break-word; word-break: break-all">
</tr> <%= h @bid.name %>
<% if User.current.login? %> <!--added by linchun-->
<tr colspan='3'>
<td valign="middle">
<span style="display:block; margin-left:20px;">
<%= join_in_contest(@bid, User.current)%>
</span>
<span style="display:block; margin-left:20px;">
<span class="icon-fav icon"></span>
<%= watcher_link(@bid, User.current) %>
</span>
</td> </td>
</tr> </tr>
<% end %> <% if User.current.login? %> <!--added by linchun-->
</table> <tr colspan='3'>
<!-- added by bai 增加了竞赛的配置 --> <td valign="middle">
<span style="display:block; margin-left:20px;">
<%= join_in_contest(@bid, User.current)%>
</span>
<span style="display:block; margin-left:20px;">
<span class="icon-fav icon"></span>
<%= watcher_link(@bid, User.current) %>
</span>
</td>
</tr>
<% end %>
</table>
<!-- added by bai 增加了竞赛的配置 -->
<% if User.current.logged? %> <% if User.current.logged? %>
<% if @bid.author.id == User.current.id %> <% if @bid.author.id == User.current.id %>
<%= link_to l(:label_contest_modify_settings), {:controller => 'bids', :action => 'settings', :id => @bid} %> <%= link_to l(:label_contest_modify_settings), {:controller => 'bids', :action => 'settings', :id => @bid} %>
@ -100,8 +114,12 @@
:action => 'show_project' %> :action => 'show_project' %>
</td> </td>
<tr class="font_aram"> <tr class="font_aram">
<td align="center" width="70px"> <%= l(:label_participator) %></td> <td align="center" width="70px">
<td align="center" width="70px"> <%= l(:label_bidding_project) %></td> <%= l(:label_participator) %>
</td>
<td align="center" width="70px">
<%= l(:label_bidding_project) %>
</td>
</tr> </tr>
</table> </table>
<div class="user_underline"></div> <div class="user_underline"></div>
@ -110,14 +128,22 @@
<div class="inf_user_image"> <div class="inf_user_image">
<table> <table>
<tr> <tr>
<td><%= l(:lable_contest_user) %><%= link_to(@user.name, user_path(@user))%></td> <td>
</tr> <%= l(:lable_contest_user) %>
<%= link_to(@user.name, user_path(@user))%>
<tr> </td>
<td><%= l(:label_bids_reward_method) %><%= @bid.budget%></td>
</tr> </tr>
<tr> <tr>
<td><%= l(:label_limit_time) %> : <%= @bid.deadline%></td> <td>
<%= l(:label_bids_reward_method) %>
<%= @bid.budget%>
</td>
</tr>
<tr>
<td>
<%= l(:label_limit_time) %> :
<%= @bid.deadline%>
</td>
</tr> </tr>
</table> </table>
</div> </div>
@ -130,7 +156,6 @@
<div style="padding-bottom: 8px"> <div style="padding-bottom: 8px">
<% if @bid.description.size>0 %> <% if @bid.description.size>0 %>
<div class="font_lighter_sidebar"> <div class="font_lighter_sidebar">
<%= textilizable @bid.description %> <%= textilizable @bid.description %>
</div> </div>
<% else %> <% else %>
@ -139,7 +164,10 @@
</div> </div>
<% end %> <% end %>
<div class="created_on_project"> <div class="created_on_project">
<strong style="color: #068d9c"><%= l(:label_create_time) %></strong><%= format_time(@bid.created_on) %> <strong style="color: #068d9c">
<%= l(:label_create_time) %>
</strong>
<%= format_time(@bid.created_on) %>
</div> </div>
</div> </div>
<div class="user_underline"></div> <div class="user_underline"></div>
@ -158,9 +186,13 @@
<div class="user_fans"> <div class="user_fans">
<div class="user_underline"></div> <div class="user_underline"></div>
<div class="font_title_left"> <div class="font_title_left">
<strong><%= l(:label_x_followers, :count => @bid.watcher_users.count) %></strong> <strong>
<%= l(:label_x_followers, :count => @bid.watcher_users.count) %>
</strong>
<% if show_more_fans?(@bid) %> <% if show_more_fans?(@bid) %>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;"><%= link_to l(:label_more), :controller => 'bids', :action => 'show_bid_user'%></span> <span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;">
<%= link_to l(:label_more), :controller => 'bids', :action => 'show_bid_user'%>
</span>
<% end %> <% end %>
</div> </div>
<div class="left_wf"> <div class="left_wf">
@ -177,9 +209,13 @@
<div class="user_fans"> <div class="user_fans">
<div class="user_underline"></div> <div class="user_underline"></div>
<div class="font_title_left"> <div class="font_title_left">
<strong><%= l(:label_bidding_project) %></strong> <strong>
<%= l(:label_bidding_project) %>
</strong>
<% if show_more_bid_project?(@bid) %> <% if show_more_bid_project?(@bid) %>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;"><%= link_to l(:label_more), :controller => 'bids', :action => 'show_project'%></span> <span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;">
<%= link_to l(:label_more), :controller => 'bids', :action => 'show_project'%>
</span>
<% end %> <% end %>
</div> </div>
<div class="left_wf"> <div class="left_wf">
@ -200,7 +236,9 @@
<!--fans fq--> <!--fans fq-->
<div class="user_fans"> <div class="user_fans">
<div class="font_title_left"> <div class="font_title_left">
<strong><%= l(:label_x_join_in_contest, :count => @bid.join_in_contests.count) %></strong> <strong>
<%= l(:label_x_join_in_contest, :count => @bid.join_in_contests.count) %>
</strong>
<% if show_more_participate?(@bid) %> <% if show_more_participate?(@bid) %>
<span style="font-size: 12px; display: inline; float: right;" > <span style="font-size: 12px; display: inline; float: right;" >
<%= link_to l(:label_more), :controller => "bids", :action => "show_participator"%> <%= link_to l(:label_more), :controller => "bids", :action => "show_participator"%>
@ -210,7 +248,9 @@
<div class="left_wf"> <div class="left_wf">
<table> <table>
<tr> <tr>
<td style="padding-top: 5px"> <%= show_participate_picture(@bid) %> </td> <td style="padding-top: 5px">
<%= show_participate_picture(@bid) %>
</td>
</tr> </tr>
</table> </table>
</div> </div>
@ -234,7 +274,9 @@
</div> </div>
<div id="ajax-indicator" style="display:none;"> <div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span> <span>
<%= l(:label_loading) %>
</span>
</div> </div>
<div id="ajax-modal" style="display:none;"></div> <div id="ajax-modal" style="display:none;"></div>

View File

@ -34,7 +34,11 @@
<div class="top-content"> <div class="top-content">
<table> <table>
<tr> <tr>
<td class="info_font" style="width: 240px; color: #15bccf">高校课程实践社区</td> <td class="info_font" style="width: 240px;" rowspan="2">
<a href="http://<%= Setting.host_course%>" style="color: #15bccf;">
高校课程实践社区
</a>
</td>
<td style="color: #15bccf"> <td style="color: #15bccf">
<strong> <strong>
<%= l(:label_user_location) %> : <%= l(:label_user_location) %> :
@ -50,14 +54,16 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="padding-left: 8px">
<%= link_to request.host()+"/course", :controller => 'courses', :action => 'index' %>
</td>
<td> <td>
<p class="top-content-list"> <p class="top-content-list">
<%= link_to "主页", home_path %> <%= link_to "主页", home_path %>
> <a href="http://<%= Setting.host_course%>" class="link_other_item"><%=l(:label_courses_management_platform)%></a> >
> <%= link_to @course.name, nil %> <a href="http://<%= Setting.host_course%>" class="link_other_item">
<%=l(:label_courses_management_platform)%>
</a>
>
<%= link_to @course.name, nil %>
</p> </p>
</td> </td>
</tr> </tr>