个人主页的“访客”先隐藏,仅对超级管理员开放
This commit is contained in:
parent
5e643e7316
commit
987a8da994
|
@ -260,16 +260,18 @@ $(".subNav").click(function(){
|
|||
<%= render :partial => 'layouts/user_watch_list', :locals => {:user => @user} %>
|
||||
<%= render :partial => 'layouts/user_fans_list', :locals => {:user => @user} %>
|
||||
<% visitor_count,visitor_list = get_visitor_users(@user) %>
|
||||
<div class="leftbox mt10" style="display:<%= visitor_count==0 ? 'none' : 'block' %>">
|
||||
<h4 class="fl">访客</h4><a href="<%=url_for(:controller => 'users', :action => 'user_visitorlist', :id=>@user.id)%>" data-count="<%= visitor_count %>" style="display:<%= visitor_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a>
|
||||
<div class="cl"></div>
|
||||
<div class="mt5">
|
||||
<% for visitor in visitor_list %>
|
||||
<%= link_to image_tag(url_to_avatar(visitor.user), :style => "width:38px;height:38px;"), user_path(visitor.user), :class => "pic_members", :title => "#{visitor.user.name}" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<% if(User.current.admin?) %>
|
||||
<div class="leftbox mt10" style="display:<%= visitor_count==0 ? 'none' : 'block' %>">
|
||||
<h4 class="fl">访客</h4><a href="<%=url_for(:controller => 'users', :action => 'user_visitorlist', :id=>@user.id)%>" data-count="<%= visitor_count %>" style="display:<%= visitor_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a>
|
||||
<div class="cl"></div>
|
||||
<div class="mt5">
|
||||
<% for visitor in visitor_list %>
|
||||
<%= link_to image_tag(url_to_avatar(visitor.user), :style => "width:38px;height:38px;"), user_path(visitor.user), :class => "pic_members", :title => "#{visitor.user.name}" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div><!--LSide end-->
|
||||
|
||||
|
|
Loading…
Reference in New Issue