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

170 lines
6.3 KiB
Plaintext
Raw Normal View History

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" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %>
<%= 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">
<div id="wrapper3">
2013-09-23 08:44:48 +08:00
2013-09-30 09:42:13 +08:00
<% if session[:enterprise_college] == 2 %>
<%= render :partial => 'layouts/base_enterprise_header'%>
2013-09-30 09:42:13 +08:00
<% elsif session[:enterprise_college] == 1 %>
<%= render :partial => 'layouts/base_college_header'%>
2013-09-30 09:42:13 +08:00
<% else %>
<%= render :partial => 'layouts/base_header'%>
2013-09-30 09:42:13 +08:00
<% end %>
2013-09-23 08:44:48 +08:00
2013-09-13 10:11:36 +08:00
<div id="main" class="">
<div id="sidebar">
<div class="main_context">
<div class="spaceleft">
2013-09-23 08:44:48 +08:00
<div>
<table style="width: 232px ; height: 80px; padding-left: 8px">
<tr style="font-size:16px">
<td width="70px">课程名:</td>
<td align="center" style="font-size: 18px">
<strong> <%= link_to(@bid.courses.first.name, project_path(@bid.courses.first)) %></strong>
</td>
</tr>
<tr style="font-size:16px">
<td width="70px">作业名:</td>
<td align="center">
<span style="color:#ed8924"><%= h @bid.name %></span>
</td>
</tr>
2013-09-13 10:11:36 +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>
</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>
2013-09-23 08:44:48 +08:00
<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">
<div class="font_title_left">
<strong><%= l(:label_commit_homework) %></strong>
</div>
<div class="user_underline"></div>
<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 %>
<%= link_to image_tag(url_to_avatar(homework.user), :class => "avatar", :title => homework.user.name), user_path(homework.user), :class => "avatar" %>
<% end %>
<% else %>
<p class="font_lighter">
<%= l(:label_no_course_project) %>
</p> <% end %>
<% else %>
<% if @bid.projects.size>0 %>
<% for project in @bid.projects%>
<%= link_to image_tag(url_to_avatar(project), :class => "avatar", :title => project.name), project_path(project), :class => "avatar" %>
<% end %>
<% 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>
<% if User.current.logged? && (!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 = ?', 5, 7)).size >0) %>
<%= 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>