diff options
Diffstat (limited to 'templates/tree.html')
-rw-r--r-- | templates/tree.html | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/templates/tree.html b/templates/tree.html new file mode 100644 index 0000000..d1bf05d --- /dev/null +++ b/templates/tree.html @@ -0,0 +1,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 %}
\ No newline at end of file |