1.增加点赞样式

2.修改学生进入作业列表,未评列表只能点赞
3.学生修改作品、创建作品报错
4.增加点赞图片
This commit is contained in:
sw 2014-11-01 16:19:04 +08:00
parent 5cbbb98536
commit 243803cc5e
7 changed files with 10 additions and 53 deletions

View File

@ -515,6 +515,7 @@ class BidsController < ApplicationController
INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id
WHERE homework_attaches.bid_id = #{@bid.id} AND homework_evaluations.user_id = #{User.current.id}) AS table1 WHERE homework_attaches.bid_id = #{@bid.id} AND homework_evaluations.user_id = #{User.current.id}) AS table1
WHERE table1.m_score IS NULL") WHERE table1.m_score IS NULL")
@is_student_batch_homework = true
end end
@homework_list = paginateHelper all_homework_list,10 @homework_list = paginateHelper all_homework_list,10

View File

@ -47,7 +47,7 @@
<div class="cl"></div> <div class="cl"></div>
<div class="ctt"> <div class="ctt">
<div class="dis" id="tbc_01"> <div class="dis" id="tbc_01">
<%= render :partial => 'homework_attach/homeworks_list', :locals => {:homeworks => @homework_list, :homework_count => @obj_count, :bid => @bid, :remote => false}%> <%= render :partial => 'homework_attach/homeworks_list', :locals => {:homeworks => @homework_list, :homework_count => @obj_count, :bid => @bid, :remote => false, :is_student_batch_homework => @is_student_batch_homework}%>
</div> </div>
</div> </div>
</div> </div>

View File

@ -102,8 +102,10 @@
</li> </li>
<% else %> <% else %>
<!-- 学生众评列表,显示为点赞 --> <!-- 学生众评列表,显示为点赞 -->
<li class="wping"> <li class="wzan" title="点赞">
<a href="#" target="_blank" >点赞</a> <a href="#" target="_blank" class="wzan_img wzan_visited">
</a>
<a href="#" target="_blank">15</a>
</li> </li>
<% end %> <% end %>
<% end %> <% end %>

View File

@ -9,22 +9,6 @@
} }
</script> </script>
<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(@homework.bid.courses.first.name.to_s, homework_course_path(@homework.bid.courses.first)) if @homework.bid.courses.first%></span> >
<%=link_to(@homework.bid.name, respond_path(@homework.bid)) %> > <span><%= link_to "修改作业",edit_homework_attach_path(@homework)%></span></p></td>
</tr>
</table>
</div>
<p style="font-weight: bold; color: rgb(237,137,36)" xmlns="http://www.w3.org/1999/html"> <%=raw l(:label_edit_homework)%> </p> <p style="font-weight: bold; color: rgb(237,137,36)" xmlns="http://www.w3.org/1999/html"> <%=raw l(:label_edit_homework)%> </p>
<div class="tabs"> <div class="tabs">
<ul> <ul>

View File

@ -1,37 +1,3 @@
<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(@bid.courses.first.name.to_s, homework_course_path(@bid.courses.first)) if @bid.courses.first%>
</span> >
<%=link_to(@bid.name, respond_path(@bid)) %> >
<span>
<%= link_to "创建作业", new_homework_attach_path(@bid)%>
</span>
</p>
</td>
</tr>
</table>
</div>
<p style="font-weight: bold; color: rgb(237,137,36)" xmlns="http://www.w3.org/1999/html"> <p style="font-weight: bold; color: rgb(237,137,36)" xmlns="http://www.w3.org/1999/html">
<%=h l(:label_new_homework)%> <%=h l(:label_new_homework)%>
</p> </p>

View File

@ -59,6 +59,10 @@ ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; }
.dis ul li.wname02 a{ width:200px; font-size:14px; color:#595959; padding:20px 0 0 15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;} .dis ul li.wname02 a{ width:200px; font-size:14px; color:#595959; padding:20px 0 0 15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.dis ul li.wmine{ margin:12px 0 0 10px;} .dis ul li.wmine{ margin:12px 0 0 10px;}
.dis ul li.wmine a{ color:#3d7ec2; text-align:center; width:50px; font-weight: bold;} .dis ul li.wmine a{ color:#3d7ec2; text-align:center; width:50px; font-weight: bold;}
.wzan{ margin:15px 0 0 25px; width:32px; height:44px;}
.wzan a{ display: block;}
a.wzan_img{background:url(images/pic_zan.png) 0 -59px no-repeat; display:block; height:31px; width:30px; color:#fff;}
a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;}
.msg_box{ width:693px; border-bottom:1px dashed #CCC; padding-top:20px;} .msg_box{ width:693px; border-bottom:1px dashed #CCC; padding-top:20px;}
.msg_box h4{ margin-left:15px;border-style: none;} .msg_box h4{ margin-left:15px;border-style: none;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB