summaryrefslogtreecommitdiff
path: root/templates/tree.html
blob: d1bf05dd3a2114a3f133f3a3e9c1cecc6485a9f2 (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
{% extends "base.html" %}
{% block js %}
<script type="text/javascript">
$(function() {
    {% block widgets %}{% endblock %}
{% if name %}
   	$('#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']
   	});
{% endif %}
});
</script>
{% endblock %}
{% block headline %}<a style="text-decoration: none" href="{% if name %}/name/id/{{name.id}}{% else %}/{% endif %}">{% if name %}{{name.shortname}}{% else %}{{profile.display_name}}{% endif %}</a>{% endblock %}
{% block title %}COIP{% if name %} - {{name.shortname}}{% endif %}{% endblock %}
{% block main %}
{% if name %}
<div style="float: left; width: 30%;">
	{% if name and render.up %}
	{% if name.parent %}
	<a href="/name/id/{{name.parent.id}}">.. (up one level)</a>
	{% else %}
	<a href="/name">.. (up one level)</a>
	{% endif %}
	{% endif %}
	<div style="height: 100%;" id="tree"></div>
</div>
{% endif %}
<div style="float: right; width: 65%; padding-left: 10px;">
{% block content %}{% endblock %}
</div>
{% endblock %}