From 23e1f2b3bd04a4c6f08b72523820d2449863ef43 Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 14 Dec 2016 13:37:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=8C=BF=E8=AF=84=E6=9C=9F?= =?UTF-8?q?=E9=97=B4=EF=BC=8C=E5=B0=8F=E9=93=83=E9=93=9B=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E3=80=81=E4=BD=9C=E4=B8=9A=E5=8A=A8=E6=80=81=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E4=BD=9C=E5=93=81=E8=AF=A6=E6=83=85=E7=9A=84=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=EF=BC=8C=E6=9A=B4=E9=9C=B2=E4=BA=86=E8=AF=84?= =?UTF-8?q?=E9=98=85=E4=BA=BA=E6=88=96=E5=8C=BF=E8=AF=84=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_show_messages_list.html.erb | 3 ++- app/views/student_work/_jour_replay.html.erb | 4 ++-- app/views/users/_homework_base_info.html.erb | 2 +- app/views/users/_user_message_course.html.erb | 10 +++++----- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/views/layouts/_show_messages_list.html.erb b/app/views/layouts/_show_messages_list.html.erb index 8e7be1fe1..64516221c 100644 --- a/app/views/layouts/_show_messages_list.html.erb +++ b/app/views/layouts/_show_messages_list.html.erb @@ -61,7 +61,8 @@ <% elsif ma.course_message.jour_type == 'HomeworkCommon' %>
  • <%=ma.course_message.user.show_name %> <%=ma.course_message.m_parent_id.nil? ? '回复了您的作业:' : '在作业中回复了您:' %><%= message_content(ma.course_message.notes)%>
  • <% else %> -
  • <%=ma.course_message.user.show_name %><%=ma.course_message.user.allowed_to?(:as_teacher, ma.course) ? '老师' : '同学' %> 回复了作品评论:<%= message_content(ma.course_message.notes)%>
  • + <% show_name = ma.course_message.jour.reviewer_role != 3 || ma.course_message.user.allowed_to?(:as_teacher, ma.course) %> +
  • 回复了作品评论:<%= message_content(ma.course_message.notes)%>"><%=show_name ? ma.course_message.user.show_name + "#{ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"同学"}" : "匿名用户" %> 回复了作品评论:<%= message_content(ma.course_message.notes)%>
  • <% end %> <% elsif ma.course_message_type == "StudentWork" && !ma.course_message.homework_common.nil? && !User.current.allowed_to?(:as_teacher, ma.course_message.homework_common.course) %>
  • <%=ma.course_message.homework_common.user.show_name %>老师 发布的作业:<%=ma.course_message.homework_common.name %>,由于迟交作业,您及您的作品都不能参与该作业的匿评
  • diff --git a/app/views/student_work/_jour_replay.html.erb b/app/views/student_work/_jour_replay.html.erb index eba5b2c08..1887614fb 100644 --- a/app/views/student_work/_jour_replay.html.erb +++ b/app/views/student_work/_jour_replay.html.erb @@ -1,8 +1,8 @@
    - <%= link_to image_tag(url_to_avatar(jour.user), :width => "32", :height => "32"), user_path(jour.user),:class => "st_img fl" %> + <%= link_to image_tag(url_to_avatar(show_real_name ? jour.user : ""), :width => "32", :height => "32"), show_real_name ? user_path(jour.user) : "javascript:void(0)",:class => "st_img fl" %>
    - <%= link_to show_real_name ? jour.user.show_name : "匿名", user_path(jour.user), :title => jour.user.show_name, :class => "c_blue fl" %> + <%= link_to show_real_name ? jour.user.show_name : "匿名", show_real_name ? user_path(jour.user) : "javascript:void(0)", :title => jour.user.show_name, :class => "c_blue fl" %> <% if jour.user==User.current || User.current.admin? %> <%= link_to(l(:label_bid_respond_delete), destroy_score_reply_student_work_index_path(:jour_id => jour.id), diff --git a/app/views/users/_homework_base_info.html.erb b/app/views/users/_homework_base_info.html.erb index 53f968328..3c4200e9d 100644 --- a/app/views/users/_homework_base_info.html.erb +++ b/app/views/users/_homework_base_info.html.erb @@ -33,7 +33,7 @@ <% last_score = student_work_scores.first %>

    # <%=time_from_now last_score.created_at %> - <%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品,优秀排行: + <%= link_to last_score.reviewer_role == 3 && !is_teacher ? '学生匿名' : last_score.user.show_name, last_score.reviewer_role == 3 && !is_teacher ? "javascript:void(0)" : user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品,优秀排行:

    <% end %> diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb index 87d448944..e59d6fce8 100644 --- a/app/views/users/_user_message_course.html.erb +++ b/app/views/users/_user_message_course.html.erb @@ -367,7 +367,7 @@
    • <% if ma.course_message.reviewer_role == 3 %> - <%=link_to image_tag(url_to_avatar(""), :width => "30", :height => "30"), :target => '_blank' %> + <%=link_to image_tag(url_to_avatar(""), :width => "30", :height => "30"), "javascript:void(0);", :target => '_blank' %> <% else %> <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %> <% end %> @@ -470,15 +470,15 @@
    <% else %>