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;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
li.noparent:before,
|
||||||
|
ul.noparent:before {
|
||||||
|
border-top: 0 !important;
|
||||||
|
border-left: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
ul.user_tree {
|
ul.user_tree {
|
||||||
color: #888;
|
color: #888;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,21 +3,23 @@
|
||||||
<strong><%= @title %> (<%= @user_count %>)</strong>
|
<strong><%= @title %> (<%= @user_count %>)</strong>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<% if @newest %>
|
||||||
<p>
|
<p>
|
||||||
<%= t('.newestusers') %>
|
<%= 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.is_new?? "new_user" : "") << "\">#{u.username}</a> " <<
|
||||||
"(#{u.karma})" }.join(", ") %>
|
"(#{u.karma})" }.join(", ") %>
|
||||||
</p>
|
</p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<ul class="tree user_tree">
|
<ul class="tree user_tree noparent">
|
||||||
|
|
||||||
<% subtree = @users_by_parent[nil] %>
|
<% subtree = @users_by_parent[nil] %>
|
||||||
<% ancestors = [] %>
|
<% ancestors = [] %>
|
||||||
|
|
||||||
<% while subtree %>
|
<% while subtree %>
|
||||||
<% if (user = subtree.pop) %>
|
<% if (user = subtree.pop) %>
|
||||||
<li>
|
<li class="<%= user.invited_by_user_id ? "" : "noparent" %>">
|
||||||
<a href="/u/<%= user.username %>"
|
<a href="/u/<%= user.username %>"
|
||||||
<% if !user.is_active? %>
|
<% if !user.is_active? %>
|
||||||
class="inactive_user"
|
class="inactive_user"
|
||||||
|
|
Loading…
Reference in a new issue