修改《若用户没有填写姓名或者学号,在列表处姓名学号显示不合理》bug

Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2015-01-19 11:42:40 +08:00
parent 0b0b6c9b6e
commit d5100e4808
2 changed files with 51 additions and 27 deletions

View File

@ -56,24 +56,36 @@
</a>
<ul style="margin-left: 15px">
<% if @canShowCode %>
<% if member.user.show_name == '' && member.user.user_extensions.student_id == '' %>
<li>
<%= l(:label_username)%>
<%= link_to(member.user.name, user_path(member.user)) %>
</li>
<% else %>
<% unless member.user.show_name == ''%>
<li>
<%= l(:label_bidding_user_studentname) %> :
<%= link_to member.user.show_name, user_path(member.user) %>
</li>
</br>
<%#= content_tag "li", "#{l(:label_bidding_user_studentname)}#{' : '}"link_to(member.user.show_name, user_path(member.user)) %>
<% else %>
<%= content_tag "li", link_to(member.user.name, user_path(member.user)) %>
<% end %>
<!--teacher's code disapeared moified by huang-->
<% if @canShowCode %>
<% unless member.user.user_extensions.student_id == '' %>
<li>
<%= l(:label_bidding_user_studentcode) %> :
<%= link_to member.user.user_extensions.student_id, user_path(member.user) %>
</li>
<%#= content_tag "li", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :style=> "color:#1c9ec7;" %>
<% end %>
<% end %>
<%#= content_tag "li", "#{l(:label_bidding_user_studentname)}#{' : '}"link_to(member.user.show_name, user_path(member.user)) %>
<% else %>
<li>
<%= l(:label_username)%>
<%= link_to(member.user.name, user_path(member.user)) %>
</li>
<% end %>
<!--teacher's code disapeared moified by huang-->
</ul>
<% if @subPage_title == l(:label_student_list) %>
<%= link_to format("%0.2f",member.score.nil? ? 0 : member.score.to_s), {

View File

@ -7,24 +7,36 @@
<a href="#" class="st_img" style="float:left;"> <%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 40, :height => 40)) %></a>
<ul style="margin-left: 15px">
<% if @canShowCode %>
<% if member.user.show_name == '' && member.user.user_extensions.student_id == '' %>
<li>
<%= l(:label_username)%>
<%= link_to(member.user.name, user_path(member.user)) %>
</li>
<% else %>
<% unless member.user.show_name == ''%>
<li>
<%= l(:label_bidding_user_studentname) %> :
<%= link_to member.user.show_name, user_path(member.user) %>
</li> </br>
<%#= content_tag "li", "#{l(:label_bidding_user_studentname)}#{' : '}"link_to(member.user.show_name, user_path(member.user)) %>
<% else %>
<%= content_tag "li", link_to(member.user.name, user_path(member.user)) %>
</li>
</br>
<% end %>
<!--teacher's code disapeared moified by huang-->
<% if @canShowCode %>
<% unless member.user.user_extensions.student_id == '' %>
<li>
<%= l(:label_bidding_user_studentcode) %> :
<%= link_to member.user.user_extensions.student_id, user_path(member.user) %>
</li>
<%#= content_tag "li", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :style=> "color:#1c9ec7;" %>
<% end %>
<% end %>
<%#= content_tag "li", "#{l(:label_bidding_user_studentname)}#{' : '}"link_to(member.user.show_name, user_path(member.user)) %>
<% else %>
<li>
<%= l(:label_username)%>
<%= link_to(member.user.name, user_path(member.user)) %>
</li>
<% end %>
<!--teacher's code disapeared moified by huang-->
</ul>
<% if @subPage_title == l(:label_student_list) %>
<%= link_to format("%0.2f",member.score.to_s), {