{% extends 'base.html' %}
{% load buttons %}
{% load static %}
{% load helpers %}
{% load custom_links %}
{% load plugins %}

{% block title %}{{ template }}{% endblock %}

{% block header %}
    {% include 'config_officer/navi_panel.html' %}
    <div class="col-md-10">
        <div class="row noprint">
            <ol class="breadcrumb">
                <li><a href="{% url 'plugins:config_officer:template_list' %}">templates</a></li>
                <li>{{ template }}</li>
            </ol>
        </div>

        <div class="pull-right noprint">
            <a href="{% url 'plugins:config_officer:template_edit' pk=template.pk %}" class="btn btn-warning">
                <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit
            </a>   
            <a href="{% url 'plugins:config_officer:template_delete' pk=template.pk %}" class="btn btn-danger">
                <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete
            </a>                                      
        </div>
        <h1>{{ template.name }}</h1>    
    </div>
{% endblock %}

{% block content %}
    <div class="row">
        <div class="col-md-10">
            <div class="panel panel-default">
                <table class="table table-hover panel-body attr-table">
                    <tr>
                        <td>Name</td>
                        <td><span>{{ template.name|placeholder }}</span></td>
                    </tr>                   
                    <tr>
                        <td>Description</td>
                        <td><span>{{ template.description|placeholder }}</span></td>
                    </tr>     
                    <tr>
                        <td>
                            Configuration text<br/>
                            <small class="text-muted">Jinja2 variables syntax is supported</small>
                        </td>
                        <td>
                            <pre><code>{{ template.configuration|safe }}</code></pre>
                        </td>
                    </tr>              
                </table>                      
            </div>
        </div>
    </div> 
{% endblock %}

