实现新流程作业列表静态页面

This commit is contained in:
sw 2014-10-30 10:58:14 +08:00
parent 7ec738dd87
commit ceb181e669
7 changed files with 216 additions and 191 deletions

View File

@ -35,35 +35,6 @@
</div>
<% end %>
<table style="width: 100%">
<tr>
<td style="width: 50%">
<% if @homework_list.empty? %>
<div class="font_lighter_sidebar" style="padding-left: 10px;">
<span>暂无学生提交作业!</span>
</div>
<% end %>
</td>
<td style="width: 50%">
<div class="font_lighter_sidebar" style="padding-left: 200px;">
<strong><a href="#" onclick="show()" style="color:#919294;">什么是项目?</a></strong>
</div>
</td>
</tr>
<tr>
<td style="width: 50%">
</td>
<td style="width: 50%">
<div id = "what_is_project_div" style="display: none">
<p>项目是一种由用户创建的基于网络的协作空间,能够为个人或小组提供分布式的协同交流和资料管理等方面的支持。</p>
<p>项目托管平台:<%= link_to Setting.protocol + "://" + Setting.host_name + "/", home_path %> </p>
<%= link_to "我要创建项目",new_project_path(course: 0, project_type: 0), :target => '_blank'%>
</div>
</td>
</tr>
</table>
<div id='bidding_project_list'>
<%= render :partial => 'homework_list', :locals => {:homework => @homework_list} %>
</div>

View File

