{% extends base_template %}
{% block simpletickets %}
    <div class="container-fluid">
        {% if ST_SETT_MAIN_TASKBAR %}
            <div class="row">
                <div class="col-md-12">
                    <nav class="navbar navbar-default">
                        <div class="container-fluid">
                            <div class="navbar-header">
                                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                                    <span class="sr-only">Toggle navigation</span>
                                    <span class="icon-bar"></span>
                                    <span class="icon-bar"></span>
                                    <span class="icon-bar"></span>
                                </button>
                                <a class="navbar-brand" href="#">Ticket system</a>
                            </div>
                            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                                <ul class="nav navbar-nav">
                                    <button href="{% url 'ticketList' %}" type="button" class="btn btn-info navbar-btn">Tickets</button>
                                    <button href="{% url 'newTicket' %}" type="button" class="btn btn-success navbar-btn">New ticket</button>
                                </ul>
                            </div>
                        </div>{# div .container-fluid #}
                    </nav>{# nav .navbar #}
                </div>
            </div>{# div .rov #}
        {% endif %}
        <div class="row">
            <div class="col-md-12">
                {% block tickets %}
                {% endblock tickets %}
            </div>
        </div>{# div .rov #}
        <div class="row">
            {% if statistic_times %}
                <div class="col-xl-4 col-md-6 col-xs-12">
                    <div class="col-md-12">
                        <div class="panel panel-primary">
                            <div class="panel-heading">
                                <h3 class="panel-title">Resolution times</h3>
                            </div>
                            <div class="panel-body">
                                <p>Fastest: {{ fastest }}</p>
                                <p>Media: {{ media }}</p>
                            </div>
                        </div>
                    </div>
                </div>{# div .col-xl-4 col-md-6 col-xs-12 #}
            {% endif %}
            {% if stt_numb %}
                <div class="col-xl-4 col-md-6 col-xs-12">
                    <div class="col-md-12">
                        <div class="panel panel-primary">
                            <div class="panel-heading">
                                <h3 class="panel-title">Tickets statistics</h3>
                            </div>{# div .panel-heading #}
                            <div class="panel-body">
                                <div class="row">
                                    <div class="col-xl-6 col-md-6 col-xs-12"><p>Solved vs pending tickets </p></div>
                                    <div class="col-xl-6 col-md-6 col-xs-12">
                                        <div class="progress">
                                            <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{{ porc_solved }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ porc_solved }}%">
                                            {{ porc_solved }}%
                                            </div>
                                            <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="{{ porc_pending }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ porc_pending }}%">
                                            {{ porc_pending }}%
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>{# div .panel-body #}
                        </div>
                    </div>
                </div>{# div .col-xl-4 col-md-6 col-xs-12 #}
            {% endif %}
        </div>{# div .row #}
    </div>
{% endblock simpletickets %}
