user tree: users with no parents don't descend from anything
This commit is contained in:
parent
3d54a8ea83
commit
5a3ac372b8
|
@ -912,6 +912,12 @@ div.comment_form_container textarea {
|
|||
height: auto;
|
||||
}
|
||||
|
||||
li.noparent:before,
|
||||
ul.noparent:before {
|
||||
border-top: 0 !important;
|
||||
border-left: 0 !important;
|
||||
}
|
||||
|
||||
ul.user_tree {
|
||||
color: #888;
|
||||
}
|
||||
|
|
|
@ -3,21 +3,23 @@
|
|||
<strong><%= @title %> (<%= @user_count %>)</strong>
|
||||
</p>
|
||||
|
||||
<% if @newest %>
|
||||
<p>
|
||||
<%= t('.newestusers') %>
|
||||
<%= raw @newest.map{|u| "<a href=\"/u/#{u.username}\" class=\"" <<
|
||||
<%= raw @newest.map{|u| "<a href=\"##{u.username}\" class=\"" <<
|
||||
(u.is_new?? "new_user" : "") << "\">#{u.username}</a> " <<
|
||||
"(#{u.karma})" }.join(", ") %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<ul class="tree user_tree">
|
||||
<ul class="tree user_tree noparent">
|
||||
|
||||
<% subtree = @users_by_parent[nil] %>
|
||||
<% ancestors = [] %>
|
||||
|
||||
<% while subtree %>
|
||||
<% if (user = subtree.pop) %>
|
||||
<li>
|
||||
<li class="<%= user.invited_by_user_id ? "" : "noparent" %>">
|
||||
<a href="/u/<%= user.username %>"
|
||||
<% if !user.is_active? %>
|
||||
class="inactive_user"
|
||||
|
|
Loading…
Reference in a new issue