作品列表添加序号及样式调整

This commit is contained in:
cxt 2016-05-13 09:58:24 +08:00
parent f74e5eb6ae
commit cc92105da9
6 changed files with 20 additions and 13 deletions

View File

@ -6,13 +6,13 @@
</li>
<% if @homework.homework_type != 3 %>
<!--<span class="c_dark f14 fb fl mr50">姓名</span>-->
<li class="hworkList60 hworkH30 mr10">
<li class="<%=@homework.anonymous_comment == 1 ? 'hworkList100' : 'hworkList60'%> hworkH30 mr10">
<%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml18" ,:remote => true%>
<% if @show_all && @order == "lastname"%>
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
<% end%>
</li>
<li class="hworkList80 hworkH30 mr10">
<li class="<%=@homework.anonymous_comment == 1 ? 'hworkList90' : 'hworkList80'%> hworkH30 mr10">
<!--<span class="c_dark f14 fb fl">学号</span>-->
<%= link_to "学号",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml30" ,:remote => true%>
<% if @show_all && @order == "student_id"%>

View File

@ -1,7 +1,7 @@
<!-- 匿评作品列表,显示某一个作品的信息 -->
<a name="<%= student_work.id%>"></a>
<ul class="hworkListRow" id="student_work_<%= student_work.id%>">
<li class="hworkList30 ml5 mr5">1</li>
<li class="hworkList30 ml5 mr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></li>
<li class="hworkPortrait mt15 mr10">
<%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40",:style => "display:block;"),user_activities_path(student_work.user)) %>
</li>
@ -13,10 +13,10 @@
</div>
</li>
<% if @homework.homework_type != 3 %>
<li class="hworkStName pr10" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
<li class="<%=@homework.anonymous_comment == 1 ? 'hworkStName100' : 'hworkStName'%> pr10" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
<%= student_work.user.show_name%>
</li>
<li class="hworkStID pr10" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
<li class="<%=@homework.anonymous_comment == 1 ? 'hworkStID90' : 'hworkStID'%> pr10" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
</li>
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>

View File

@ -8,7 +8,7 @@
<% end %>
<% if is_my_work%>
<li class="hworkList30 ml5 mr5">1</li>
<li class="hworkList30 ml5 mr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></li>
<li class="hworkPortrait mt15 mr10">
<%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40", style: "display:block;") %>
</li>
@ -39,7 +39,7 @@
<% end %>
</div>
<% else%>
<li class="hworkList30 ml5 mr5">1</li>
<li class="hworkList30 ml5 mr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></li>
<li class="hworkPortrait mt15 mr10">
<%= image_tag(url_to_avatar(""),width:"40", height: "40", style: "display:block;") %>
</li>

View File

@ -37,11 +37,11 @@
</div>
<div class="cl"></div>
<% @stundet_works.each do |student_work|%>
<% @stundet_works.each_with_index do |student_work, i|%>
<% if @is_evaluation%>
<%= render :partial => "evaluation_work", :locals => {:student_work => student_work}%>
<%= render :partial => "evaluation_work", :locals => {:student_work => student_work, :index => i}%>
<% else%>
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work}%>
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i}%>
<% end%>
<div class="cl"></div>
<div id="about_hwork_<%= student_work.id%>">

View File

@ -7,10 +7,13 @@ $('#score_<%= @work.id%>').peSlider({range: 'min'});
$("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @new_score,:is_last => @is_last}) %>");
<% end%>
var num = $("#work_num_<%= @work.id%>").html();
$("#score_list_<%= @work.id%>").removeAttr("style");
<% if @is_teacher %>
$("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_un_work',:locals => {:student_work => @work}) %>");
$("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_un_work',:locals => {:student_work => @work, :index => 1}) %>");
$("#work_num_<%= @work.id%>").html(num);
<% else %>
$("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work}) %>");
$("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work, :index => 1}) %>");
$("#work_num_<%= @work.id%>").html(num);
<% end%>

View File

@ -55,14 +55,18 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}
.hworkList50 {width:50px; text-align:center;}
.hworkList60 {width:60px; text-align:center;}
.hworkList80 {width:80px; text-align:center;}
.hworkList90 {width:90px; text-align:center;}
.hworkList100 {width:100px; text-align:center;}
.hworkList130 {width:130px; text-align:center;}
.hworkList160 {width:160px; text-align:center;}
.hworkList260 {width:260px; text-align:left;}
.codeList{ float:right; font-size:12px; color:#484848; padding:0px 3px; width:714px; margin-bottom:10px; }
.hworkName {width:80px; float:left; line-height:18px;}
.hworkName div{max-height: 40px;overflow: hidden;}
.hworkName div{max-height: 36px;overflow: hidden;}
.hworkStName {width:60px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:65px; line-height:65px; vertical-align:middle; font-size:12px; color:#888888; text-align:center;}
.hworkStName100 {width:100px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:65px; line-height:65px; vertical-align:middle; font-size:12px; color:#888888; text-align:center;}
.hworkStID {width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:65px; line-height:65px; vertical-align:middle; font-size:12px; color:#888888; text-align:center;}
.hworkStID90 {width:90px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:65px; line-height:65px; vertical-align:middle; font-size:12px; color:#888888; text-align:center;}
.hworkDate {max-width:150px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:14px; line-height:14px; font-size:12px; color:#888888;}
.hworkMenu {width:100px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 20px; left:-110px; font-size:12px; color:#888888; display:none; line-height:2; z-index:99;}
a.hworkExport {background:url(../images/homepage_icon2.png) -10px -401px no-repeat; padding-left:23px;}