{% load auth_extras %}
<h1>Compose Template</h1>
<p>
Please click on an element of the tree to start composing the template. A menu will appear and you will be able to
interact with that element.
</p>

<div class="btn-group pull-right">
	<a class="btn btn-default" href="{% url 'core_composer_download_xsd' %}"><i class="fa fa-download"></i> Download </a>
    {% if user|has_perm:'core_composer_app.save_template' %}
	<a class="btn btn-default save-template"><i class="fa fa-floppy-o"></i> Save as Template </a>
    {% endif %}
    {% if user|has_perm:'core_composer_app.save_type' %}
	<a class="btn btn-default save-type"><i class="fa fa-floppy-o"></i> Save as Type </a>
    {% endif %}
</div>
<div id="template_selection">
	<div class="clearer">&nbsp;</div>
	<div id="xsd_form">{{data.xsd_form|safe}}</div>
</div>

<div id="templateID" style="display: none">{{data.template_id}}</div>
