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 %>
|
2013-12-19 15:59:10 +08:00
|
|
|
<%= 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 %>">
|
2014-06-05 16:53:41 +08:00
|
|
|
<% project = @bid.courses.includes(:course_extra).first %>
|
|
|
|
<% course = project.course_extra %>
|
2013-09-13 10:11:36 +08:00
|
|
|
<div id="wrapper">
|
|
|
|
<div id="wrapper2">
|
2014-06-05 15:57:40 +08:00
|
|
|
<div id="wrapper3">
|
|
|
|
<%= render :partial => 'layouts/base_header'%>
|
2013-11-04 20:51:47 +08:00
|
|
|
<div id="main">
|
|
|
|
<!--added by huang-->
|
2014-06-05 15:57:40 +08:00
|
|
|
<div class="top-content">
|
2013-11-04 20:51:47 +08:00
|
|
|
<table>
|
|
|
|
<tr>
|
2014-05-29 08:37:54 +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>
|
2014-06-05 15:57:40 +08:00
|
|
|
|
2013-11-04 20:51:47 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2014-02-25 11:27:36 +08:00
|
|
|
<td style="padding-left: 8px"><a><%= link_to request.host()+"/courses", :controller => 'projects', :action => 'course'%></a></td>
|
2014-06-05 15:57:40 +08:00
|
|
|
<td><p class="top-content-list-homework"><%=link_to "主页", home_path %> > <%=link_to l(:label_course_practice), :controller => 'projects', :action => 'course' %> >
|
|
|
|
<span><%= link_to(@bid.courses.first.name.to_s, homework_project_path(@bid.courses.first)) if @bid.courses.first%></span> >
|
2013-11-12 10:44:15 +08:00
|
|
|
<%=link_to(@bid.name, respond_path(@bid)) %></p></td>
|
2013-11-04 20:51:47 +08:00
|
|
|
</tr>
|
2014-06-05 15:57:40 +08:00
|
|
|
</table>
|
2013-11-04 20:51:47 +08:00
|
|
|
</div>
|
|
|
|
<!--end-->
|
2014-06-05 15:57:40 +08:00
|
|
|
|
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>
|
2014-06-04 17:22:42 +08:00
|
|
|
<table>
|
2014-05-28 19:54:53 +08:00
|
|
|
<tr>
|
2014-06-04 17:22:42 +08:00
|
|
|
<td style="padding-left:8px ">
|
2014-05-28 19:54:53 +08:00
|
|
|
<% if get_avatar?(project) %>
|
2014-06-04 17:22:42 +08:00
|
|
|
<%= image_tag(url_to_avatar(project),:style => "width:80px;height:80px" ) %>
|
2014-05-28 19:54:53 +08:00
|
|
|
<% else %>
|
2014-06-04 17:22:42 +08:00
|
|
|
<%= image_tag('../images/avatars/Project/course.jpg', :style => "width:80px;height:80px") %>
|
2014-05-28 19:54:53 +08:00
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<table>
|
2014-06-04 17:22:42 +08:00
|
|
|
<tr>
|
|
|
|
<td style="vertical-align: top;font-size: 16px;text-align: center;" >
|
|
|
|
<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>
|
2014-05-28 19:54:53 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2014-06-04 17:22:42 +08:00
|
|
|
<td style=" word-wrap: break-word; word-break: break-all;font-size: 16px;text-align: center">
|
|
|
|
<span style=" color:#ed8924">
|
2014-06-18 11:42:59 +08:00
|
|
|
<!-- modified by zjc 添加超链接 -->
|
|
|
|
<strong><%=link_to(@bid.name, respond_path(@bid)) %></strong>
|
2014-06-04 17:22:42 +08:00
|
|
|
</span>
|
2014-05-28 19:54:53 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2013-10-16 22:02:05 +08:00
|
|
|
</div>
|
|
|
|
<div class="user_underline"></div>
|
|
|
|
<!--count-->
|
2014-05-28 19:54:53 +08:00
|
|
|
|
|
|
|
<div class="inf_user_image">
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td valign="top" colspan="2" style="font-size: 16px;padding-left: 8px;"><strong><%= l(:label_new_course_description) %> :</strong></td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
2014-06-12 16:43:02 +08:00
|
|
|
<td class="font_lighter_sidebar" colspan="2" style="padding-left: 8px;"><%= textilizable project.description %></td>
|
2014-05-28 19:54:53 +08:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td valign="top" style="padding-left: 8px;"><%= l(:label_create_time) %> :</td>
|
|
|
|
<td class="font_lighter_sidebar"><%= format_time course.created_at %></td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td valign="top" style="padding-left: 8px; width:60px">主讲老师 :</td>
|
|
|
|
<td class="font_lighter_sidebar"><%= link_to(@user.lastname+@user.firstname, user_path(@user)) %></td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td valign="top" style="padding-left: 8px;"><%= l(:label_class_period) %> :</td>
|
|
|
|
<td class="font_lighter_sidebar"><%= course.class_period.to_s %> <%= l(:label_class_hour) %></td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td valign="top" style="padding-left: 8px;"><%= l(:label_main_term) %> :</td>
|
|
|
|
<td class="font_lighter_sidebar"><%= course.time.to_s %> <%= course.term %></td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td valign="top" style="padding-left: 8px;"><%= l(:label_teacher_work_unit) %> :</td>
|
2014-06-18 11:42:59 +08:00
|
|
|
<!-- modified by zjc 有@user.user_extensions.occupation改为 @user.user_extensions.school 并添加超链接 -->
|
|
|
|
<td class="font_lighter_sidebar"><%= link_to @user.user_extensions.school,options={:controller => 'welcome',:action => 'course',:school_id => @user.user_extensions.school.id}, html_options={:method => 'get'} %></td>
|
2014-05-28 19:54:53 +08:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div class="user_underline"></div>
|
|
|
|
|
2013-10-16 22:02:05 +08:00
|
|
|
<!-- info -->
|
|
|
|
<div class="inf_user_image">
|
2013-09-13 10:11:36 +08:00
|
|
|
<table>
|
2013-10-31 15:58:14 +08:00
|
|
|
|
2013-09-13 10:11:36 +08:00
|
|
|
<tr>
|
2013-11-01 08:45:24 +08:00
|
|
|
<td><%= l(:label_limit_time) %>: <%= @bid.deadline %></td>
|
2013-09-26 10:10:53 +08:00
|
|
|
</tr>
|
2014-04-10 09:34:09 +08:00
|
|
|
<tr>
|
|
|
|
<td>作业类型: <%=@bid.homework_type==Bid::HomeworkFile ? "提交文件" : "提交项目"%></td>
|
|
|
|
</tr>
|
2013-09-26 10:10:53 +08:00
|
|
|
<% unless @bid.parent_id.nil?%>
|
|
|
|
<tr>
|
2013-10-16 22:02:05 +08:00
|
|
|
<td>
|
|
|
|
<div style=" color: rgb(255, 0, 0); width:200px">
|
2013-10-10 23:02:15 +08:00
|
|
|
<% author=Bid.find(@bid.parent_id).author%>
|
2013-10-16 22:02:05 +08:00
|
|
|
作业来源于<%= 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>
|
2013-10-16 22:02:05 +08:00
|
|
|
<% 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>
|
2014-05-29 08:37:54 +08:00
|
|
|
<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">
|
2014-02-26 10:02:51 +08:00
|
|
|
|
2013-09-13 10:11:36 +08:00
|
|
|
<div class="user_underline"></div>
|
2014-02-26 10:02:51 +08:00
|
|
|
<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 %>
|
2014-06-05 17:29:11 +08:00
|
|
|
<% for homework in @bid.homeworks.eager_load(:user) %>
|
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>
|
2014-05-21 17:33:02 +08:00
|
|
|
<% if User.current.member_of? @bid.courses.first%>
|
2013-09-23 08:44:48 +08:00
|
|
|
<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-10-16 22:02:05 +08:00
|
|
|
|
2013-09-23 08:44:48 +08:00
|
|
|
<% end %>
|
|
|
|
</li>
|
2014-05-21 17:33:02 +08:00
|
|
|
<% end %>
|
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>
|
2014-05-21 17:33:02 +08:00
|
|
|
--></ul>
|
2013-09-23 08:44:48 +08:00
|
|
|
</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>
|