Show subnode count in users page.
This commit is contained in:
parent
ddcdb8de8b
commit
d55f7dcdd9
2 changed files with 5 additions and 1 deletions
|
@ -103,6 +103,10 @@ class User:
|
|||
def __init__(self, user):
|
||||
self.uri = user
|
||||
self.url = '/user/' + self.uri
|
||||
self.subnodes = subnodes_by_user(user)
|
||||
|
||||
def size(self):
|
||||
return len(self.subnodes)
|
||||
|
||||
def path_to_uri(path):
|
||||
return path.replace(config.AGORA_PATH + '/', '')
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<div class="listing">
|
||||
<h1> Users </h1>
|
||||
{% for user in users %}
|
||||
<a href="{{user.url}}">{{user.uri}}</a><br />
|
||||
<a href="{{user.url}}">{{user.uri}}</a> ({{user.size()}})<br />
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue