summaryrefslogtreecommitdiff
path: root/templates/tree.html
blob: 01969ab28c7a86abec79634ff790f75f15ad335d (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
{% extends "base.html" %}
{% block js %}
<script type="text/javascript">
$(function() {
    {% block widgets %}{% endblock %}
   	$('#jstree').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,
	   		'themeroller': {
	   			'item': 'ui-state-none',
	   			'opened': 'ui-icon-circlesmall-minus',
	   			'closed': 'ui-icon-circlesmall-plus'
	   		},
	   		'plugins': ['json_data','themeroller']
	   	});
	//$('#jstree').removeClass('ui-widget-content');
	//$('#tree').addClass('ui-widget ui-corner-all ui-widget-content');
	$('#jstree').addClass('ui-corner-all');
	$('#sidemenu').menu();
	$('.tabs').tabs();
});
</script>
{% endblock %}
{% block main %}

<ul class="ilist" style="margin-bottom: 10px;">
	<li id="left">
		<ul id="sidemenu">
			{% if user.is_authenticated %}
			<li><a class="gravatar" href="#" title="{{profile.email}}"></a></li>
			<li><a href="/user/home"><span class="ui-icon ui-icon-home"></span>{{profile.display_name}}</a></li>
			{% endif %}
			<li style="border-top: 1px solid black; width: 100%; margin-top: 5px;">&nbsp;</li>
			{% if name %}
			<li><a href="/name/{{name.id}}/add"><span class="ui-icon ui-icon-newwin"></span>Create New Group</a></li>
			{% else %}
			<li><a href="/name/{{profile.home.id}}/add"><span class="ui-icon ui-icon-newwin"></span>Create New Group</a></li>
			{% endif %}
		</ul>
		<div class="tabs">
			<ul>
				<li><a href="#mygroups">My Groups</a></li>
				<li><a href="#jstree">All Groups</a></li>
			</ul>
			<div id="jstree"></div>
			<div id="mygroups">My groups</div>
		</div>
	</li>
	<li id="main">
		<div id="headline">
			{% block headline %}<a style="text-decoration: none" href="{% if name %}{{name.url}}{% else %}/user/home{% endif %}">{% if name %}{{name.shortname}}{% else %}Dashboard{% endif %}</a>{% endblock %}
		</div>
		<div>
	    	{% block content %}{% endblock %}
	    </div>
	</li>
</ul>
{% endblock %}