修改了作业、项目、课程页面

This commit is contained in:
huangjingquan 2013-11-04 20:51:47 +08:00
parent 20c2feef30
commit c8427fe61e
5 changed files with 64 additions and 38 deletions

View File

@ -22,6 +22,31 @@
<div id="wrapper3">
<%= render :partial => 'layouts/base_header'%>
<div id="main">
<!--added by huang-->
<div class="top-content">
<% @project = Project.find_by_id(@project.id)%>
<% @course = Course.find_by_extra(@project.identifier)%>
<table>
<tr>
<td class="info_font" style="width: 240px">高校课程实践社区</td>
<td style="width: 350px"><strong>当前单位 : <!-- <%= @course.teacher.user_extensions.occupation %> --></strong></td>
<td rowspan="2" width="350px">
<div class="top-content-search">
<%= form_tag(:controller => 'projects', :action => "search", :method => :get) do %>
<%= text_field_tag 'name', params[:name], :size => 30 %>
<%= hidden_field_tag 'project_type', params[:project_type] %>
<%= submit_tag l(:label_search), :class => "small", :name => nil %>
<% end %>
</div>
</td>
</tr>
<tr>
<td style="padding-left: 8px"><a>forge.trustie.net/courses</a></td>
<td ><%=link_to "主页", home_path %> > <%=link_to "实践课程", :controller => 'projects', :action => 'index' %> > <span><%=link_to @project.name, project_path %>(<%= @course.time %><%= @course.term %>)</span></td>
</tr>
</table>
</div>
<!--end-->
<!--project page-->
<div id="sidebar">
<div class="spaceleft">

View File

@ -19,7 +19,25 @@
<div id="wrapper2">
<div id="wrapper3">
<%= render :partial => 'layouts/base_header'%>
<div id="main" class="">
<div id="main">
<!--added by huang-->
<div class="top-content">
<table>
<tr>
<td class="info_font" style="width: 240px">高校课程实践社区</td>
<td style="width: 350px"><strong>当前单位 : </strong></td>
<td rowspan="2" width="350px">
</td>
</tr>
<tr>
<td style="padding-left: 8px"><a>forge.trustie.net/courses</a></td>
<td ><%=link_to "主页", home_path %> > <%=link_to "实践课程", :controller => 'projects', :action => 'index' %> > <span><%= link_to(@bid.courses.first.name, project_path(@bid.courses.first)) %>()</span> > <%=link_to "作业列表", :controller =>'projects', :action => 'homework'%></td>
</tr>
</table>
</div>
<!--end-->
<div id="sidebar">
<div class="main_context">
<div class="spaceleft">

View File

@ -22,35 +22,28 @@
<div id="wrapper3">
<%= render :partial => 'layouts/base_header'%>
<div id="main">
<!--added by huang-->
<div class="top-content">
<table><tr><td>
<div class="top-content-home">
<table>
<tr>
<td>创客主页</td>
<td class="info_font" style="width: 240px">创客主页</td>
<td style="width: 350px"><strong>当前位置 : </strong></td>
<td rowspan="2" width="350px">
<div class="top-content-search">
<%= form_tag(:controller => 'users', :action => 'search', :method => :get) do %>
<%= text_field_tag 'name', params[:name], :size => 30 %>
<%= submit_tag l(:label_search), :class => "small", :name => nil %>
<% end %>
</div>
</td>
</tr>
<tr>
<td>forge.trustie.net</td>
<td style="padding-left: 8px"><a>http://forge.trustie.net</a></td>
<td ><%=link_to "主页", home_path %> > <%=link_to "软件创客", :controller => 'users', :action => 'index' %> > <span><%=link_to @user.name, user_path %></span></td>
</tr>
</table>
</div></td>
<td>
<div class="top-content-location">
<table>
<tr>
<td>当前位置:</td>
</tr>
<tr>
<td>主页 > 软件创客 > <%= @user.show_name %></td>
</tr>
</table>
</div></td>
<td>
<div class="top-content-search">
das
</div></td></tr>
</table>
</div>
<!--end-->
<!--user page, add by huang-->
<div id="sidebar">
<div class="main_context">

View File

@ -1,22 +1,9 @@
<% if User.current.id == @user.id%>
<%= show_activity @state%>
<%= form_tag(:controller => 'users', :action => "show") do %>
<div class="user-search-block">
<table width="100%" valign="center">
<tr>
<td align="right">
<div class="project-search">
<%= text_field_tag 'user', params[:user], :size => 30 %>
<%= submit_tag l(:label_search_by_user), :class => "small", :name => nil %>
</div></td>
</tr>
</table>
</div>
<% end %>
<% end %>
<% unless @state == 2%>
<% unless @activity.empty? %>
<div id="activity">

View File

@ -13,8 +13,10 @@ h4 {border-bottom: 1px dotted #bbb;}
/**/
.top-content{
background-color: rgb(226, 244, 255);
height: 50px;
height: 45px;
width: 940px;
line-height: 1em;
padding-top: 5px;
}
.top-content-home{
@ -24,7 +26,8 @@ h4 {border-bottom: 1px dotted #bbb;}
}
.top-content-search{
float: right
float: right;
padding-right: 15px;
}