评分列表学生看不到匿评用户的用户信息

This commit is contained in:
sw 2015-05-29 15:47:03 +08:00
parent a9235bef2f
commit fc5be22a03
1 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,8 @@
<ul class="ping_box_ul ping_line"> <ul class="ping_box_ul ping_line">
<%= link_to image_tag(url_to_avatar(score.user), :width => "34", :height => "34"), user_path(score.user),:class => "ping_pic fl" %> <% show_real_name = @is_teacher || score.user == User.current %>
<%= link_to image_tag(url_to_avatar(show_real_name ? score.user : ""), :width => "34", :height => "34"), show_real_name ? user_path(score.user) : "javascript:void(0)",:class => "ping_pic fl" %>
<div class="ping_box_tit"> <div class="ping_box_tit">
<%= link_to score.user.show_name, user_path(score.user), :title => score.user.show_name, :class => "c_blue fl" %> <%= link_to show_real_name ? score.user.show_name : "匿名", show_real_name ? user_path(score.user) : "javascript:void(0)", :title => show_real_name ? score.user.show_name : "匿评用户", :class => "c_blue fl" %>
<span class="ml5 fl"><%= student_work_score_role score%></span> <span class="ml5 fl"><%= student_work_score_role score%></span>
<span class="ml20 fl">评分:</span> <span class="ml20 fl">评分:</span>
<a href="javascript:void(0);" class="c_orange fl" ><%= score.score%>分</a> <a href="javascript:void(0);" class="c_orange fl" ><%= score.score%>分</a>