summaryrefslogtreecommitdiff
path: root/templates/apps/name/name.html
blob: 6ef3e9129155369d9fce265b22e6b0eeae576da8 (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
{% extends "base.html" %}
{% block js %}
<script type="text/javascript">
$(function() {
   	$("#members").accordion({
   		header: 'h3'
   	});
   	$('#tree').jstree({
   		'json_data': {
   			'ajax': {
   				'url': function(n) {
   					if (n == -1) {
   						return {% if name %}"/rtree/"+{{name.id}}+".json"{% else %}"/rtree.json"{% endif %};
   					} else {
   						return "/ctree/"+n.attr('id')+".json";
   					}
   				}
   			},
   			"progressive_render"  : true,
   			'animation': 0,
   		},
   		'plugins': ['themeroller','json_data']
   	});
});
</script>
{% endblock %}
{% block headline %}{% if name %}{{name.shortname}}{% else %}(){% endif %}{% endblock %}
{% block title %}COIP{% if name %} - {{name.shortname}}{% endif %}{% endblock %}
{% block main %}
<div style="float: left; width: 30%;">
	{% if name and name.parent %}
	<a href="/name/id/{{name.parent.id}}">.. (up one level)</a>
	{% endif %}
	<div style="height: 100%;" id="tree"></div>
</div>
<div style="float: right; width: 60%; padding-left: 20px;">
{% if name %}
	<div class="ui-widget-content ui-corner-all infopanel">
		<div class="navlist">
		   <ul>
		     {% if edit %}
			 <li style="float: right;"><a class="tip" title="Modify this name" href="/name/edit/id/{{name.id}}"><span class="ui-icon ui-icon-wrench"></span></a>
			 {% endif %}
			 {% if delete %}
			 <li style="float: right;"><a class="tip" title="Permanently remove this name" href="/name/delete/id/{{name.id}}"><span class="ui-icon ui-icon-trash"></span></a>
			 {% endif %}
			 {% if insert %}
			 <li style="float: right;"><a class="tip" title="Create new subordinate name" href="/name/add/id/{{name.id}}"><span class="ui-icon ui-icon-plusthick"></span></a>
			 {% endif %}
		   </ul>
		</div>
		<div class="clear"/>
		<h3>{{name}}</h3>
		<p>{{name.description}}</p>
	</div>
	{% endif %}
	{% if memberships %}
	<div id="members">
		{% for m in memberships.all %}
		<div id="m{{m.id}}" class="{{m.status}}">
		   <h3 style="padding-left: 20px;">{{m.user}}</h3>
		   <div>
		   	  {{m.user}} has been a member of {{m.name.shortname}} since {{m.timecreated}}<br/>
		   </div>
		</div>
		{% endfor %}
	</div>
{% endif %}
</div>
{% endblock %}