From bef4735f40e9853c2427e8f75209309a38100c6d Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 5 Dec 2014 10:03:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E5=8C=BF=E8=AF=84=E5=88=97=E8=A1=A8=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_attach/_histoey_new.html.erb | 4 ++-- app/views/homework_attach/_review.html.erb | 4 ++-- app/views/homework_attach/addjours.js.erb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/homework_attach/_histoey_new.html.erb b/app/views/homework_attach/_histoey_new.html.erb index 8332af691..f5bda1909 100644 --- a/app/views/homework_attach/_histoey_new.html.erb +++ b/app/views/homework_attach/_histoey_new.html.erb @@ -35,11 +35,11 @@
- <%= render :partial => 'homework_attach/review',:locals => {:review_list => @teacher_stars,:show_name => true} %> + <%= render :partial => 'homework_attach/review',:locals => {:review_list => @teacher_stars,:show_name => true,:show_jour => true} %>
- <%= render :partial => 'homework_attach/review',:locals => {:review_list => @student_stars,:show_name => false} %> + <%= render :partial => 'homework_attach/review',:locals => {:review_list => @student_stars,:show_name => false || @is_teacher, :show_jour => false} %>
\ No newline at end of file diff --git a/app/views/homework_attach/_review.html.erb b/app/views/homework_attach/_review.html.erb index 17dac35bf..6663bc6fe 100644 --- a/app/views/homework_attach/_review.html.erb +++ b/app/views/homework_attach/_review.html.erb @@ -1,8 +1,8 @@ -<% if !review_list.nil?%> +<% unless review_list.nil?%> <% review_list.each do |review|%> <% user = review.rater %> - <% jour = get_homework_review @homework,@is_teacher,user %> + <% jour = get_homework_review @homework,show_jour,user %>
<% if show_name %> diff --git a/app/views/homework_attach/addjours.js.erb b/app/views/homework_attach/addjours.js.erb index 186addc56..29cd82d9c 100644 --- a/app/views/homework_attach/addjours.js.erb +++ b/app/views/homework_attach/addjours.js.erb @@ -2,12 +2,12 @@ <% if @is_teacher %> HoverLi(4); $('#jour_count_4').html('<%= @teacher_stars.count %>'); - $('#tbc_04').html('<%= escape_javascript(render(:partial => 'homework_attach/review',:locals => {:review_list => @teacher_stars,:show_name => true})) %>'); + $('#tbc_04').html('<%= escape_javascript(render(:partial => 'homework_attach/review',:locals => {:review_list => @teacher_stars,:show_name => true,:show_jour => true})) %>'); //匿评 <% elsif @is_anonymous_comments %> HoverLi(5); $('#jour_count_5').html('<%= @student_stars.count %>'); - $('#tbc_05').html('<%= escape_javascript(render(:partial => 'homework_attach/review',:locals => {:review_list => @student_stars,:show_name => true})) %>'); + $('#tbc_05').html('<%= escape_javascript(render(:partial => 'homework_attach/review',:locals => {:review_list => @student_stars,:show_name => false || @is_teacher, :show_jour => false})) %>'); //留言 <% else %> HoverLi(3);