个人资料的真实姓名增加“隐藏真实姓名”选项

This commit is contained in:
cxt 2017-07-20 11:14:46 +08:00
parent 482022a58a
commit 24a3fdc453
81 changed files with 140 additions and 121 deletions

View File

@ -195,6 +195,7 @@ class MyController < ApplicationController
@user.nickname = params[:nickname]
@user.lastname = params[:lastname]
@user.firstname = ""
@user.show_realname = params[:show_realname] ? 0 : 1
@user.pref.attributes = params[:pref]
@user.pref[:no_self_notified] = (params[:no_self_notified] == '1')
#@user.login = params[:login].strip

View File

@ -485,8 +485,17 @@ class User < Principal
end
def show_name
if self.show_realname
name = lastname + firstname
else
name = nickname
end
name.blank? ? login : name
end
def show_real_name
name = lastname + firstname
name.empty? || name.nil? ? login : name
name.blank? ? login : name
end
def show_occupation

View File

@ -7,7 +7,7 @@
<span class="color-grey">(
<%= number_to_human_size attachment.filesize %>)
</span>
<% user_name = attachment.author.show_name.empty? ? attachment.author : attachment.author.show_name %>
<% user_name = attachment.author.show_real_name.empty? ? attachment.author : attachment.author.show_real_name %>
<span title="<%= user_name %>">
<%= link_to h(truncate(user_name, length: 15, omission: '...')),user_path(attachment.author),:class => "link-color-grey" %>,
<%= format_time(attachment.created_on) %>

View File

@ -72,7 +72,7 @@
<tbody>
<% @members.each do |member| %>
<tr>
<td><%= link_to member.user.show_name, user_path(member.user), :class => 'course_class_users_st_name' %></td>
<td><%= link_to member.user.show_real_name, user_path(member.user), :class => 'course_class_users_st_name' %></td>
<td><%= member.resource_num %></td>
<td><%= member.message_num %></td>
<td><%= member.message_reply_num %></td>

View File

@ -16,7 +16,7 @@
</a>
<div class="clearfix task-index-list-user">
<%= link_to image_tag(url_to_avatar(sy_author), :width => "60", :height => "60", :class => "panel-warp-img mr10 fl", :alt => "用户"), user_path(sy_author), :target => '_blank' %>
<%= link_to sy_author.show_name, user_path(sy_author), :class => 'task-index-name task-hide fl', :target => '_blank' %>
<%= link_to sy_author.show_real_name, user_path(sy_author), :class => 'task-index-name task-hide fl', :target => '_blank' %>
</div>
<p class="color-grey">
<% if !sy_author.user_extensions.school_id.blank? && sy_author.user_extensions.school %>

View File

@ -15,7 +15,7 @@
<% if !total_score.nil? && total_score !=0 %>
<li>
<%=link_to image_tag(url_to_avatar(contributor_score.user), :width => "50", :height => "50", :class=> "rankPortrait"),user_path(contributor_score.user) %>
<p><%=link_to contributor_score.user.show_name, user_path(contributor_score.user.id), :title => contributor_score.user.show_name %></p>
<p><%=link_to contributor_score.user.show_real_name, user_path(contributor_score.user.id), :title => contributor_score.show_real_name_name %></p>
<p><span class="sy_corange" style="cursor:pointer">
<a onmouseover ="message_titile_show($(this),event)" onmouseout ="message_titile_hide($(this))" class="sy_corange">
<%=total_score %></a></span></p>

View File

@ -12,7 +12,7 @@
<% hero_homework_scores.each do |student_score| %>
<% if student_score.score.to_i != 0 %>
<li> <a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(student_score.user), :width => "35", :height => "35", :class=> "rankPortrait"),user_path(student_score.user) %></a>
<p><a href="javascript:void(0);"><%=link_to student_score.user.show_name, user_path(student_score.user), :title => student_score.user.show_name %></a></p>
<p><a href="javascript:void(0);"><%=link_to student_score.user.show_real_name, user_path(student_score.user), :title => student_score.show_real_name_name %></a></p>
<p><span class="c_red" style="cursor:pointer" >
<% if !(User.current.allowed_to?(:as_teacher, @course) || User.current.admin?) && User.current.id != student_score.user.id && course_has_score_open_common_homework(@course) %>
<%= "**" %>

View File

@ -12,7 +12,7 @@
<div class="teacher_st_boxlist">
<%= link_to image_tag(url_to_avatar(member.user), :width => "50", :height => "50", :style => "display:block;", :class =>'teacher_member_img'), user_path(member.user_id), :class => 'fl' ,:alt => "用户头像" %>
<div class="fl">
<%= link_to(member.user.show_name, user_path(member.user),:class => "ml10 mt5 mb10 link-blue db") %>
<%= link_to(member.user.show_real_name, user_path(member.user),:class => "ml10 mt5 mb10 link-blue db") %>
<span class="c_grey ml10"><%= l(:label_username)%><%= member.user.login%></span>
</div>
<span class="fr c_grey mr15"><%= format_date(member.created_on)%></span>

View File

@ -69,7 +69,7 @@
<% @members.each do |member| %>
<% is_hidden = boo && User.current.id != member.user_id %>
<tr>
<td><%= link_to member.user.show_name, user_path(member.user), :class => 'course_class_users_st_name' %></td>
<td><%= link_to member.user.show_real_name, user_path(member.user), :class => 'course_class_users_st_name' %></td>
<td><%= member.committed_work_num %></td>
<td><%= member.un_commit_work_num %></td>
<td><%= member.late_commit_work_num %></td>

View File

@ -9,7 +9,7 @@
<div class="ping_distop f14">
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
<span>
<%= link_to journal.user.show_name, user_path(journal.user),:class => 'c_blue fb fl mb10 f14', :target => "_blank"%>
<%= link_to journal.user.show_real_name, user_path(journal.user),:class => 'c_blue fb fl mb10 f14', :target => "_blank"%>
</span>
<span class="c_grey fr f14">
<%= format_time(journal.created_on) %>
@ -44,12 +44,12 @@
<% ids = 'project_respond_form_'+ journal.id.to_s%>
<% if reply_allow %>
<div id='<%= ids %>' class="respond-form">
<%= render :partial => 'words/new_respond_course', :locals => {:journal => journal, :m_reply_id => journal,:show_name => true} %>
<%= render :partial => 'words/new_respond_course', :locals => {:journal => journal, :m_reply_id => jourshow_real_name_name => true} %>
</div>
<% end %>
<div class="cl"></div>
<%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true, :allow_delete => @course && User.current.allowed_to?(:as_teacher,@course)} %>
<%= render :partial => "words/journal_reply", :locals => {:journal => show_real_name:show_name => true, :allow_delete => @course && User.current.allowed_to?(:as_teacher,@course)} %>
</div>
<div class="cl"></div>

View File

@ -1,7 +1,7 @@
<% @members.each do |member| %>
<li >
<%#= link_to_user_header member.principal,true,:class => "w150 c_orange fl" %>
<%= link_to "#{member.principal}#{member.principal.show_name}", user_path(member.principal), :class => "w150 linkBlue fl", :style=>"white-space: nowrap;overflow: hidden;text-overflow: ellipsis;", :title => "#{member.principal}#{member.principal.show_name}" %>
<%= link_to "#{member.principal}#{member.principal.show_real_name}", user_path(member.principal), :class => "w150 linkBlue fl", :style=>"white-space: nowrap;overflow: hidden;text-overflow: ellipsis;", :title => "#{member.principal}#{member.princshow_real_name_name}" %>
<span class="w150 fl">
<%= zh_course_role(h member.roles.sort.collect(&:to_s).join(', ')) %>
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),

View File

@ -58,7 +58,7 @@
<% user = member.user %>
<li class="clearfix" id="setting_member_<%= member.id %>">
<span class="span1"><%= index + 1 + (@page - 1) * 20 %></span>
<span class="span2"><%= link_to user.show_name, user_path(user), :target => '_blank' %></span>
<span class="span2"><%= link_to user.show_real_name, user_path(user), :target => '_blank' %></span>
<span><%= user.login %></span>
<span><%= user.user_extensions ? user.user_extensions.student_id : '' %></span>
<span><%= member.course_group_id == 0 ? '未分班' : member.course_group.name %></span>

