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

199 lines
8.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<% @nav_dispaly_course_all_label = 1
@nav_dispaly_forum_label = 1
@nav_dispaly_course_label = nil
@nav_dispaly_store_all_label = 1 %>
<!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" />
<title>
<%=h html_title %>
</title>
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :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 %>">
<% course = @bid.courses.first %>
<% if course %>
<div id="wrapper">
<div id="wrapper2">
<div id="wrapper3">
<%= render :partial => 'layouts/base_header' %>
<div id="main">
<!--added by huang-->
<div class="top-content">
<table>
<tr>
<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 => 'courses', :action => 'index' %></a>
</td>
<td>
<p class="top-content-list-homework"><%= link_to "主页", home_path %>
>
<%= link_to l(:label_course_practice), :controller => 'courses', :action => 'index' %>
>
<span>
<%= link_to(course.name.to_s, homework_course_path(course)) if course %>
</span>
>
<%= link_to(@bid.name, course_for_bid_path(@bid)) %>
</p>
</td>
</tr>
</table>
</div>
<!--end-->
<div id="sidebar">
<div class="main_context">
<div class="spaceleft">
<div>
<table>
<tr>
<td style="padding-left:8px ">
<% if get_avatar?(course) %>
<%= image_tag(url_to_avatar(course), :style => "width:80px;height:80px") %>
<% else %>
<%= image_tag('../images/avatars/course/course.jpg', :style => "width:80px;height:80px") %>
<% end %>
</td>
<td>
<table>
<tr>
<td style="vertical-align: top;font-size: 15px;">
<span style=" word-wrap: break-word; word-break: break-all">
<strong>
<%= link_to course.name.to_s, homework_course_path(course) if course %>
</strong>
</span>
</td>
</tr>
<tr>
<td style=" word-wrap: break-word; word-break: break-all;font-size: 15px;">
<span style=" color:#ed8924">
<strong><%=link_to(@bid.name, course_for_bid_path(@bid)) %></strong>
</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div class="user_underline"></div>
<!--count-->
<div class="inf_user_image">
<table>
<% if (User.current.admin?||User.current.id==@bid.author_id) %>
<tr>
<td valign="top" style="padding-left: 8px; font-size: 15px" colspan="2">
<span id="<%=@bid.id %>_anonymous_comment">
<% case @bid.comment_status %>
<% when 0 %>
<%= link_to '启动匿评', start_anonymous_comment_bid_path(@bid), id: "#{@bid.id}_start_anonymous_comment", remote: true, :confirm => "开启匿评后学生将不能对作业进行提交、修改、删除等操作\n是否确定开启匿评", disable_with: '加载中...' %>
<% when 1 %>
<%= link_to '关闭匿评', stop_anonymous_comment_bid_path(@bid), id: "#{@bid.id}_stop_anonymous_comment", remote: true, :confirm => "关闭匿评后学生将不能对作业进行评分\n是否确定关闭匿评" %>
<% when 2 %>
匿评结束
<% end %>
</span>
</td>
</tr>
<% end %>
<tr>
<td valign="top" colspan="2" style="font-size: 15px;padding-left: 8px;">
<strong>
<%= l(:label_homework_description) %> :
</strong>
</td>
</tr>
<tr>
<td class="font_lighter_sidebar" colspan="2" style="padding-left: 8px;" title="<%= @bid.description %>">
<%= textilizable truncate(@bid.description, length: 200, omission: '...') %>
</td>
</tr>
<tr>
<td valign="top" style="padding-left: 8px; width:62px;">
<%= l(:label_limit_time) %>:
</td>
<td class="font_lighter_sidebar">
<%= @bid.deadline %>
</td>
</tr>
</table>
</div>
<div class="user_underline"></div>
<!-- info -->
<div class="inf_user_image">
<table>
<tr>
<td valign="top" colspan="2" style="font-size: 16px;padding-left: 8px;">
<strong>
<%= l(:label_attachment) %> :
</strong>
</td>
</tr>
<tr>
<td valign="top" colspan="2">
<% if @bid.attachments.any?%>
<% options = {:author => true,:deletable => (@bid.author.id == User.current.id || User.current.admin? ? true : false),:wrap => true,:length => 7} %>
<%= render :partial => 'attachments/links', :locals => {:attachments => @bid.attachments, :options => options} %>
<% end %>
</td>
</tr>
<tr>
<!--td>作业类型:
<%#= @bid.homework_type==Bid::HomeworkFile ? "提交文件" : "提交项目" %>
</td-->
</tr>
</table>
</div>
</div>
</div>
<!-- end -->
</div>
<div id="content">
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
</div>
<%= render :partial => 'layouts/base_footer' %>
</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 %>
<% end %>
</body>
</html>