summaryrefslogtreecommitdiff
path: root/templates/apps/name/name.html
blob: 3142269e595c27e2270df4384ea38ef675ed9956 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{% extends "tree.html" %}
{% load datehumanize %}
{% load userdisplay %}
{% block widgets %}
    $("#memberships").accordion({
   		header: 'h3',
   		collapsible: true,
        active: false
   	});
   	$("#invitations").accordion({
   		header: 'h3',
   		collapsible: true,
        active: false
   	});
{% endblock %}
{% block tools %}
<div class="ui-widget ui-state-default ui-corner-all" style="padding: 4px; float: left; margin-left: 10px; margin-top: 6px; margin-bottom: 20px;">
<div class="navlist">
  <ul>
     {% if render.edit %}
	 <li style="float: right;"><a class="tip" title="Modify this name" href="/name/{{name.id}}/edit"><span class="ui-icon ui-icon-wrench"></span></a></li>
	 {% endif %}
	 {% if render.delete %}
	 <li style="float: right;"><a class="tip" title="Permanently remove this name" href="/name/{{name.id}}/delete"><span class="ui-icon ui-icon-trash"></span></a></li>
	 {% endif %}
	 {% if render.insert %}
	 <li style="float: right;"><a class="tip" title="Create a new name below this one" href="/name/{{name.id}}/add"><span class="ui-icon ui-icon-plusthick"></span></a></li>
	 {% endif %}
	 {% if render.invite %}
	 <li style="float: right;"><a class="tip" title="Invite user" href="/name/{{name.id}}/invite"><span class="ui-icon ui-icon-heart"></span></a></li>
	 {% endif %}
   </ul>
</div>
</div>
{% endblock %}
{% block content %}
    {% if name.description %}
    <div class="ui-widget">
	    <div class="ui-state-highlight ui-corner-all infopanel">
	       {% autoescape off %}
		   <p class="description">{{name.description|safe}}</p>
		   {% endautoescape %}
		</div>
	</div>
	{% endif %}
	<h3>Members</h3>
	<div id="memberships">
		{% for m in memberships.all %}
		{% if not m.name.hidden %}
		<div id="m{{m.id}}" class="{{m.status}}">
		   <h3 class="listheader">{{m.user|lastidentifier}}</h3>
		   <div>{{m.user|userdisplay}} ({{m.user|lastidentifier}}) became a member of {{name.shortname}} {{m.timecreated|datehumanize}}.</div>
		</div>
		{% endif %}
		{% empty %}
		<p>There are no members.</p>
		{% endfor %}
	</div>
	{% if invitations %}
	<h3>Pending invitations</h3>
	<div id="invitations">
		{% for i in invitations.all %}
		<div id="m{{m.id}}">
		   <h3 class="listheader">{{i.email}}</h3>
		   <div>
		      <div class="navlist" style="margin-top: -10px;">
		         <ul>
		            <li style="float: right;"><a class="tip" title="Cancel invitation" href="/invitation/{{i.id}}/cancel"><span class="ui-icon ui-icon-trash"></span></a></li>
		         </ul>
		      </div>
		      <div class="clear"></div>
		   	  <div>{{i.email}} was invited to {{i.name.shortname}} {{i.timecreated|datehumanize}} by {{i.inviter}}.</div>
		   </div>
		</div>
		{% empty %}
		<p>There are no pending invitations.{% if render.invite %}<a class="tip" title="Invite user" href="/name/{{name.id}}/invite">Invite someone!</a>{% endif %}</p>
		{% endfor %}
	</div>
	{% endif %}
{% endblock %}