{% extends 'generic/object_detail.html' %}
{% load buttons %}
{% load plugins %}
{% load helpers %}

{% block buttons %}
        {% plugin_buttons object %}
        {% if perms.extras.add_configcontextschema %}
            {% clone_button object %}
        {% endif %}
        {% if perms.extras.change_configcontextschema %}
            {% edit_button object key="pk" %}
        {% endif %}
        {% if perms.extras.delete_configcontextschema %}
            {% delete_button object key="pk" %}
        {% endif %}
{% endblock buttons %}

{% block extra_nav_tabs %}
    <li role="presentation"{% if active_tab == 'validation' %} class="active"{% endif %}>
        <a href="{% url 'extras:configcontextschema_object_validation' pk=object.pk %}">Validation</a>
    </li>
{% endblock extra_nav_tabs %}

{% block content_left_page %}
            <div class="panel panel-default">
                <div class="panel-heading">
                    <strong>Config Context Schema</strong>
                </div>
                <table class="table table-hover panel-body attr-table">
                    <tr>
                        <td>Name</td>
                        <td>
                            {{ object.name }}
                        </td>
                    </tr>
                    {% if object.owner %}
                        <tr>
                            <td>Owner</td>
                            <td>{{ object.owner|hyperlinked_object }}</td>
                        </tr>
                    {% endif %}
                    <tr>
                        <td>Description</td>
                        <td>{{ object.description|placeholder }}</td>
                    </tr>
                </table>
            </div>
{% endblock content_left_page %}

{% block content_right_page %}
            <div class="panel panel-default">
                <div class="panel-heading">
                    <strong>Data Schema</strong>
                    {% include 'extras/inc/json_format.html' %}
                </div>
                <div class="panel-body">
                    {% include 'extras/inc/json_data.html' with data=object.data_schema format=format %}
                </div>
            </div>
{% endblock content_right_page %}
