课程成员配置界面,显示学生真实姓名,无真实姓名的蔡先生login
This commit is contained in:
parent
4b83296a97
commit
6abdc4c7e1
|
@ -132,9 +132,10 @@ module ApplicationHelper
|
||||||
def link_to_user_header user,canShowRealName=false,options={}
|
def link_to_user_header user,canShowRealName=false,options={}
|
||||||
if user.is_a?(User)
|
if user.is_a?(User)
|
||||||
if canShowRealName
|
if canShowRealName
|
||||||
name = h(user.realname(options[:format]))
|
name = user.show_name
|
||||||
|
name = user.login if name == ""
|
||||||
else
|
else
|
||||||
name = h(user.name(options[:format]))
|
name = user.login
|
||||||
end
|
end
|
||||||
link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => options[:class]
|
link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => options[:class]
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<% @members.each do |member| %>
|
<% @members.each do |member| %>
|
||||||
<li >
|
<li >
|
||||||
<%= link_to_user_header member.principal,false,:class => "w150 c_orange fl" %>
|
<%= link_to_user_header member.principal,true,:class => "w150 c_orange fl" %>
|
||||||
<span class="w150 fl">
|
<span class="w150 fl">
|
||||||
<%= h member.roles.sort.collect(&:to_s).join(', ') %>
|
<%= h member.roles.sort.collect(&:to_s).join(', ') %>
|
||||||
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
|
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
|
||||||
|
|
|
@ -243,7 +243,7 @@ a:hover.tijiao{ background:#0f99a9;}
|
||||||
.members_left ul li a{ float:left; text-align:center;}
|
.members_left ul li a{ float:left; text-align:center;}
|
||||||
.members_left ul li span{ float:left; text-align:center; color:#484747;}
|
.members_left ul li span{ float:left; text-align:center; color:#484747;}
|
||||||
|
|
||||||
.w150{ text-align:center; width:150px;}
|
.w150{ text-align:center; width:150px;min-height: 10px;}
|
||||||
.f_b{ font-weight: bold;}
|
.f_b{ font-weight: bold;}
|
||||||
.members_right label{ margin-left:15px;}
|
.members_right label{ margin-left:15px;}
|
||||||
.N_search{ height:20px; border:1px solid #999;}
|
.N_search{ height:20px; border:1px solid #999;}
|
||||||
|
|
Loading…
Reference in New Issue