@ -1,163 +1,218 @@
<!-- fq -->
<% is_student = is_cur_course_student(@bid.courses.first) %>
<% is_teacher = is_course_teacher(User.current,@bid.courses.first) %>
<!-- 当is_evaluation为1或者null(null主要是为了兼容前面数据)时代表启用互评功能2表示未启用 -->
<% is_evaluation = @bid.is_evaluation == 1 || @bid.is_evaluation == nil %>
<%= form_tag(:controller => 'bids', :action => "show_courseEx", :method => :get) do %>
<div class="project-search-block">
<table width="100%" valign="center">
<tr>
<td ><span style="margin-left:0px"><%= l(:label_task_plural)%>(<%= @homework_list.count%>)</span>
<%= link_to "作业打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), class: "button_submit button_submit_font_white", style: "margin: 5px 10px;line-height: 20px;height: 20px;display: inline-block;" if(is_teacher && @bid.homeworks.count > 0) %>
</td>
<td align="right">
<div class="project-search">
<% if is_teacher %>
<%= text_field_tag 'student_id', params[:student_id], :size => 30 %>
<%= submit_tag l(:label_search_by_student_id), :class => "small", :name => nil %>
<% end %>
</div>
</td>
</tr>
</table>
</div>
<% end %>
<% display_id = im_watching_student_id? @bid%>
<% @homework_list.each do |homework|%>
<table width="660px" border="0" align="center" id="homework_attach_<%= homework.id %>" >
<tr>
<td style="vertical-align: top;width: 70px" >
<table style="text-align: center;width: 100%;table-layout: fixed">
<% user_name = is_teacher ? (homework.user.lastname + homework.user.firstname) : homework.user.login %>
<tr>
<td title="<%= user_name %>"><%= image_tag(url_to_avatar(homework.user), :class => "avatar")%></td>
</tr>
<tr>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>作业列表页_老师界面</title>
<script type="text/javascript" language="javascript">
//<!CDATA[
function g(o){return document.getElementById(o);}
function HoverLi(n){
//如果有N个标签,就将i<=N;
for(var i=1;i<=5;i++){g('tb_'+i).className='normaltab';g('tbc_0'+i).className='undis';}g('tbc_0'+n).className='dis';g('tb_'+n).className='hovertab';
}
//如果要做成点击后再转到请将<li>中的onmouseover 改成 onclick;
//]]>
</script>
<%= stylesheet_link_tag 'css', :media => 'all' %>
</head>
<td title="<%= user_name %>">
<p style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><strong>
<%= link_to user_name, user_path(homework.user),{:style => "color:#727272"} %>
</strong></p>
</td>
</tr>
<tr>
<td>
<% if (users_for_homework(homework).include?(User.current) || is_teacher) %>
<%= link_to l(:button_edit), edit_homework_attach_path(homework) %>
<% if homework.user == User.current || is_teacher %>
<%= link_to(l(:label_bid_respond_delete), homework,
method: :delete, :confirm => l(:text_are_you_sure)) %>
<% end %>
<% end %>
</td>
</tr>
</table>
<span></span>
</td>
<td colspan="2">
<table width="580px" border="0" style="table-layout: fixed">
<tr>
<td style="width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<strong>作品名称:</strong>&nbsp;
<% if homework.name == nil || homework.name == "" %>
<% homework_filename = homework.user.name + "提交的作业" %>
<% else %>
<% homework_filename = homework.name %>
<% end %>
<strong title="<%=homework_filename%>">
<%= link_to homework_filename , homework_attach_path(homework)%>
</strong>
</td>
<td style="vertical-align: top;width: 200px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<strong>合作成员:&nbsp;</strong>
<% homework_users = homework_user_of_homework(homework,is_teacher) %>
<% if homework.users.count == 0 %>
<% else %>
<span title="<%= homework_users%>"><%= homework_users %></span>
<% end %>
</td>
<td rowspan="4" style="text-align: center;vertical-align: middle;width: 30px">
<% if Time.parse(@bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
<span class="required">迟交</span>
<% end %>
</td>
</tr>
<tr>
<td style="width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<strong>开发项目</strong>:&nbsp;
<% if homework.project != nil %>
<span title="<%= homework.project.name %>">
<%= link_to homework.project.name,project_path(homework.project.id)%>
</span>
<% else %>
暂无
<% end %>
</td>
<td>
<strong>项目得分:&nbsp;
<span style="color: <%= homework.project.nil? ? "#727272" : "#EC6300"%>;">
<%= homework.project.nil? ? "N/A" : project_scores(homework.project) %>
</span>
</strong>
</td>
</tr>
<tr>
<td>
<strong>提交文件:&nbsp;
<% if is_evaluation || is_teacher%>
<%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework%>
<% else %>
<span class="required">未开启互评功能作业不允许下载</span>
<% end %>
</strong>
</td>
<td>
<strong>互评得分:&nbsp;
<%# student_homework_score = student_score_for_homework(homework) %>
<span style="color:<%= homework.s_score.nil? ? "#727272" : "#EC6300"%>;">
<% score = homework.s_score.nil? ? "N/A" : format("%.2f",homework.s_score) %>
<%= score %>
</span>&nbsp;&nbsp;
<% if is_evaluation && is_student && (!users_for_homework(homework).include? User.current)%>
<%= link_to "学生互评>>",homework_attach_path(homework) %>
<% end %>
</strong>
</td>
</tr>
<tr>
<td style="vertical-align: top;width: 200px;">
<% if is_evaluation || is_teacher%>
<%= render :partial => 'app_link', :locals => {:attachments => homework.attachments} %>
<% end %>
</td>
<td>
<strong>终评得分:&nbsp;
<%# totle_homework_score = score_for_homework(homework) %>
<% totle_homework_score = format("%.2f",(homework.t_score.nil? ? 0.00 : homework.t_score) * ((@bid.proportion.nil? ? 60 : @bid.proportion) * 1.0 / 100) +
(homework.s_score.nil? ? 0.00 : homework.s_score) * (1 - (@bid.proportion.nil? ? 60 : @bid.proportion) * 1.0 / 100)) %>
<span style="color:<%= totle_homework_score == "0.00"? "#727272" : "#EC6300"%> ;">
<% score = totle_homework_score == "0.00"? "N/A" : totle_homework_score %>
<%= score %>
</span>&nbsp;&nbsp;
<% if is_teacher %>
<%= link_to "教师评分>>",homework_attach_path(homework) %>
<% end %>
</strong>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div class="line_under"></div>
<% end %>
<!--分页-->
<div class="pagination" style="float:left;">
<body>
<div id="content">
<div id="tb_" class="tb_">
<ul>
<%= pagination_links_full @feedback_pages %>
<li id="tb_1" class="hovertab" onmouseover="x:HoverLi(1);">未批作业</li>
<li id="tb_2" class="normaltab" onmouseover="i:HoverLi(2);">已改作业</li>
<li id="tb_3" class="normaltab" onmouseover="a:HoverLi(3);">全部作业</li>
<li id="tb_4" class="normaltab" onmouseover="o:HoverLi(4);"><a href="#">作业下载</a></li>
<li id="tb_5" class="normaltab" onmouseover="g:HoverLi(5);">留言(<span class="c_red f_12">23</span>)</li>
</ul>
</div>
</div>
<div class="cl"></div>
<div class="ctt">
<div class="dis" id="tbc_01">
<div class="code_list"><span>作品列表(<font color="#CC0000">20</font>)</span><span class="fr">按&nbsp;<a href="#">评分</a>&nbsp;/&nbsp;<a href="#">时间</a>&nbsp;排序</span></div>
<div class="cl"></div>
<ul>
<li class="pic_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="40" height="40" /><span>gugu01</span></a></li>
<li class="wname"><a href="#" target="_blank">科大校园助手最终提交文档及源码科大校园助手最终提交文档及源码</a></li>
<li class="wdown"><a href="#" target="_blank">5个附件</a></li>
<li class="wscore">教师评分:<span class="c_red">4.8</span>&nbsp;&nbsp;</li>
<li class="wscore">学生评分:<span class="c_red">未评分</span></li>
<li class="wping"><a href="#" target="_blank">评分</a></li>
</ul>
<div class="cl"></div>
<ul>
<li class="pic_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="40" height="40" /><span>gugu01</span></a></li>
<li class="wname"><a href="#" target="_blank">科大校园助手最终提交文档及源码科大校园助手最终提交文档及源码</a></li>
<li class="wdown"><a href="#" target="_blank">5个附件</a></li>
<li class="wscore">教师评分:<span class="c_red">4.8</span>&nbsp;&nbsp;</li>
<li class="wscore">学生评分:<span class="c_red">未评分</span></li>
<li class="wping"><a href="#" target="_blank">评分</a><span class="c_red">&nbsp;&nbsp;迟交!</span></li>
</ul>
<div class="cl"></div>
<ul>
<li class="pic_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="40" height="40" /><span>gugu01</span></a></li>
<li class="wname"><a href="#" target="_blank">科大校园助手最终提交文档及源码科大校园助手最终提交文档及源码</a></li>
<li class="wdown"><a href="#" target="_blank">5个附件</a></li>
<li class="wscore">教师评分:<span class="c_red">4.8</span>&nbsp;&nbsp;</li>
<li class="wscore">学生评分:<span class="c_red">未评分</span></li>
<li class="wping"><a href="#" target="_blank">评分</a></li>
</ul>
<div class="cl"></div>
<ul>
<li class="pic_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="40" height="40" /><span>gugu01</span></a></li>
<li class="wname"><a href="#" target="_blank">科大校园助手最终提交文档及源码科大校园助手最终提交文档及源码</a></li>
<li class="wdown"><a href="#" target="_blank">5个附件</a></li>
<li class="wscore">教师评分:<span class="c_red">4.8</span>&nbsp;&nbsp;</li>
<li class="wscore">学生评分:<span class="c_red">未评分</span></li>
<li class="wping"><a href="#" target="_blank">评分</a><span class="c_red">&nbsp;&nbsp;迟交!</span></li>
</ul>
<div class="cl"></div>
<ul>
<li class="pic_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="40" height="40" /><span>gugu01</span></a></li>
<li class="wname"><a href="#" target="_blank">科大校园助手最终提交文档及源码科大校园助手最终提交文档及源码</a></li>
<li class="wdown"><a href="#" target="_blank">5个附件</a></li>
<li class="wscore">教师评分:<span class="c_red">4.8</span>&nbsp;&nbsp;</li>
<li class="wscore">学生评分:<span class="c_red">未评分</span></li>
<li class="wping"><a href="#" target="_blank">评分</a></li>
</ul>
<div class="cl"></div>
<ul>
<li class="pic_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="40" height="40" /><span>gugu01</span></a></li>
<li class="wname"><a href="#" target="_blank">科大校园助手最终提交文档及源码科大校园助手最终提交文档及源码</a></li>
<li class="wdown"><a href="#" target="_blank">5个附件</a></li>
<li class="wscore">教师评分:<span class="c_red">4.8</span>&nbsp;&nbsp;</li>
<li class="wscore">学生评分:<span class="c_red">未评分</span></li>
<li class="wping"><a href="#" target="_blank">评分</a><span class="c_red">&nbsp;&nbsp;迟交!</span></li>
</ul>
<div class="cl"></div>
<ul>
<li class="pic_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="40" height="40" /><span>gugu01</span></a></li>
<li class="wname"><a href="#" target="_blank">科大校园助手最终提交文档及源码科大校园助手最终提交文档及源码</a></li>
<li class="wdown"><a href="#" target="_blank">5个附件</a></li>
<li class="wscore">教师评分:<span class="c_red">4.8</span>&nbsp;&nbsp;</li>
<li class="wscore">学生评分:<span class="c_red">未评分</span></li>
<li class="wping"><a href="#" target="_blank">评分</a></li>
</ul>
<div class="cl"></div>
<ul>
<li class="pic_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="40" height="40" /><span>gugu01</span></a></li>
<li class="wname"><a href="#" target="_blank">科大校园助手最终提交文档及源码科大校园助手最终提交文档及源码</a></li>
<li class="wdown"><a href="#" target="_blank">5个附件</a></li>
<li class="wscore">教师评分:<span class="c_red">4.8</span>&nbsp;&nbsp;</li>
<li class="wscore">学生评分:<span class="c_red">未评分</span></li>
<li class="wping"><a href="#" target="_blank">评分</a><span class="c_red">&nbsp;&nbsp;迟交!</span></li>
</ul>
<div class="cl"></div>
<ul>
<li class="pic_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="40" height="40" /><span>gugu01</span></a></li>
<li class="wname"><a href="#" target="_blank">科大校园助手最终提交文档及源码科大校园助手最终提交文档及源码</a></li>
<li class="wdown"><a href="#" target="_blank">5个附件</a></li>
<li class="wscore">教师评分:<span class="c_red">4.8</span>&nbsp;&nbsp;</li>
<li class="wscore">学生评分:<span class="c_red">未评分</span></li>
<li class="wping"><a href="#" target="_blank">评分</a></li>
</ul>
<div class="cl"></div>
<ul>
<li class="pic_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="40" height="40" /><span>gugu01</span></a></li>
<li class="wname"><a href="#" target="_blank">科大校园助手最终提交文档及源码科大校园助手最终提交文档及源码</a></li>
<li class="wdown"><a href="#" target="_blank">5个附件</a></li>
<li class="wscore">教师评分:<span class="c_red">4.8</span>&nbsp;&nbsp;</li>
<li class="wscore">学生评分:<span class="c_red">未评分</span></li>
<li class="wping"><a href="#" target="_blank">评分</a><span class="c_red">&nbsp;&nbsp;迟交!</span></li>
</ul>
<div class="cl"></div>
<ul class="wlist">
<li><a href="#">上一页</a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">...</a></li>
<li><a href="#">下一页</a></li>
</ul>
<div class="cl"></div>
</div><!---未批作业结束-->
<div class="undis" id="tbc_02">
<div class="code_list"><span>作品列表(<font color="#CC0000">2</font>)</span><span class="fr">按&nbsp;<a href="#">评分</a>&nbsp;/&nbsp;<a href="#">时间</a>&nbsp;排序</span></div>
<div class="cl"></div>
<ul>
<li class="pic_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="40" height="40" /><span>gugu01</span></a></li>
<li class="wname"><a href="#" target="_blank">科大校园助手最终提交文档及源码科大校园助手最终提交文档及源码</a></li>
<li class="wdown"><a href="#" target="_blank">5个附件</a></li>
<li class="wscore">教师评分:<span class="c_red">4.8</span>&nbsp;&nbsp;</li>
<li class="wscore">学生评分:<span class="c_red">未评分</span></li>
<li class="wping"><a href="#" target="_blank">评分</a></li>
</ul>
<div class="cl"></div>
<ul>
<li class="pic_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="40" height="40" /><span>gugu01</span></a></li>
<li class="wname"><a href="#" target="_blank">科大校园助手最终提交文档及源码科大校园助手最终提交文档及源码</a></li>
<li class="wdown"><a href="#" target="_blank">5个附件</a></li>
<li class="wscore">教师评分:<span class="c_red">4.8</span>&nbsp;&nbsp;</li>
<li class="wscore">学生评分:<span class="c_red">未评分</span></li>
<li class="wping"><a href="#" target="_blank">评分</a><span class="c_red">&nbsp;&nbsp;迟交!</span></li>
</ul>
<div class="cl"></div>
<ul class="wlist">
<li><a href="#">上一页</a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">...</a></li>
<li><a href="#">下一页</a></li>
</ul>
<div class="cl"></div>
</div><!---已改作业结束-->
<div class="undis" id="tbc_03">
<div class="code_list"><span>作品列表(<font color="#CC0000">3</font>)</span><span class="fr">按&nbsp;<a href="#">评分</a>&nbsp;/&nbsp;<a href="#">时间</a>&nbsp;排序</span></div>
<div class="cl"></div>
<ul>
<li class="pic_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="40" height="40" /><span>gugu01</span></a></li>
<li class="wname"><a href="#" target="_blank">科大校园助手最终提交文档及源码科大校园助手最终提交文档及源码</a></li>
<li class="wdown"><a href="#" target="_blank">5个附件</a></li>
<li class="wscore">教师评分:<span class="c_red">4.8</span>&nbsp;&nbsp;</li>
<li class="wscore">学生评分:<span class="c_red">未评分</span></li>
<li class="wping"><a href="#" target="_blank">评分</a></li>
</ul>
<div class="cl"></div>
<ul>
<li class="pic_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="40" height="40" /><span>gugu01</span></a></li>
<li class="wname"><a href="#" target="_blank">科大校园助手最终提交文档及源码科大校园助手最终提交文档及源码</a></li>
<li class="wdown"><a href="#" target="_blank">5个附件</a></li>
<li class="wscore">教师评分:<span class="c_red">4.8</span>&nbsp;&nbsp;</li>
<li class="wscore">学生评分:<span class="c_red">未评分</span></li>
<li class="wping"><a href="#" target="_blank">评分</a></li>
</ul>
<div class="cl"></div>
<ul>
<li class="pic_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="40" height="40" /><span>gugu01</span></a></li>
<li class="wname"><a href="#" target="_blank">科大校园助手最终提交文档及源码科大校园助手最终提交文档及源码</a></li>
<li class="wdown"><a href="#" target="_blank">5个附件</a></li>
<li class="wscore">教师评分:<span class="c_red">4.8</span>&nbsp;&nbsp;</li>
<li class="wscore">学生评分:<span class="c_red">未评分</span></li>
<li class="wping"><a href="#" target="_blank">评分</a><span class="c_red">&nbsp;&nbsp;迟交!</span></li>
</ul>
<div class="cl"></div>
<ul class="wlist">
<li><a href="#">上一页</a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">...</a></li>
<li><a href="#">下一页</a></li>
</ul>
<div class="cl"></div>
</div><!---全部作业结束-->
<div class="undis" id="tbc_04"></div><!---作业下载结束-->
<div class="undis" id="tbc_05">
<div class="msg_box">
<h4>留言内容</h4>
<textarea id="ta_msg_content" name="content" placeholder="最多250个字" ></textarea>
<a href="#">取&nbsp;&nbsp;消</a><a href="#">留&nbsp;&nbsp;言</a>
</div>
<div class="msg_list"></div>
</div><!---留言结束-->
</div>
</div>
</div>
</body>
</html>

View File

@ -15,7 +15,6 @@ a:hover{ text-decoration:underline;}
/* 作业列表 */
.ttl{ }
.ctt{height:820px;clear:both; }
#content{float:right;clear:both;width:693px;/*滑动门的宽度*/}
/* TAB 切换效果 */
.tb_{ background-color: #eaeaea; height:40px; }
.tb_ ul{height:40px; }
@ -39,7 +38,7 @@ a:hover{ text-decoration:underline;}
.pic_head img{ border:1px solid #fff;}
.pic_head img:hover{border:1px solid #15bccf;}
.dis ul li.wname a{ width:260px; font-size:14px; color:#595959; padding:20px 0 0 15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.dis ul li.wdown a{padding-top:22px; color:#3d7ec2; margin-right:43px;}
.dis ul li.wdown a{padding-top:22px; color:#3d7ec2; margin-right:33px;}
.wscore{ padding-top:22px; color:#888888;}
.dis ul li.wping{margin-left:16px; }
.dis ul li.wping a{ margin-top:18px; margin-bottom:3px; width:43px; height:23px; background:#15bccf; color:#fff; text-align:center; padding-top:3px;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB