socialforge/app/views/layouts/base_homework.html.erb

182 lines
7.2 KiB
Plaintext
Raw Normal View History

2014-01-23 10:08:46 +08:00
<% @nav_dispaly_course_label = 1 %>
2013-09-13 10:11:36 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" />
2013-11-08 17:20:26 +08:00
<title><%=h l(:label_active_homework) << " - Trustie" %></title>
2013-09-13 10:11:36 +08:00
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %>
2013-09-13 10:11:36 +08:00
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>
</head>
<body class="<%= h body_css_classes %>">
<div id="wrapper">
<div id="wrapper2">
2013-11-04 15:20:22 +08:00
<div id="wrapper3">
<%= render :partial => 'layouts/base_header'%>
<div id="main">
<!--added by huang-->
<div class="top-content">
<table>
<tr>
2013-11-05 12:49:57 +08:00
<td class="info_font" style="width: 240px; color: #15bccf"">高校课程实践社区</td>
<td style="width: auto; color: #15bccf""><strong><%= l(:label_user_location) %> : </strong></td>
</tr>
<tr>
<td style="padding-left: 8px"><a><%= link_to request.host()+"/courses", :controller => 'projects', :action => 'course'%></a></td>
2014-01-09 08:45:16 +08:00
<td><p class="top-content-list-homework"><%=link_to "主页", home_path %> > <%=link_to l(:label_course_practice), :controller => 'projects', :action => 'course' %> >
2014-03-07 11:28:52 +08:00
<span><%= link_to(@bid.courses.first.name.to_s, homework_project_path(@bid.courses.first)) if @bid.courses.first%></span> >
<%=link_to(@bid.name, respond_path(@bid)) %></p></td>
</tr>
</table>
</div>
<!--end-->
2013-09-13 10:11:36 +08:00
<div id="sidebar">
<div class="main_context">
<div class="spaceleft">
2013-09-23 08:44:48 +08:00
<div>
2013-11-05 12:54:48 +08:00
<table style="width: 232px ; padding-left: 8px; font-size:16px; line-height: 1.5em">
<tr valign="top">
2013-11-05 12:54:48 +08:00
<td style="width: 70px" >课程名:</td>
<td>
2014-03-07 11:28:52 +08:00
<span style=" word-wrap: break-word; word-break: break-all"><strong> <%= link_to @bid.courses.first.name.to_s, homework_project_path(@bid.courses.first) if @bid.courses.first %></strong></span>
</td>
</tr>
2013-11-05 12:54:48 +08:00
<tr style="">
<td width="70px">作业名:</td>
2013-11-05 12:54:48 +08:00
<td>
2013-11-05 09:17:50 +08:00
<span style="color:#ed8924"><strong><%= h @bid.name %></strong></span>
</td>
</tr>
2013-11-05 10:58:23 +08:00
<!-- <tr>
<td></td>
<td align="center">
<span class="bid_course" style="padding-left: 8px"> <% if @user != User.current %>
<%= watcher_link(@bid, User.current) %>
<% end %> </span>
</td>
2013-11-05 10:58:23 +08:00
</tr> -->
2013-09-13 10:11:36 +08:00
</table>
</div>
<div class="user_underline"></div>
<!--count-->
<!-- info -->
<div class="inf_user_image">
2013-09-13 10:11:36 +08:00
<table>
2013-09-13 10:11:36 +08:00
<tr>
<td style="text-align: justify ; text-justify: inter-ideograph; width: 180px"><%= l(:label_teacher_homework) %> : <%= link_to(@user.lastname+@user.firstname, user_path(@user)) %></td>
2013-09-13 10:11:36 +08:00
</tr>
2013-09-13 10:11:36 +08:00
<tr>
<td><%= l(:label_limit_time) %>: <%= @bid.deadline %></td>
2013-09-26 10:10:53 +08:00
</tr>
<% unless @bid.parent_id.nil?%>
<tr>
<td>
<div style=" color: rgb(255, 0, 0); width:200px">
<% author=Bid.find(@bid.parent_id).author%>
作业来源于<%= link_to(author.lastname+author.firstname, user_path(Bid.find(@bid.parent_id).author))%>的需求:<%= link_to(Bid.find(@bid.parent_id).name, respond_path(Bid.find(@bid.parent_id))) %>
</div></td>
2013-09-26 10:10:53 +08:00
</tr>
<% end %>
2013-09-13 10:11:36 +08:00
</table>
</div>
2013-09-23 08:44:48 +08:00
<!-- tags -->
2013-09-13 10:11:36 +08:00
<div class="user_fans">
2013-09-23 08:44:48 +08:00
<div class="user_underline"></div>
<table style="font-family:微软雅黑; padding-left: 8px">
2013-09-13 10:11:36 +08:00
<tr>
2013-09-23 08:44:48 +08:00
<td><!-- added by william -for tag --> <%= render :partial => 'tags/tag', :locals => {:obj => @bid, :object_flag => "4"}%> </td>
2013-09-13 10:11:36 +08:00
</tr>
</table>
</div>
2013-09-23 08:44:48 +08:00
2013-09-13 10:11:36 +08:00
<!--homework-->
<div class="user_fans">
2013-09-13 10:11:36 +08:00
<div class="user_underline"></div>
<div class="font_title_left">
<strong><%= l(:label_commit_homework) %></strong>
</div>
2013-09-13 10:11:36 +08:00
<div class="left_wf">
<table>
<tr>
2013-09-23 08:44:48 +08:00
<td style="padding-top: 5px"> <% if @bid.homework_type == 1%>
<% if @bid.homeworks.size>0 %>
<% for homework in @bid.homeworks %>
2013-11-02 12:42:30 +08:00
<%= link_to image_tag(url_to_avatar(homework.user), :class => "avatar", :title => homework.user.name), user_path(homework.user), :class => "avatar" %> <% end %>
2013-09-23 08:44:48 +08:00
<% else %>
<p class="font_lighter">
<%= l(:label_no_course_project) %>
</p> <% end %>
<% else %>
<% if @bid.projects.size>0 %>
<% for project in @bid.projects%>
2013-11-02 12:42:30 +08:00
<%= link_to image_tag(url_to_avatar(project), :class => "avatar", :title => project.name), project_path(project), :class => "avatar" %> <% end %>
2013-09-23 08:44:48 +08:00
<% else %>
<p class="font_lighter">
<%= l(:label_no_course_project) %>
</p> <% end %>
<% end %> </td>
</tr>
2013-09-13 10:11:36 +08:00
</table>
</div>
</div>
<div class="user_underline"></div>
</div>
</div>
<!-- end -->
</div>
2013-09-23 08:44:48 +08:00
<div id="content">
<div class="tabs_new">
<ul>
<li>
<%= link_to l(:label_question_student), {:controller => 'bids', :action => 'show' },:class => link_class(:respond)%>
</li>
<li>
2014-03-07 11:28:52 +08:00
<% if User.current.logged? && @bid.courses.first && (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',5, 10, 7)).size >0) %>
2013-09-23 08:44:48 +08:00
<%= link_to l(:label_homework_commit), {:controller => 'bids', :action => 'show_project' },:class => link_class(:project)%>
<% else %>
<%= link_to l(:label_homework_info), {:controller => 'bids', :action => 'show_project' },:class => link_class(:project)%>
2013-09-23 08:44:48 +08:00
<% end %>
</li>
2013-09-22 16:11:39 +08:00
<!-- <li><%= link_to l(:label_homework_statistics), { :controller => 'bids', :action => 'homework_statistics' },:class => link_class(:homework_statistics)%></li> -->
2013-09-14 17:25:57 +08:00
<!-- <li><%= link_to l(:label_homework_respond), { :controller => 'bids', :action => 'homework_respond' },:class => link_class(:homework_respond)%></li>
2013-09-23 08:44:48 +08:00
--><ul>
</div>
2013-09-13 10:11:36 +08:00
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
</div>
2013-09-23 08:44:48 +08:00
<%= render :partial => 'layouts/base_footer'%>
2013-09-13 10:11:36 +08:00
</div>
</div>
</div>
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
</div>
<div id="ajax-modal" style="display:none;"></div>
</div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>