{% extends "gap_admin/base.html" %}
{% block title %}Админка Гэпа{% endblock %}
{% block content %}

<style>
    body {
        padding-top: 70px;
        padding-bottom: 70px;
    }
    .templates_list {
        width: 50%;
    }
    .fixed {
        position: fixed;
    }
    .textcenter {
        padding: 30px;
    }

.btn-file {
    position: relative;
    overflow: hidden;
}
.btn-file input[type=file] {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 100%;
    min-height: 100%;
    font-size: 100px;
    text-align: right;
    filter: alpha(opacity=0);
    opacity: 0;
    outline: none;
    background: white;
    cursor: inherit;
    display: block;
}
</style>

<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <p class="navbar-text">Админка Гэпа</p>
        </div>
        <ul class="nav navbar-nav navbar-right">
            <li>
                <a href="https://staff.yandex-team.ru">staff.yandex-team.ru</a>
            </li>
        </ul>
    </div>
</nav>

<div class="container">
    <div class="row">

        <div class="col-lg-6">
            <div class="panel panel-success">
                <div class="panel-heading">Статистика</div>
                <div class="panel-body">
                    <a href="{% url 'gap-admin:stats' %}" class="btn btn-primary btn-info">Общая</a>
                </div>
            </div>
            <div class="panel panel-success">
                <div class="panel-heading">Настройки</div>
                <div class="panel-body">
                    <a href="{% url 'gap-admin:workflow-files-settings' %}" class="btn btn-primary btn-info">Файлы для отсутствий</a>
                </div>
            </div>
            <div class="panel panel-success">
                <div class="panel-heading">Шаблоны</div>
                <div class="panel-body">
                    <a href="{% url 'gap-admin:list-templates' %}" class="btn btn-primary btn-info">Список</a>
                    <br>
                    <a href="{% url 'gap-admin:edit-email-template' %}" class="btn btn-primary btn-success">Добавить email</a>
                    <a href="{% url 'gap-admin:edit-pdf-template' %}" class="btn btn-primary btn-success">Добавить PDF</a>
                    <a href="{% url 'gap-admin:edit-st-issue-template' %}" class="btn btn-primary btn-success">Добавить ST issue</a>
                    <a href="{% url 'gap-admin:edit-st-issue-comment-template' %}" class="btn btn-primary btn-success">Добавить ST issue comment</a>
                    <br>
                    <form action="{% url 'gap-admin:import-templates' %}" method="post" target="hiddenframe" enctype="multipart/form-data" name="templates_file_form">
                        {% csrf_token %}
                        <a href="{% url 'gap-admin:export-templates' %}" class="btn btn-primary btn-info">Экспорт</a>
                        <span class="btn btn-primary btn-warning btn-file">Импорт <input type="file" id="templates_file" name="templates_file"  onChange="templates_file_form.submit();"></span>
                        <label><input type="checkbox" id="recreate" name="recreate" value="true"> при импорте сначала удалить всё</label>
                    </form>
                </div>
            </div>

        </div>

    </div>
</div>

{% endblock %}


