diff options
author | Leif Johansson <leifj@sunet.se> | 2011-03-09 14:18:45 +0100 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2011-03-09 14:18:45 +0100 |
commit | bc3690c74042bd29f1d473e4a53085b3defb92ad (patch) | |
tree | d8bcc0f51e126f5293aee8e0942d6af19a09fbb5 /templates/apps | |
parent | a3f8c2ad50f999f2f71526090fff951c928636f3 (diff) |
dashboard improvements
Diffstat (limited to 'templates/apps')
-rw-r--r-- | templates/apps/userprofile/home.html | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/templates/apps/userprofile/home.html b/templates/apps/userprofile/home.html index 00feb0b..56154a7 100644 --- a/templates/apps/userprofile/home.html +++ b/templates/apps/userprofile/home.html @@ -1,5 +1,7 @@ {% extends "tree.html" %} {% load datehumanize %} +{% load userdisplay %} +{% load tagging_tags %} {% block widgets %} $("#gravatar").append($.gravatar($('#email').text())); $("#names").accordion({ @@ -14,26 +16,44 @@ }); {% endblock %} {% block content %} -<h3>Memberships</h3> -<div id="memberships"> - {% for m in memberships.all %} - <div id="m{{m.id}}" class="{{m.status}}"> - <h3 class="listheader">{{m.name.shortname}}</h3> - <div> - You became a member of <a href="/name/id/{{m.name.id}}">{{m.name.shortname}}</a> {{m.timecreated|datehumanize}} - </div> + {% if memberships %} + <h3>Memberships</h3> + <div id="memberships"> + {% for m in memberships.all %} + <div id="m{{m.id}}" class="{{m.status}}"> + <h3 class="listheader">{{m.name.shortname}}</h3> + <div> + <div> + You became a member of {{m.name.shortname}} {{m.timecreated|datehumanize}} + {% if m.tags %}<h4>Role{{m.tags|pluralize}}</h4> + <ul class="clist">{% for tag in m.tags %}<li>{{ tag|escape }}</li>{%endfor%}</ul>{%endif%} + </div> + <div class="rlist button"> + <ul> + {% if render.edit and m.user %} <!-- only allow roles for users right now --> + <li><a href="/tag/membership/{{m.id}}/modify">Modify Roles</a></li> + {% endif %} + {% if render.kick and m.user %} <!-- only allow removing members for users right now --> + <li><a href="/name/{{name.id}}/leave/{{m.user.username}}">{% if m.user == user %}Leave{% else %}Remove from{% endif %} Group</a></li> + {% endif %} + </ul> + </div> + <!-- div class="clear"></div--> + </div> + </div> + {% empty %} + <p>No members yet...</p> + {% endfor %} </div> - {% empty %} - <p>You are not a member of any groups yet...</p> - {% endfor %} -</div> + {% endif %} + <h3>Groups</h3> <div id="names"> {% for n,p in names %} <div id="n{{n.id}}"> <h3 class="listheader">{{n.shortname}}</h3> <div> - <a href="/name/id/{{n.id}}">{{n.shortname}}</a> + <a href="/name/id/{{n.id}}">{{n.shortname}}</a> was created by {{n.creator|userdisplay}} {{n.timecreated|datehumanize}}. </div> </div> {% empty %} |