View File

@ -64,7 +64,7 @@
<span class="span1 open-select">
<%= index + 1 + (@page -1) * 20 %>
</span>
<span class="span2"><%= link_to user.show_name, user_path(user), :target => '_blank' %></span>
<span class="span2"><%= link_to user.show_real_name, user_path(user), :target => '_blank' %></span>
<span><%= user.login %></span>
<span><%= user.user_extensions ? user.user_extensions.student_id : '' %></span>

View File

@ -58,7 +58,7 @@
<% user = member.user %>
<li class="clearfix" id="setting_member_<%= member.id %>">
<span class="span1"><%= index + 1 + (@page - 1) * 20 %></span>
<span class="span2"><%= link_to user.show_name, user_path(user), :target => '_blank' %></span>
<span class="span2"><%= link_to user.show_real_name, user_path(user), :target => '_blank' %></span>
<span><%= user.login %></span>
<span><%= user.user_extensions ? user.user_extensions.student_id : '' %></span>
<span class="span6">

View File

@ -46,7 +46,7 @@
<% user = member.user %>
<li class="clearfix" id="setting_member_<%= member.id %>">
<span class="span1"><%= index + 1 + (@page-1) * 20 %></span>
<%= link_to user.show_name, user_path(user), :class => '', :target => '_blank' %>
<%= link_to user.show_real_name, user_path(user), :class => '', :target => '_blank' %>
<span><%= user.login %></span>
<span><%= zh_course_role(h member.roles.where("name != 'Student'").first.name) %></span>
</li>

View File

@ -84,7 +84,7 @@
<td><%= (@page - 1) * @limit + i + 1 %></td>
<td>
<%= link_to image_tag(url_to_avatar(user), :width => "30", :height => "30", :style => "display:block;"), user_path(user), :class => 'sy_class_users_st fl mt5 mr5' ,:alt => "用户头像", :target => '_blank' %>
<%= link_to user.show_name, user_path(user), :class => 'fl sy_class_users_st_name' ,:title => "#{user.show_name}", :target => '_blank' %>
<%= link_to user.show_real_name, user_path(user), :class => 'fl sy_class_users_st_name' ,:title => "#{show_real_name_name}", :target => '_blank' %>
</td>
<td>
<span class="sy_class_users_st_num" title="<%= user.user_real_extension.student_id %>"><%= user.user_real_extension.student_id %></span>
@ -119,7 +119,7 @@
<div class="sy_tips_box_inner undis" style="left: <%=is_teacher ? '230px' : '215px' %>; top: -60px; text-align: left;">
<span style="top: 75px;"></span>
<p >
<font class="fb"><%= user.show_name %>(<%=user.login %>)</font><br/>
<font class="fb"show_real_name.show_name %>(<%=user.login %>)</font><br/>
资源&nbsp;&nbsp;&nbsp;&nbsp;发布数:<%= member.resource_num.nil? ? 0 : member.resource_num %><br/>
<font class="mr15">问答&nbsp;&nbsp;&nbsp;&nbsp;发布数:<%= member.message_num.nil? ? 0 : member.message_num %></font>回复数:<%= member.message_reply_num.nil? ? 0 : member.message_reply_num %><br/>
<font class="mr15">通知&nbsp;&nbsp;&nbsp;&nbsp;提交数:<%= member.news_num.nil? ? 0 : member.news_num %></font>留言数:<%= member.news_reply_num.nil? ? 0 : member.news_reply_num %><br/>

View File

@ -9,7 +9,7 @@
<% members.each do |mem| %>
<ul class="fontGrey3" style="line-height:30px;">
<li class="fl w50"><input type="checkbox" name="chooseStudent[]" value="<%=mem.id %>" class="mr5" style="vertical-align:middle;" /></li>
<li class="fl w125 hidden mr10"><%=mem.user.show_name %></li>
<li class="fl w125 hidden mr10"><%=mem.user.show_real_name %></li>
<% student_id = mem.user.user_extensions.student_id %>
<li class="fl w125 tac hidden"><%=student_id.nil? || student_id == "" ? '--' : mem.user.user_extensions.student_id %></li>
<li class="cl"></li>

View File

@ -11,7 +11,7 @@
</div>
<div class="tscore_con" id="user_score">
<% act_score = CourseContributorScore.where("user_id = ? and course_id = ?", member.user_id, member.course_id).first %>
<h2><%= member.user.show_name %> 活跃度计算</h2>
<h2><%= member.user.show_real_name %> 活跃度计算</h2>
<% if act_score.nil? %>
<div style="padding-left: 62px;padding-bottom: 2px;padding-right: 2px;padding-top: 10px;">
资源发布数 x 5 = 0 x 5 = 0</br>

View File

@ -16,7 +16,7 @@
</div>
<div class="tscore_con" id="user_score">
<h2><%= @member_score.user.show_name %> 历次作业积分</h2>
<h2><%= @member_score.user.show_real_name %> 历次作业积分</h2>
<ul class="tscore_box" style="max-height: 400px; overflow: auto;">
<li ><span class="c_blue w280">作业名称</span><span class="c_blue w70">得分</span></li>
<% @member_score.homework_common_list.each_with_index do |homework_common, index| %>

View File

@ -40,13 +40,13 @@
<tbody>
<tr>
<td><%= index + 1 %></td>
<td><span class="edu-txt-w100 task-hide "><%= student_work.user.show_name %></span></td>
<td><span class="edu-txt-w100 task-hide "><%= student_work.user.show_real_name %></span></td>
<td><span class="edu-txt-w100 task-hide "><%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %></span></td>
<td><%= format_time(student_work.commit_time) %></td>
<% if student_work.simi_id.to_i > 0 && @works_hash[student_work.simi_id.to_i] %>
<% simi_student_work = @works_hash[student_work.simi_id.to_i] %>
<td style="border-left:1px solid #eee;"><span class="edu-txt-w100 task-hide "><%=simi_student_work.user.show_name%></span></td>
<td style="border-left:1px solid #eee;"><span class="edu-txt-w100 task-hide "><%=simi_student_work.show_real_name_name%></span></td>
<td><span class="edu-txt-w100 task-hide "><%= simi_student_work.user.user_extensions.nil? ? "--" : simi_student_work.user.user_extensions.student_id%></span></td>
<td><%= format_time(simi_student_work.commit_time) %></td>
<% if student_work.simi_value.to_i >= 90 %>

View File

@ -1,7 +1,7 @@
<div class="stud-class-container">
<p style="line-height: 2.0;">
<i class="fa fa-map-marker mr5 color-grey"></i>
<%= link_to User.current.show_name, user_path(User.current) %> > <%= link_to '课堂教学', courses_path %>
<%= link_to User.current.show_real_name, user_path(User.current) %> > <%= link_to '课堂教学', courses_path %>
</p>
<div class="edu-con-top ">
<span class="ml15 color-grey font-16">新建班级</span>

View File

@ -67,7 +67,7 @@
<% user = member.user %>
<tr id="setting_member_<%= member.id %>">
<td><%= index + 1 + (@page - 1) * 20 %></td>
<td><%= link_to user.show_name, user_path(user), :class => 'edu-txt-w140 task-hide mt5', :target => '_blank' %></td>
<td><%= link_to user.show_real_name, user_path(user), :class => 'edu-txt-w140 task-hide mt5', :target => '_blank' %></td>
<td><span class="edu-txt-w140 task-hide mt5"><%= user.login %></span></td>
<td><span class="edu-txt-w140 task-hide mt5"><%= user.user_extensions ? user.user_extensions.student_id : '' %></span></td>
<td><%= member.course_group_id == 0 ? '未分班' : member.course_group.name %></td>

View File

@ -19,7 +19,7 @@
<!--<i class="fa fa-dot-circle-o color-blue blue fl" style="display:none;" aria-hidden="true"></i>-->
<input id="change_m_<%= mem.id %>" type="radio" name="chooseteacher" value="<%=mem.id %>" class="mr5 mt7 fl magic-radio" style="vertical-align:middle;" />
<label for="change_m_<%= mem.id %>">
<span class="edu-info-dark task-hide fl"><%=mem.user.show_name %></span><span class="mr15 fl">(<%= mem.user.login %>)</span>
<span class="edu-info-dark task-hide fl"><%=mem.user.show_real_name %></span><span class="mr15 fl">(<%= mem.user.login %>)</span>
</label>
</li>
<% end %>

View File

@ -13,7 +13,7 @@
<tr>
<td><%= index + 1 %></td>
<td>
<%= link_to member.user.show_name, user_path(member.user), :class => "pro_new_idname ml10 mr10", :title => "#{member.user.show_name}" %>
<%= link_to member.user.show_real_name, user_path(member.user), :class => "pro_new_idname ml10 mr10", :title => "#{member.show_real_name_name}" %>
</td>
<td>
<span class="pro_new_school_name ml5 mr5"><%=member.user.user_extensions.student_id %></span>

View File

@ -65,7 +65,7 @@
<% user = member.user %>
<tr id="setting_member_<%= member.id %>">
<td><%= index + 1 + (@page -1) * 20 %></td>
<td><%= link_to user.show_name, user_path(user), :target => '_blank', :class => 'edu-txt-w140 task-hide mt5' %></td>
<td><%= link_to user.show_real_name, user_path(user), :target => '_blank', :class => 'edu-txt-w140 task-hide mt5' %></td>
<td><span class="edu-txt-w140 task-hide mt5"><%= user.login %></span></td>
<td><span class="edu-txt-w140 task-hide mt5"><%= user.user_extensions ? user.user_extensions.student_id : '' %></span></td>
<td><a href="javascript:void(0);" class="span5" onclick="delete_confirm_box('<%=unjoin_group_courses_path(:member => member.id, :group_id => @group.id) %>', '确定要移除吗?<br/>移除后,该学生需要重新选分班。')">移除</a></td>

View File

@ -28,7 +28,7 @@
<tr id="setting_member_<%= teacher.id %>">
<td><%= index + 1 %></td>
<td>
<%= link_to user.show_name, user_path(user), :target => '_blank', :class => 'edu-txt-w140 task-hide mt5' %>
<%= link_to user.show_real_name, user_path(user), :target => '_blank', :class => 'edu-txt-w140 task-hide mt5' %>
</td>
<td><span class="edu-txt-w140 task-hide mt5"><%= user.try(:login) %></span></td>
<td><%= zh_course_role(h teacher.roles.where("name != 'Student'").first.name) %></td>
@ -46,7 +46,7 @@
<tr id="setting_member_<%= user.id %>">
<td><%= @teacher_count + index + 1 %></td>
<td>
<%= link_to user.show_name, user_path(user), :target => '_blank', :class => 'edu-txt-w140 task-hide mt5' %>
<%= link_to show_real_name_name, user_path(user), :target => '_blank', :class => 'edu-txt-w140 task-hide mt5' %>
</td>
<td><span class="edu-txt-w140 task-hide mt5"><%= user.try(:login) %></span></td>
<td><%= apply.content && apply.content.include?('9') ? "教师" : "助教" %></td>

View File

@ -69,7 +69,7 @@
<label for="no_group_member_<%= member.id %>"><%= index + 1 + (@page -1) * 20 %></label>
</span>
</td>
<td><%= link_to user.show_name, user_path(user), :target => '_blank', :class => 'edu-txt-w140 task-hide mt5' %></td>
<td><%= link_to user.show_real_name, user_path(user), :target => '_blank', :class => 'edu-txt-w140 task-hide mt5' %></td>
<td><span class="edu-txt-w140 task-hide mt5"><%= user.login %></span></td>
<td>
<span class="edu-txt-w140 task-hide mt5"><%= user.user_extensions ? user.user_extensions.student_id : '' %></span>

View File

@ -6,7 +6,7 @@
<!--<i class="fa fa-check-square-o color-blue blue fl" style="display:none;" aria-hidden="true"></i>-->
<input id="add_student_<%= user.id %>" type="checkbox" class="fl mt7 mr5 magic-checkbox" name="membership[user_ids][]" value="<%= user.id %>">
<label for="add_student_<%= user.id %>">
<a href="<%= user_path(user) %>" target="_blank" class="task-hide fl span1 edu-name-dark"><%= user.show_name %>(<%= user.login %>)</a>
<a href="<%= user_path(user) %>" target="_blank" class="task-hide fl span1 edu-name-dark"><%= user.show_real_name %>(<%= user.login %>)</a>
<span class="fl color-grey span2 ml10"><%= user.user_extensions.user_technical_title %></span>
<span class="span3 fl ml10 edu-txt-w140 task-hide"><%= user.user_extensions.school ? user.user_extensions.school.name : "" %></span>
</label>

View File

@ -6,7 +6,7 @@
<!--<i class="fa fa-check-square-o color-blue blue fl" style="display:none;" aria-hidden="true"></i>-->
<input id="choose_course_teacher_<%= user.id %>" type="checkbox" class="fl mt7 mr5 magic-checkbox" name="membership[user_ids][]" value="<%= user.id %>">
<label for="choose_course_teacher_<%= user.id %>">
<a href="<%= user_path(user) %>" target="_blank" class="task-hide fl span1 edu-txt-w140"><%= user.show_name %>(<%= user.login %>)</a>
<a href="<%= user_path(user) %>" target="_blank" class="task-hide fl span1 edu-txt-w140"><%= user.show_real_name %>(<%= user.login %>)</a>
<span class="fl color-grey span2 ml10"><%= user.user_extensions.user_technical_title %></span>
<span class="span3 fl ml10 edu-txt-w140 task-hide"><%= user.user_extensions.school ? user.user_extensions.school.name : "" %></span>
</label>

View File

@ -3,7 +3,7 @@
<% members.each do |mem| %>
<li>
<input type="radio" name="chooseteacher" value="<%=mem.id %>" class="mr5" style="vertical-align:middle;" />
<span class="break_word" style="width: 350px;"><%=mem.user.show_name %><%= mem.user.login %></span>
<span class="break_word" style="width: 350px;"><%=mem.user.show_real_name %><%= mem.user.login %></span>
</li>
<% end %>
<% end %>

View File

@ -75,7 +75,7 @@
<div class="cl"></div>
<div class="postDetailCreater">
<%= link_to @article.author.show_name, user_path(@article.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<%= link_to @article.author.show_real_name, user_path(@article.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
</div>
<div class="postDetailDate mb5"><%= format_time( @article.created_on)%></div>
<div class="cl"></div>
@ -120,7 +120,7 @@
</div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher">
<%= link_to reply.author.show_name, user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
<%= link_to reply.aushow_real_name_name, user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
</div>
<div class="homepagePostReplyContent upload_img break_word" id="reply_message_description_<%= reply.id %>">
<%= reply.content.html_safe%>

View File

@ -15,7 +15,7 @@
<label for="shixun_input_<%= shixun.id %>"></label>
<%= link_to shixun.name, shixun_path(shixun), :class => "edu-info-dark task-hide mt3", :target => "_blank" %>
</td>
<td><%= link_to shixun.owner.try(:show_name), user_path(shixun.owner), :class => "edu-txt-w140 mt3 task-hide" %></td>
<td><%= link_to shixun.owner.try(:show_real_name), user_path(shixun.owner), :class => "edu-txt-w140 mt3 task-hide" %></td>
<td><%= shixun.myshixuns.count %></td>
</tr>
<% end %>

View File

@ -43,7 +43,7 @@
</li>
<li class="color-grey clearfix font-12">
<span class="javascript:void(0);"><%= link_to @course.teacher.show_name, user_path(@course.teacher), :class => 'edu-info-dark task-hide fl' %></span>
<span class="javascript:void(0);"><%= link_to @course.teacher.show_real_name, user_path(@course.teacher), :class => 'edu-info-dark task-hide fl' %></span>
<span class="ml30 edu-info-dark task-hide fl"><%= get_occupation_from_user(@course.teacher).blank? ? '' : get_occupation_from_user(@course.teacher) %></span>
<span class="ml30" id="teacher_number"><%= course_teacher_link teacher_num %>教师</span>
<span class="ml30" id="student_number"><%= course_student_link student_num %>学生</span>

View File

@ -55,7 +55,7 @@
<div class="edu-class-container edu-position" style="flex: 1 0 auto;">
<p class="mb10 font-14">
<i class="fa fa-map-marker mr5 color-grey" ></i>
<%= link_to User.current.show_name, user_path(User.current) %> >
<%= link_to User.current.show_real_name, user_path(User.current) %> >
<%= link_to '课堂教学', courses_path %> >
<%= link_to @course.syllabus.title, syllabus_path(@course.syllabus), :title => '课程' %> ><%= @course.name%>
<%#= link_to @course.name, course_path(@course), :title => '班级' %>

View File

@ -25,7 +25,7 @@
<% if @show_page %>
<p class="mb10">
<i class="fa fa-map-marker mr5 color-grey" ></i>
<%= link_to User.current.show_name, user_path(User.current) %> >
<%= link_to User.current.show_real_name, user_path(User.current) %> >
<%= link_to '课堂教学', courses_path %> >
<%= link_to @course.syllabus.title, syllabus_path(@course.syllabus), :title => '课程' %> ><%= @course.name%>
<%#= link_to @course.name, course_path(@course), :title => '班级' %>

View File

@ -43,7 +43,9 @@
<li class="clearfix mb10">
<label class="panel-form-label fl mr18"><span class="color-red mr5">*</span>真实姓名</label>
<input type="hidden" id="lastname" name="lastname" maxlength="20" nh_required="1" required="required" class="input-height select-width panel-box-sizing fl" placeholder="填写您的真实姓名" value="<%= @user.lastname+@user.firstname %>">
<input type="text" maxlength="20" disabled class="input-height select-width panel-box-sizing fl disabled-bg" placeholder="填写您的真实姓名" value="<%= @user.lastname+@user.firstname %>">
<input type="text" maxlength="20" disabled class="input-height select-width panel-box-sizing fl disabled-bg mr15" placeholder="填写您的真实姓名" value="<%= @user.lastname+@user.firstname %>">
<input type="checkbox" id="show_realname" name="show_realname" class="fl magic-checkbox" value="1" <%= User.current.show_realname ? '' : 'checked' %>>
<label for="show_realname" class="fl mt3">隐藏</label>
<div class="cl"></div>
<span class="color-orange fl hint none" id="lastname_hint" style="margin-left:90px;"><i class="fa fa-exclamation-circle mr5"></i>请填写您的真实姓名</span>
</li>
@ -192,7 +194,9 @@
</li>
<li class="clearfix mb10">
<label class="panel-form-label fl mr18"><span class="color-red mr5">*</span>真实姓名</label>
<input type="text" id="lastname" name="lastname" maxlength="20" nh_required="1" required="required" class="input-height select-width panel-box-sizing fl" placeholder="填写您的真实姓名" value="<%= @user.lastname+@user.firstname %>">
<input type="text" id="lastname" name="lastname" maxlength="20" nh_required="1" required="required" class="mr15 input-height select-width panel-box-sizing fl" placeholder="填写您的真实姓名" value="<%= @user.lastname+@user.firstname %>">
<input type="checkbox" id="show_realname" name="show_realname" class="fl magic-checkbox" value="1" <%= User.current.show_realname ? '' : 'checked' %>>
<label for="show_realname" class="fl mt3">隐藏</label>
<div class="cl"></div>
<span class="color-orange fl hint none" id="lastname_hint" style="margin-left:90px;"><i class="fa fa-exclamation-circle mr5"></i>请填写您的真实姓名</span>
</li>

View File

@ -23,7 +23,7 @@
<ul class="addMemberC fl" id="all_students_list"></ul>
<div class="rightArrow"><img src="/images/course/right-arrow.png" width="16" height="30" /></div>
<ul class="addMemberC fr" id="choose_students_list">
<li id="choose_student_<%=User.current.id %>"><%=User.current.show_name %>
<li id="choose_student_<%=User.current.id %>"><%=User.current.show_real_name %>
<% unless User.current.user_extensions.student_id == "" %>
(<%=User.current.user_extensions.student_id %>)
<% end %>

View File

@ -13,7 +13,7 @@
<ul class="addMemberC fl" id="all_students_list"></ul>
<div class="rightArrow"><img src="/images/course/right-arrow.png" width="16" height="30" /></div>
<ul class="addMemberC fr" id="choose_students_list">
<li id="choose_student_<%=User.current.id %>"><%=User.current.show_name %>
<li id="choose_student_<%=User.current.id %>"><%=User.current.show_real_name %>
<% unless User.current.user_extensions.student_id == "" %>
(<%=User.current.user_extensions.student_id %>)
<% end %>
@ -60,12 +60,12 @@
for(var i=0; i<lists.length; i++) {
var id = $(lists[i]).attr("id").replace(/[^0-9]/ig,"");
str += id;
var show_name = $(lists[i]).html();
var index = show_name.indexOf("(");
var show_real_name = $(lists[i]).html();
var index = show_real_name.indexOf("(");
if (index != -1) {
var name = show_name.substring(0,show_name.indexOf("("));
var name = show_real_name.substring(0,show_real_name.indexOf("("));
} else {
var name = show_name;
var name = show_real_name;
}
show += name;
if (i == 0) {

View File

@ -6,10 +6,10 @@
</span>
</li>
<li class=" hwork_name ">
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02"%>
<%= link_to student_work.user.show_real_name,user_path(student_work.user),:title => student_work.user.show_real_name, :class => "c_blue02"%>
</li>
<li class=" hwork_tit">
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_real_name + '的作品' : student_work.name%>
<%= link_to student_work_name, student_work_path(student_work.id),:remote => true,:title => student_work.name, :class => "c_blue02"%>
</li>
<li class=" hwork_time_c">

View File

@ -1,7 +1,7 @@
<tr id="student_work_<%= student_work.id %>">
<td id="work_num_<%= student_work.id %>"><%= (@page - 1) * @limit + index + 1 %></td>
<td>
<%= link_to student_work.user.show_name, user_path(student_work.user) %>
<%= link_to student_work.user.show_real_name, user_path(student_work.user) %>
</td>
<td title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %>">
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %>
@ -69,7 +69,7 @@
<div class="popup_tip_box-black" style="left:100px;" >
<em></em>
<span></span>
<p><%= student_work.user.show_name %><%= student_work.user.login %><br/>
<p><%= student_work.user.show_real_name %><%= student_work.user.login %><br/>
最终评分:<%= student_work.final_score %> 分<br/>
迟交扣分:<%= student_work.late_penalty %> 分<br/>
<% if @homework.anonymous_comment == 0%>

View File

@ -6,14 +6,14 @@
<%= link_to(image_tag(url_to_avatar(st.user),:width =>"40",:height => "40", :style => "display:block;"),user_path(st.user), :class => "fl", :target => '_blank') %>
<% if !is_expand %>
<span class="fl" style="width:120px;">
<%= link_to st.user.show_name + "(组长)", user_path(st.user), :class => "fl hidden ml5 linkGrey", :style => "max-width:75px;", :target => '_blank' %>
<%= link_to st.user.show_real_name + "(组长)", user_path(st.user), :class => "fl hidden ml5 linkGrey", :style => "max-width:75px;", :target => '_blank' %>
</span>
<span class="fl hidden student_work_<%= st.id%>" style="width:105px; text-align: center" onclick="show_student_work('<%= student_work_path(st)%>')">
<%= st.user.user_extensions.student_id.nil? || st.user.user_extensions.student_id == "" ? "--" : st.user.user_extensions.student_id%>
</span>
<% else %>
<span class="fl" style="width:120px;">
<%= link_to st.user.show_name, user_path(st.user), :class => "fl hidden ml5 linkGrey", :style => "max-width:75px;", :target => '_blank' %>
<%= link_to st.user.show_real_name, user_path(st.user), :class => "fl hidden ml5 linkGrey", :style => "max-width:75px;", :target => '_blank' %>
</span>
<span class="fl student_work_<%= st.id%> hidden" style="width:105px; text-align: center" onclick="show_student_work('<%= student_work_path(st)%>')">
<%= st.user.user_extensions.student_id.nil? || st.user.user_extensions.student_id == "" ? "--" : st.user.user_extensions.student_id%>

View File

@ -1,7 +1,7 @@
<tr id="student_work_<%= student_work.id %>">
<td id="work_num_<%= student_work.id %>"><%= (@page - 1) * @limit + index + 1 %></td>
<td>
<%= link_to student_work.user.show_name, user_path(student_work.user) %>
<%= link_to student_work.user.show_real_name, user_path(student_work.user) %>
</td>
<td title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %>">
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %>
@ -72,7 +72,7 @@
<div class="popup_tip_box-black" style="left:100px;" >
<em></em>
<span></span>
<p><%= student_work.user.show_name %><%= student_work.user.login %><br/>
<p><%= student_work.user.show_real_name %><%= student_work.user.login %><br/>
最终评分:<%= student_work.final_score %> 分<br/>
迟交扣分:<%= student_work.late_penalty %> 分<br/>
<% if @homework.anonymous_comment == 0%>

View File

@ -1,7 +1,7 @@
<tr id="student_work_<%= student_work.id %>">
<td id="work_num_<%= student_work.id %>"><%= (@page - 1) * @limit + index + 1 %></td>
<td>
<%= link_to student_work.user.show_name, user_path(student_work.user) %>
<%= link_to student_work.user.show_real_name, user_path(student_work.user) %>
</td>
<td title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %>">
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %>
@ -72,7 +72,7 @@
<div class="popup_tip_box-black " style="left:100px;" >
<em></em>
<span></span>
<p><%= student_work.user.show_name %><%= student_work.user.login %><br/>
<p><%= student_work.user.show_real_name %><%= student_work.user.login %><br/>
最终评分:<%= student_work.final_score %> 分<br/>
迟交扣分:<%= student_work.late_penalty %> 分<br/>
<% if @homework.anonymous_comment == 0%>

View File

@ -1,7 +1,7 @@
<tr id="student_work_<%= student_work.id %>">
<td id="work_num_<%= student_work.id %>"><%= (@page - 1) * @limit + index + 1 %></td>
<td>
<%= link_to student_work.user.show_name, user_path(student_work.user) %>
<%= link_to student_work.user.show_real_name, user_path(student_work.user) %>
</td>
<td title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %>">
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %>

View File

@ -12,8 +12,8 @@
<%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40",:style => "display:block;"),user_path(student_work.user), :target => '_blank') %>
</td>
<% if @homework.homework_type != 3 %>
<td class="<%= @homework.homework_type == 1 ? (@homework.anonymous_comment == 1 ? 'hworkStName130' : 'hworkStName100') : (@homework.anonymous_comment == 1 ? 'hworkStName110' : 'hworkStName') %> pr10 float-none" title="<%= student_work.user.show_name%>" style="cursor:pointer;">
<%= link_to student_work.user.show_name ,user_path(student_work.user), :target => '_blank' %>
<td class="<%= @homework.homework_type == 1 ? (@homework.anonymous_comment == 1 ? 'hworkStName130' : 'hworkStName100') : (@homework.anonymous_comment == 1 ? 'hworkStName110' : 'hworkStName') %> pr10 float-none" title="<%= student_work.user.show_real_name%>" style="cursor:pointer;">
<%= link_to student_work.user.show_real_name ,user_path(student_work.user), :target => '_blank' %>
</td>
<td class="<%= @homework.homework_type == 1 ? (@homework.anonymous_comment == 1 ? 'hworkStName130' : 'hworkStID90') : (@homework.anonymous_comment == 1 ? 'hworkStID100' : 'hworkStID') %> pr10 float-none student_work_<%= student_work.id%>" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
@ -22,7 +22,7 @@
<% if @homework.homework_detail_group.base_on_project == 1 %>
<td class="hworkName float-none pr10 width130" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');">
<div>
<%= link_to student_work.user.show_name,"javascript:void(0)" ,:title => student_work.user.show_name, :class => "StudentName break_word"%>
<%= link_to student_work.user.show_real_name,"javascript:void(0)" ,:title => student_work.user.show_real_name, :class => "StudentName break_word"%>
</div>
</td>
<% if student_work.project_id == 0 || student_work.project_id.nil?%>
@ -41,7 +41,7 @@
<% elsif @homework.homework_detail_group.base_on_project == 0 %>
<td class="hworkName float-none pr10 <%=@homework.anonymous_comment == 1 ? 'width280' : 'width210' %>" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');">
<div>
<%= link_to student_work.user.show_name,"javascript:void(0)" ,:title => student_work.user.show_name, :class => "StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
<%= link_to student_work.user.show_real_name,"javascript:void(0)" ,:title => student_work.user.show_real_name, :class => "StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
</div>
</td>
<% end %>

View File

@ -6,14 +6,14 @@
</li>
<div class="student_work_<%= student_work.id%>">
<li class="hworkName mt12 pr10 <%= @homework.homework_type == 2 ? '' : 'width130'%>" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');">
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_real_name + '的作品' : student_work.name%>
<div>
<%= link_to student_work_name,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
</div>
</li>
<% if @homework.homework_type != 3 %>
<li class="<%=@homework.anonymous_comment == 1 ? 'hworkStName100' : 'hworkStName'%> pr10" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
<%= student_work.user.show_name%>
<li class="<%=@homework.anonymous_comment == 1 ? 'hworkStName100' : 'hworkStName'%> pr10" title="<%= student_work.user.show_real_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
<%= student_work.user.show_real_name%>
</li>
<li class="<%=@homework.anonymous_comment == 1 ? 'hworkStID90' : 'hworkStID'%> pr10" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>

View File

@ -9,7 +9,7 @@
<% if is_my_work%>
<td><%= index + 1 %></td>
<td><%= student_work.user.show_name%></td>
<td><%= student_work.user.show_real_name%></td>
<td><%= format_time student_work.updated_at %></td>
<td class="<%= score_color student_work.student_score %>">
<%= student_work.student_score.nil? ? '--' : format("%.1f",student_work.student_score)+"#{student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count}" %>

View File

@ -13,14 +13,14 @@
</li>
<li class="hworkName mt12 pr10 w250 student_work_<%= student_work.id%>">
<div>
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_real_name + '的作品' : student_work.name%>
<%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word w250"%>
</div>
</li>
<div class="student_work_<%= student_work.id%>">
<% if @homework.homework_type != 3 %>
<li class="hworkStName w80" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
<%= student_work.user.show_name%>
<li class="hworkStName w80" title="<%= student_work.user.show_real_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
<%= student_work.user.show_real_name%>
</li>
<li class="hworkStID" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>

View File

@ -3,7 +3,7 @@
<tbody>
<% @users.each do |user| %>
<tr class="group_member_li" data-id="<%= user.id %>">
<td><span class="edu-txt-w140 pl10 task-hide"><%= user.show_name %></span></td>
<td><span class="edu-txt-w140 pl10 task-hide"><%= user.show_real_name %></span></td>
<td><span class="edu-txt-w140 task-hide"><%= user.user_extensions.try(:student_id) %></span></td>
<td><%= @course.members.where(:user_id => user.id).first.course_group.try(:name) %></td>
</tr>

View File

@ -3,7 +3,7 @@
</div>
<div class="homepagePostDes">
<div class="homepagePostTo break_word mt-4">
<%= link_to homework.user.show_name, user_activities_path(homework.user_id), :class => "newsBlue mr15"%>
<%= link_to homework.user.show_real_name, user_activities_path(homework.user_id), :class => "newsBlue mr15"%>
</div>
<div class="homepagePostTitle break_full_word fl">
<% index = get_hw_index(homework, is_teacher) %>

View File

@ -9,7 +9,7 @@
</script>
<div class="" onmouseout="$(this).find('.reply-right').hide();" onmouseover="$(this).find('.reply-right').show();">
<div class="orig_right fl">
<%= link_to comment.creator_user.show_name, user_path(comment.creator_user), :class => "content-username hide fl" %>
<%= link_to comment.creator_user.show_real_name, user_path(comment.creator_user), :class => "content-username hide fl" %>
<span class="t_area"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
<div class="orig_content" id="reply_content_<%= comment.id %>">
<%= comment.content_detail.html_safe %>

View File

@ -2,7 +2,7 @@
<%= 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" %>
<div class="ping_back_tit">
<a href="javascript:void(0);" 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" %>
<%= link_to show_real_name ? jour.user.show_real_name : "匿名", show_real_name ? user_path(jour.user) : "javascript:void(0)", :title => jour.user.show_real_name, :class => "c_blue fl" %>
</a>
<% 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),

View File

@ -18,7 +18,7 @@
<% if is_change %>
<a href="javascript:void(0)" onclick="alert_change_project();" class="btn_grey_mid mt-5 ml10 fr">更换项目</a>
<% end %>
<%=link_to "<span class='fr grayTxt hidden mw150'>创建者:#{projectUser.show_name}</span>".html_safe, user_path(projectUser), :title => "#{projectUser.show_name}" %>
<%=link_to "<span class='fr grayTxt hidden mw150'>创建者:#{projectUser.show_real_name}</span>".html_safe, user_path(projectUser), :title => "#{projectUser.show_real_name}" %>
<div class="cl"></div>
</div>
<div>

View File

@ -6,7 +6,7 @@
<div class="task_popup_con">
<div class="clearfix mb10 edu-class-con-list">
<p class="fl">
<%= link_to @shixun.owner.try(:show_name), user_path(@shixun.owner), :class => "link-name-dark fl", :target => "_blank" %>
<%= link_to @shixun.owner.try(:show_real_name), user_path(@shixun.owner), :class => "link-name-dark fl", :target => "_blank" %>
<span class="fl mr5 ml5">/</span>
<%= link_to @shixun.name, shixun_path(@shixun), :class => "edu-info-dark fl", :target => "_blank" %>
</p>
@ -16,7 +16,7 @@
<%= link_to image_tag(url_to_avatar(@work.user), :width =>"50", :height => "50", :alt=>"头像", :style => "width:50px; height:50px;"), user_path(@work.user), :class => "fl edu-work-user-img", :target => "_blank" %>
<ul class="fl edu-txt-w240 ml15">
<li class="clearfix">
<%= link_to @work.user.try(:show_name), user_path(@work.user), :class => "edu-txt-w140 task-hide fl", :target => "_blank" %>
<%= link_to @work.user.try(:show_real_name), user_path(@work.user), :class => "edu-txt-w140 task-hide fl", :target => "_blank" %>
<!--<span class="color-orange ml10 fl">No.588</span>-->
</li>
<li>通关时间: <%= @myshixun.try(:status) == 1 ? (format_time @myshixun.done_time) : '- -' %></li>

View File

@ -37,10 +37,10 @@
<div class="cl"></div>
<li>
<span class="tit_fb"> 参与人员:</span>
<%= link_to(work.user.show_name+"(组长)", user_path(work.user.id), :class => "linkBlue" )%>
<%= link_to(work.user.show_real_name+"(组长)", user_path(work.user.id), :class => "linkBlue" )%>
<% members = work.student_work_projects.where("is_leader = 0") %>
<% members.each do |member| if !members.empty? %>
、<%=link_to((User.find member.user_id).show_name, user_path(member.user.id), :class => "linkBlue" ) %>
、<%=link_to((User.find member.user_id).show_real_name, user_path(member.user.id), :class => "linkBlue" ) %>
<% end %>
<% end %>
</li>

View File

@ -6,10 +6,10 @@
</span>
</li>
<li class=" hwork_name ">
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02"%>
<%= link_to student_work.user.show_real_name,user_path(student_work.user),:title => student_work.user.show_real_name, :class => "c_blue02"%>
</li>
<li class=" hwork_tit_une">
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_real_name + '的作品' : student_work.name%>
<%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work.name, :class => "c_blue02"%>
</li>
<li class=" hwork_time_c">

View File

@ -28,7 +28,7 @@
<div class="t_content fl">
<div class="J_Comment_Info">
<div class="t_info clearfix">
<%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user), :class => "content-username hide fl" %>
<%= link_to comment.creator_user.show_real_name, user_url_in_org(comment.creator_user), :class => "content-username hide fl" %>
<span class="t_area fl"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
</div>
</div>

View File

@ -7,7 +7,7 @@
<div class="t_content fl">
<div class="J_Comment_Info">
<div class="t_info clearfix">
<%= 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 => "content-username hide fl" %>
<%= link_to show_real_name ? score.user.show_real_name : "匿名", show_real_name ? user_path(score.user) : "javascript:void(0)", :title => show_real_name ? score.user.show_real_name : "匿评用户", :class => "content-username hide fl" %>
<span class="ml5 fl"><%= student_work_score_role score%></span>
<span class="t_area fl"><%= format_time score.updated_at %></span>
<% unless score.score.nil? %>
@ -48,7 +48,7 @@
<%= link_to image_tag(url_to_avatar(show_real_name_for_appeal ? score.student_works_scores_appeal.user : ""), :width => "32", :height => "32"), show_real_name_for_appeal ? user_path(score.student_works_scores_appeal.user) : "javascript:void(0)", :target => "_blank" %>
</div>
<div class="orig_right fl">
<%= link_to show_real_name_for_appeal ? score.student_works_scores_appeal.user.show_name : "匿名", show_real_name_for_appeal ? user_path(score.student_works_scores_appeal.user.show_name) : "javascript:void(0)", :title => show_real_name ? score.student_works_scores_appeal.user.show_name : "匿评用户", :class => "content-username" %>
<%= link_to show_real_name_for_appeal ? score.student_works_scores_appeal.user.show_real_name : "匿名", show_real_name_for_appeal ? user_path(score.student_works_scores_appeal.user.show_real_name) : "javascript:void(0)", :title => show_real_name ? score.student_works_scores_appeal.user.show_real_name : "匿评用户", :class => "content-username" %>
<span class="orig_area"><%=format_time score.student_works_scores_appeal.updated_at %></span>
<div class="orig_content "><%= score.student_works_scores_appeal.comment%></div>
</div>

View File

@ -4,7 +4,7 @@
<i class="fa fa-folder" aria-hidden="true"></i>
<span title="点击可下载" ><%= link_to_short_attachment attachment,:length=> 58, :download => true -%></span>
<span >(<%= number_to_human_size attachment.filesize %>)</span>
<span ><%= link_to attachment.author.try(:show_name), user_path(attachment.author) %></span>
<span ><%= link_to attachment.author.try(:show_real_name), user_path(attachment.author) %></span>
<span ><%= format_time(attachment.created_on) %></span>
</a>
</li>

View File

@ -3,9 +3,9 @@
<% @remain_user_ids.each do |user_id| %>
<% user = User.find user_id %>
<% if str == "" %>
<% str += user.show_name.to_s + "(" + user.login.to_s + ")" %>
<% str += user.show_real_name.to_s + "(" + user.login.to_s + ")" %>
<% else %>
<% str += "、" + user.show_name.to_s + "(" + user.login.to_s + ")" %>
<% str += "、" + user.show_real_name.to_s + "(" + user.login.to_s + ")" %>
<% end %>
<% end %>
var htmlvalue = '<div id="muban_popup_box" style="width:350px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+

View File

@ -97,7 +97,7 @@
<tbody id="group_member_choose_list">
<% @commit_users.each do |user| %>
<tr class="<%= user == User.current ? '' : 'choose_group_member_li' %>" id="group_member_choose_li_<%= user.id %>">
<td><span class="edu-txt-w140 task-hide pl10"><%= user.show_name %></span></td>
<td><span class="edu-txt-w140 task-hide pl10"><%= user.show_real_name %></span></td>
<td><span class="edu-txt-w140 task-hide"><%= user.user_extensions.try(:student_id) %></span></td>
<td><%= @course.members.where(:user_id => user.id).first.course_group.try(:name) %></td>
<input type="hidden" name="user_id[]" value="<%= user.id %>">

View File

@ -101,7 +101,7 @@
<table class="edu-pop-table" cellspacing="0" cellpadding="0">
<tbody id="group_member_choose_list">
<tr id="group_member_choose_li_<%= @user.id %>">
<td><span class="edu-txt-w140 task-hide pl10"><%= @user.show_name %></span></td>
<td><span class="edu-txt-w140 task-hide pl10"><%= @user.show_real_name %></span></td>
<td><span class="edu-txt-w140 task-hide"><%= @user.user_extensions.try(:student_id) %></span></td>
<td><%= @course.members.where(:user_id => @user.id).first.course_group.try(:name) %></td>
<input type="hidden" name="user_id[]" value="<%= @user.id %>">

View File

@ -5,7 +5,7 @@
<p class="mb10"><i class="fa fa-map-marker mr5 color-grey"></i><a href="<%= course_path(@course) %>"><%= @course.name %></a> > <a href="<%= homework_common_index_path(:course => @course.id) %>">作业列表</a> >
#<%= link_to (get_hw_index(@homework, @is_teacher) + 1), student_work_index_path(:homework => @homework.id) %> >
<% if @is_teacher || @work.user == User.current || (@homework.homework_detail_manual.comment_status != 3 && @homework.homework_detail_manual.comment_status != 4) %>
<%= link_to @work.user.try(:show_name), user_path(@work.user) %>
<%= link_to @work.user.try(:show_real_name), user_path(@work.user) %>
<% else %>
匿名
<% end %>
@ -65,7 +65,7 @@
<div class="edu-tab-con-box ">
<div class="clearfix">
<% @team_work.each do |team_work| %>
<a href="<%= user_path(team_work) %>" class="fl mr15 link-color-blue"><%= team_work.try(:show_name) %></a>
<a href="<%= user_path(team_work) %>" class="fl mr15 link-color-blue"><%= team_work.try(:show_real_name) %></a>
<% end %>
</div>
</div>

View File

@ -34,7 +34,7 @@
</span>
</li>
<li class=" hwork_name_ab ">
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02"%>
<%= link_to student_work.user.show_real_name,user_path(student_work.user),:title => student_work.user.show_real_name, :class => "c_blue02"%>
</li>
<li class="absence c_grey">
<%= student_work.all_count%>

View File

@ -37,7 +37,7 @@
<span class="<%= course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl mr20 mt3"></span>
<div class="cl"></div>
<div class="sy_cgrey">
<p class="mr15 hidden fl" style="max-width: 140px;">创建老师:<%=link_to course.teacher.show_name, user_path(course.teacher), :class => 'sy_cblue', :title => "#{course.teacher.show_name}" %></p>
<p class="mr15 hidden fl" style="max-width: 140px;">创建老师:<%=link_to course.teacher.show_real_name, user_path(course.teacher), :class => 'sy_cblue', :title => "#{course.teacher.show_real_name}" %></p>
<% if User.current.admin? || User.current.allowed_to?(:as_teacher,course) %>
<% homework_num = course.homework_commons.count %>
<% else %>

View File

@ -27,7 +27,7 @@
<i class="fa fa-lock fl color-grey font-16 mt8 ml5" ></i>
<div class="cl"></div>
<p class="color-grey font-12">
<%= link_to homework.user.show_name, user_path(homework.user), :class => 'link-name-dark fl' %>
<%= link_to homework.user.show_real_name, user_path(homework.user), :class => 'link-name-dark fl' %>
<span class=" ml30">创建于</span>
<span class=" ml5"><%= format_time homework.created_at %></span>
<span class="hw_cgrey ml30"><%= homework.homework_type_ch %>作业</span>
@ -47,7 +47,7 @@
<i class="fa fa-lock fl color-grey font-16 mt8 ml5" ></i>
<div class="cl"></div>
<p class="color-grey font-12">
<%= link_to homework.user.show_name, user_path(homework.user), :class => 'link-name-dark fl' %>
<%= link_to homework.show_real_name_name, user_path(homework.user), :class => 'link-name-dark fl' %>
<span class=" ml30">创建于</span>
<span class=" ml5"><%= format_time homework.created_at %></span>
<span class="hw_cgrey ml30"><%= homework.homework_type_ch %>作业</span>

View File

@ -21,9 +21,9 @@
<td><%= member.rank %></td>
<td>
<% if user == @syllabus.user %>
<div style="display: inline-block"><span class="sy_new_name fl"><%= user.show_name %></span><span class="sy_new_orange ml5 fl mt12">创建者</span></div>
<div style="display: inline-block"><span class="sy_new_name fl"><%= user.show_real_name %></span><span class="sy_new_orange ml5 fl mt12">创建者</span></div>
<% else %>
<span class="sy_new_long_name"><%= user.show_name %></span>
<span class="sy_new_long_name"><%= show_real_name_name %></span>
<% end %>
</td>
<td>

View File

@ -4,7 +4,7 @@
<%= link_to image_tag(url_to_avatar(user), :width => "100", :height => "100", :alt => "头像"), user_path(user), :target => '_blank', :class => "fl edu-class-user-img ml15 mr15" %>
<ul class="fl mr15">
<li class="clearfix">
<%= link_to user.show_name, user_path(user), :class => "font-16 link-name-dark task-hide fl" %>
<%= link_to user.show_real_name, user_path(user), :class => "font-16 link-name-dark task-hide fl" %>
<% if user == @syllabus.user %>
<span class="ml10 color-grey font-12 fl mt3" title="管理员"><i class="fa fa-user"></i></span>
<% end %>

View File

@ -29,7 +29,7 @@
<% end %>
<div class="cl"></div>
<p class="color-grey font-12">
<%= link_to resource.user.show_name, user_path(resource.user), :class => 'link-name-dark fl' %>
<%= link_to resource.user.show_real_name, user_path(resource.user), :class => 'link-name-dark fl' %>
<span class="ml30">上传于</span>
<span class="ml5"><%= format_time resource.created_at %></span>
<span class="ml30">大小:</span><span class="hw_cgrey"><%= (number_to_human_size(resource.filesize)).gsub("ytes", "") %></span>
@ -52,7 +52,7 @@
<% end %>
<div class="cl"></div>
<p class="color-grey font-12">
<%= link_to resource.user.show_name, user_path(resource.user), :class => 'link-name-dark fl' %>
<%= link_to resource.show_real_name_name, user_path(resource.user), :class => 'link-name-dark fl' %>
<span class="ml30">上传于</span>
<span class="ml5"><%= format_time resource.created_at %></span>
<span class="ml30">大小:</span><span class="hw_cgrey"><%= (number_to_human_size(resource.filesize)).gsub("ytes", "") %></span>

View File

@ -1,7 +1,7 @@
<div class="edu-class-container" style="flex: 1 0 auto;">
<p class="mb10">
<i class="fa fa-map-marker mr5 color-grey"></i>
<%= link_to User.current.show_name, user_path(User.current) %> > <%= link_to '课堂教学', courses_path %>
<%= link_to User.current.show_real_name, user_path(User.current) %> > <%= link_to '课堂教学', courses_path %>
</p>
<div class="edu-con-top ">
<p class="ml15 color-grey">编辑课程</p>

View File

@ -1,6 +1,6 @@
<div class="edu-class-container" >
<p class="mb10"><i class="fa fa-map-marker mr5 color-grey" ></i>
<%= link_to User.current.show_name, user_path(User.current) %> > <%= link_to '课堂教学', courses_path() %> > 我的课堂
<%= link_to User.current.show_real_name, user_path(User.current) %> > <%= link_to '课堂教学', courses_path() %> > 我的课堂
</p>
<div class="edu-con-bg01 edu-bg-shadow">
<div class="">

View File

@ -1,7 +1,7 @@
<div class="edu-class-container" style="flex: 1 0 auto;">
<p class="mb10">
<i class="fa fa-map-marker mr5 color-grey"></i>
<%= link_to User.current.show_name, user_path(User.current) %> > <%= link_to '课堂教学', courses_path %>
<%= link_to User.current.show_real_name, user_path(User.current) %> > <%= link_to '课堂教学', courses_path %>
</p>
<div class="edu-con-top ">
<p class="ml15 color-grey">新建课程</p>

View File

@ -1,8 +1,8 @@
$("#add_member_search_ul").empty();
<% if @users.count > 0 %>
<% @users.each do |user|%>
var link = "<li id='sy_mem_<%=user.id %>' class='clearfix'><div class='fl mt5 ml5 edu-class-pop-label '><div class='fl edu-name-dark task-hide' title='<%= user.show_name%>(<%= user.login %>)'>" +
"<span><%=user.show_name %></span><span class='color-grey'>(<%= user.login %>)</span></div>" +
var link = "<li id='sy_mem_<%=user.id %>' class='clearfix'><div class='fl mt5 ml5 edu-class-pop-label '><div class='fl edu-name-dark task-hide' title='<%= user.show_real_name%>(<%= user.login %>)'>" +
"<span><%=show_real_name_name %></span><span class='color-grey'>(<%= user.login %>)</span></div>" +
"<span class='fl color-grey edu-user-title ml5'><%= user.user_extensions.user_technical_title %></span>" +
"<span class='fl color-grey ml5 edu-school-name task-hide'><%= user.user_extensions.school ? user.user_extensions.school.name : "" %></span></div></li>";
$("#add_member_search_ul").append(link);
@ -12,9 +12,9 @@ $("#add_member_search_ul").empty();
$("#sy_add_member_notice").show();
} else{
$("#sy_add_member_notice").hide();
var li = "<li id='choose_sy_mem_<%=user.id %>' ondblclick='delete_sy_member(<%=user.id %>);' class='clearfix'><div class='fl mt5 ml5 edu-class-pop-label edu-color-grey'><div class='fl edu-name-dark task-hide' title='<%= user.show_name%>(<%= user.login %>)'>" +
var li = "<li id='choose_sy_mem_<%=user.id %>' ondblclick='delete_sy_member(<%=user.id %>);' class='clearfix'><div class='fl mt5 ml5 edu-class-pop-label edu-color-grey'><div class='fl edu-name-dark task-hide' title=show_real_name.show_name%>(<%= user.login %>)'>" +
"<input name='member_id[]' value='<%=user.id %>' type='hidden'/>" +
"<a href='<%= user_path(user) %>' target='_blank'><%=user.show_name %></a><span class='color-grey'>(<%= user.login %>)</span></div>" +
"<a href='<%= user_path(user) %>' target='_show_real_name=user.show_name %></a><span class='color-grey'>(<%= user.login %>)</span></div>" +
"<span class='fl color-grey edu-user-title ml5'><%= user.user_extensions.user_technical_title %></span>" +
"<span class='fl color-grey ml5 edu-school-name task-hide'><%= user.user_extensions.school ? user.user_extensions.school.name : "" %></span></div></li>";
$("#add_member_choose_ul").append(li);

View File

@ -6,7 +6,7 @@
<div class="edu-class-container" style="flex: 1 0 auto;">
<p class="mb10">
<i class="fa fa-map-marker mr5 color-grey" ></i>
<%= link_to User.current.show_name, user_path(User.current) %> > <%= link_to '课堂教学', courses_path %> > <%= @syllabus.title %></p>
<%= link_to User.current.show_real_name, user_path(User.current) %> > <%= link_to '课堂教学', courses_path %> > <%= @syllabus.title %></p>
<div class="edu-class-box pr">
<% if !(@is_syllabus_admin || @is_syllabus_member) %>
<div class="syllabus_tip_box fontGrey2" style="left:-190px; top:140px;">

View File

@ -8,7 +8,7 @@
});
</script>
<div class="<%= type == 'TrainingTask' ? 'new_orig_right fl' : 'orig_right fl' %>" onmouseout="$(this).find('.reply-right').hide();" onmouseover="$(this).find('.reply-right').show();">
<%= link_to comment.creator_user.show_name, user_path(comment.creator_user), :class => "content-username" %>
<%= link_to comment.creator_user.show_real_name, user_path(comment.creator_user), :class => "content-username" %>
<span class="orig_area"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
<div class="orig_content" id="reply_content_<%= comment.id %>">
<% if comment.class == Journal %>

View File

@ -6,10 +6,10 @@
</div>
<div class="homepagePostDes">
<div class="homepagePostTo break_word">
<% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% if activity.try(:author).show_real_name == ' ' %>
<%= link_to activity.try(:author).show_real_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<%= link_to activity.try(:author).show_real_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %>
TO
<%= link_to "班级资源", course_files_path(activity.course), :class => "newsBlue ml15" %>

View File

@ -6,10 +6,10 @@
</div>
<div class="homepagePostDes">
<div class="homepagePostTo break_word">
<% if activity.try(:teacher).try(:realname) == ' ' %>
<% if activity.try(:teacher).show_real_name == ' ' %>
<%= link_to activity.try(:teacher), user_path(activity.teacher), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:teacher).try(:realname), user_path(activity.teacher), :class => "newsBlue mr15" %>
<%= link_to activity.try(:teacher).show_real_name, user_path(activity.teacher), :class => "newsBlue mr15" %>
<% end %>
TO
<% str = defined?(is_course) && is_course == 1 ? "班级" : "#{activity.name.to_s} | 班级" %>

View File

@ -7,7 +7,7 @@
</div>
<div class="homepagePostDes">
<div class="homepagePostTo break_word">
<%= link_to activity.user.show_name, user_path(activity.user,:host=>Setting.host_user), :class => "newsBlue mr15" %>
<%= link_to activity.user.show_real_name, user_path(activity.user,:host=>Setting.host_user), :class => "newsBlue mr15" %>
TO <!--+"(课程名称)" -->
<% if hw_status == 3 || hw_status == 2 %>
<%= link_to "班级作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>

View File

@ -23,7 +23,7 @@
<% if activity.student_works.has_committed.count != 0 %>
<% sw = activity.student_works.has_committed.reorder("commit_time desc").first %>
<div class="mt10 homepagePostDeadline">
#&nbsp;<%=time_from_now sw.commit_time %><%= link_to sw.user.show_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
#&nbsp;<%=time_from_now sw.commit_time %><%= link_to sw.user.show_real_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
</div>
<div class="cl"></div>
<% sw_id = "("+activity.student_works.map{|sw| sw.id}.join(",")+")" %>
@ -33,7 +33,7 @@
<% last_score = student_work_scores.first %>
<div class="mt10">
<p class="fontGrey2">
#&nbsp;<%=time_from_now last_score.created_at %><%= 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"%>评阅了作品,优秀排行:
#&nbsp;<%=time_from_now last_score.created_at %><%= link_to last_score.reviewer_role == 3 && !is_teacher ? '学生匿名' : last_score.user.show_real_name, last_score.reviewer_role == 3 && !is_teacher ? "javascript:void(0)" : user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品,优秀排行:
</p>
</div>
<% end %>
@ -45,12 +45,12 @@
<% if User.current.member_of_course?(activity.course) || User.current.admin? || activity.is_open == 1 %>
<%= link_to image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40"), student_work_index_url_in_org(activity.id, 2, '', sw.id), :alt => "学生头像" %>
<p class="w100 hidden">
<%= link_to sw.user.show_name,student_work_index_url_in_org(activity.id, 2, '', sw.id)%>
<%= link_to sw.user.show_real_name,student_work_index_url_in_org(activity.id, 2, '', sw.id)%>
</p>
<% else %>
<%= image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40", :title => '该作业的作品暂未公开') %>
<p class="w100 hidden">
<a href="javascript:void(0);" title="该作业的作品暂未公开"><%=sw.user.show_name %></a>
<a href="javascript:void(0);" title="该作业的作品暂未公开"><%=sw.user.show_real_name %></a>
</p>
<% end %>
</a>
@ -75,7 +75,7 @@
<% first_pro = Project.find first_pro_act.project_id %>
<% commit_time = first_pro.project_score.commit_time %>
<%# one_forge_time=ForgeActivity.where("project_id=?",first_pro.id).last.updated_at if ForgeActivity.where("project_id=?",first_pro.id).last %>
#&nbsp;<%=time_from_now !commit_time.nil? && format_time(commit_time) > format_time(first_pro_act.updated_at) ? commit_time : first_pro_act.updated_at %><%= link_to User.find(first_pro.user_id).show_name, user_activities_path(first_pro.user_id), :class => "newsBlue ml5 mr5"%>更新了项目
#&nbsp;<%=time_from_now !commit_time.nil? && format_time(commit_time) > format_time(first_pro_act.updated_at) ? commit_time : first_pro_act.updated_at %><%= link_to User.find(first_pro.user_id).show_real_name, user_activities_path(first_pro.user_id), :class => "newsBlue ml5 mr5"%>更新了项目
</div>
<div class="cl"></div>
</div>

View File

@ -1,5 +1,5 @@
<div class="homepagePostReplyPublisher">
<%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user), :class => "newsBlue mr10 f14" %>
<%= link_to comment.creator_user.show_real_name, user_url_in_org(comment.creator_user), :class => "newsBlue mr10 f14" %>
<%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %>
</div>
<% if !comment.parent.nil? %>

View File

@ -0,0 +1,5 @@
class AddShowRealnameToUsers < ActiveRecord::Migration
def change
add_column :users, :show_realname, :boolean, :default => 1
end
end