summaryrefslogtreecommitdiff
path: root/templates/tree.html
blob: 9fab51b4caed225c64c7e0d2c9624a1d3b916c3b (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
{% 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
   		},
   		'themes': {
   			'theme': 'classic'
   		},
   		'animation': 0,
   		'plugins': ['themes','json_data']
   	});
});
</script>
{% endblock %}
{% block main %}
<ul class="leftright">
	<li class="leftright" style="width: 35%">
	   <div class="ui-helper-reset" id="tree">
	    	<ul class="ilist" style="padding-left: 0px;">
		        <li><b>{{ prefix_url }}</b></li>
				{% if name and render.up %}
				{% if name.parent %}
				<li><a class="tip" title="Up one level" href="{{name.parent.url}}"><span style="vertical-align: bottom;" class="ui-icon ui-icon-arrowthick-1-n"></span></a></li>
				{% else %}
				<li><a class="tip" title="Up one level" href="/name"><span style="vertical-align: bottom;" class="ui-icon ui-icon-arrowthickstop-1-n"></span></a></li>
				{% endif %}
				{% endif %}
			</ul>
			<div class="ui-helper-reset" id="jstree"></div>
	   </div>
	   <!-- div id="related">
	   		{% if name and name.links %}
	   		<h3 style="float: left;">Related resources</h3>
	   		{% if render.edit %}
	   		<a style="float: left; margin-top: 11px;" class="tip" title="Add Link" href="/name/{{name.id}}/addlink"><span class="ui-icon ui-icon-plus"></span></a>
	   		{% endif %}
	   		<div class="clear"></div>
	   		<ul class="links"">
	   		{% for link in name.links.all %}
	   		   <li>
	   		      <a class="tip" title="{{link.text}}" href="{{link.url}}">{{link.text}}</a>
	   		      <a class="tip" title="Remove link" href="/link/{{link.id}}/remove"><span class="ui-icon ui-icon-close" style="float: right; clear: both;"></span></a>
	   		   </li>
	   		{% endfor %}
	   		</ul>
	   		<div class="clear"></div>
	   		{% endif %}
	   </div -->
	</li>
	<li class="leftright" style="margin-bottom: 80px; margin-left: 10px; width: 59%;">
		<div id="headline">
			<a style="text-decoration: none" href="{% if name %}{{name.url}}{% else %}/user/home{% endif %}">{% if name %}{{name.shortname}}{% else %}Dashboard{% endif %}</a>
		</div>
		<div>
	    	{% block content %}{% endblock %}
	    </div>
	</li>
</ul>
{% endblock %}