{% extends 'base.html' %}
{% load i18n %}

{% block title %}{% trans 'Devices' %}{% endblock %}

{% block breadcrumb %}
    <ol class="breadcrumb">
        <li><span class="glyphicon glyphicon-home"></span></li>
        <li class="active">{% trans 'Groups' %}</li>
    </ol>
{% endblock %}

{% block page-header %}
    {% trans 'Select group' %}
{% endblock %}

{% block main %}
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">{% trans 'Group title' %}</h3>
        </div>
        <table class="table table-striped table-bordered">
            <tbody>
            {% for gr in groups %}
                <tr>
                    <td><a href="{% url 'devapp:devs' gr.id %}">{{ gr.title }}</a></td>
                </tr>
            {% empty %}
                <tr>
                    <td><a href="#">{% trans 'Groups was not found' %}</a></td>
                </tr>
            {% endfor %}
            </tbody>
            <tfoot>
            <tr>
                <td class="btn-group btn-group-sm">
                    <a href="{% url 'devapp:devices_null_group' %}" class="btn btn-primary">
                        <span class="glyphicon glyphicon-list-alt"></span> {% trans 'Devices without group' %}
                    </a>
                    <a href="{% url 'devapp:nagios_objects_conf' %}" class="btn btn-default">
                        <span class="glyphicon glyphicon-export"></span> {% trans 'Export to nagios objects' %}
                    </a>
                </td>
            </tr>
            </tfoot>
        </table>
    </div>
{% endblock %}
