1.匿评列表隐藏学生姓名显示,学生头像显示为默认头像

2.取消左边提交作业学生头像列表显示
This commit is contained in:
sw 2014-11-03 09:50:36 +08:00
parent f3ac5a0a84
commit 978cfcaa5e
2 changed files with 12 additions and 43 deletions

View File

@ -1,10 +1,16 @@
<li class="pic_head">
<%= link_to image_tag(url_to_avatar(homework.user), :width => "40", :height => "40"), user_path(homework.user) %>
<span>
<% user_realname = homework.user.lastname.to_s + homework.user.firstname.to_s %>
<% user_name = is_teacher ? (user_realname.empty? ? homework.user.login : user_realname) : homework.user.login %>
<%= link_to user_name, user_path(homework.user), :title => user_name %>
</span>
<% if is_student_batch_homework %>
<!-- 学生匿评 不现实姓名、头像,以及相关的连接 -->
<a><%= image_tag(url_to_avatar("匿名"), :width => "40", :height => "40")%></a>
<a>匿名</a>
<% else %>
<%= link_to image_tag(url_to_avatar(homework.user), :width => "40", :height => "40"), user_path(homework.user) %>
<span>
<% user_realname = homework.user.lastname.to_s + homework.user.firstname.to_s %>
<% user_name = is_teacher ? (user_realname.empty? ? homework.user.login : user_realname) : homework.user.login %>
<%= link_to user_name, user_path(homework.user), :title => user_name %>
</span>
<% end %>
</li>
<li class="wname">
<% if homework.name == nil || homework.name == "" %>

View File

@ -154,43 +154,6 @@
</table>
</div>
<!--homework-->
<div class="user_fans">
<div class="user_underline"></div>
<div class="font_title_left">
<strong><%= l(:label_commit_homework) %></strong>
</div>
<div class="left_wf">
<table>
<tr>
<td style="padding-top: 5px">
<% if @bid.homework_type == 1 %>
<% if @bid.homeworks.size>0 %>
<% for homework in @bid.homeworks.eager_load(:user) %>
<%= link_to image_tag(url_to_avatar(homework.user), :class => "avatar", :title => homework.user.name), user_path(homework.user), :class => "avatar" %>
<% end %>
<% else %>
<p class="font_lighter">
<%= l(:label_no_course_project) %>
</p>
<% end %>
<% else %>
<% if @bid.courses.size>0 %>
<% for course in @bid.courses %>
<%= link_to image_tag(url_to_avatar(course), :class => "avatar", :title => course.name), course_path(course), :class => "avatar" %>
<% end %>
<% else %>
<p class="font_lighter">
<%= l(:label_no_course_project) %>
</p>
<% end %>
<% end %> </td>
</tr>
</table>
</div>
</div>
<div class="user_underline"></div>
</div>
</div>
<!-- end -->