<a href="{% url 'core_composer_build_template' 'new' %}"
       class="btn btn-success pull-right" role="button">
    <i class="fa fa-play"></i> Start Template or Type from scratch
</a>

<h2>Select Template</h2>

<p>
    Start composing a new template or customize an existing template. It will automatically load the appropriate
    form and display it on the next page.
</p>

<div id="template_selection">
    <h3 class="text-center">Templates</h3>
    {% if data.global_templates or data.user_templates %}
        <table class="table fixed-table">
            <colgroup>
                <col class="col-width-75">
                <col class="col-width-25">
            </colgroup>
            {% include 'core_main_app/user/template/list_header.html' with object_type='Template' %}
            {% include 'core_composer_app/user/list/list.html' with object_list=data.global_templates owner='Global' object_type='Template' %}
            {% include 'core_composer_app/user/list/list.html' with object_list=data.user_templates owner=request.user object_type='Template' %}
        </table>
    {% else %}
        <p class="text-center">No template uploaded yet.</p>
    {% endif %}

    <h3 class="text-center">Types</h3>
    {% if data.global_types or data.user_types %}
        <table class="table fixed-table">
            <colgroup>
                <col class="col-width-75">
                <col class="col-width-25">
            </colgroup>
            {% include 'core_main_app/user/template/list_header.html' with object_type='Type' %}
            {% include 'core_composer_app/user/list/list.html' with object_list=data.global_types owner='Global' object_type='Type' %}
            {% include 'core_composer_app/user/list/list.html' with object_list=data.user_types owner=request.user object_type='Type' %}
        </table>
    {% else %}
        <p class="text-center">No type uploaded yet.</p>
    {% endif %}
</div>
