{% extends "network/base.html" %}
{% load i18n %}
{% load l10n %}
{% load staticfiles %}

{% block content %}

<div class="page-header">
    <h1>{% trans "Latest modifications" %}</h1>
</div>

<table class="table table-striped table-bordered">
    <tr>
        <th>{% trans "Action" %}</th>
        <th>{% trans "Model" %}</th>
        <th>{% trans "Name" %}</th>
        <th>{% trans "Time elapsed" %}</th>
    </tr>
    {% for l in latest %}
    <tr>
        <td>{% if l.modified_at == l.created_at %}{% trans "created" %}{% else %}{% trans "modified" %}{% endif %}</td>
        <td>{{ l.class_name }}</td>
        <td><a href="{{ l.link }}">{{ l.name }}</a></td>
        <td>{{ l.modified_at|timesince }}</td>
    </tr>
    {% endfor %}
</table>


<div class="page-header">
    <h1>{% trans "Latest blacklists" %}</h1>
</div>

<table class="table table-striped table-bordered">
    <tr>
        <th>{% trans "IP" %}</th>
        <th>{% trans "Reason" %}</th>
        <th>{% trans "Type" %}</th>
        <th>{% trans "Time elapsed" %}</th>
    </tr>
    {% for b in latest_blacklists %}
    <tr>
        <td><a href="{{ b.get_absolute_url }}">{{ b.ipv4 }}</a></td>
        <td>{{ b.reason }}</td>
        <td>{{ b.type }}</td>
        <td>{{ b.modified_at|timesince }}</td>
    </tr>
    {% endfor %}
</table>

<div class="page-header">
    <h1>{% trans "Dashboard" %}</h1>
</div>

<div class="row">
    <div class="col-sm-3">
        <div class="thumbnail">
            <p class="lead"><a href="{% url network.host_list %}">Hosts</a> are machines on the network.</p>
            <p>Proin mattis enim risus. Ut eu enim quis auctor. Duis lobortis sollicitudin lacus, scelerisque dictum arcu aliquam nec.</p>  
            <p class="text-right"><a href="#" class="btn btn-default">List</a> <a href="#" class="btn btn-success">Create</a></p>
        </div>
    </div>

    <div class="col-sm-3">
        <div class="thumbnail">
            <p class="lead"><a href="{% url network.host_list %}">Hosts</a> are machines on the network.</p>
            <p>Proin mattis enim risus. Ut eu enim quis auctor. Duis lobortis sollicitudin lacus, scelerisque dictum arcu aliquam nec.</p>  
            <p class="text-right"><a href="#" class="btn btn-default">List</a> <a href="#" class="btn btn-success">Create</a></p>
        </div>
    </div>

    <div class="col-sm-3">
        <div class="thumbnail">
            <p class="lead"><a href="{% url network.host_list %}">Hosts</a> are machines on the network.</p>
            <p>Proin mattis enim risus. Ut eu enim quis auctor. Duis lobortis sollicitudin lacus, scelerisque dictum arcu aliquam nec.</p>  
            <p class="text-right"><a href="#" class="btn btn-default">List</a> <a href="#" class="btn btn-success">Create</a></p>
        </div>
    </div>
    
    <div class="col-sm-3">
        <div class="thumbnail">
            <p class="lead"><a href="{% url network.host_list %}">Hosts</a> are machines on the network.</p>
            <p>Proin mattis enim risus. Ut eu enim quis auctor. Duis lobortis sollicitudin lacus, scelerisque dictum arcu aliquam nec.</p>  
            <p class="text-right"><a href="#" class="btn btn-default">List</a> <a href="#" class="btn btn-success">Create</a></p>
        </div>
    </div>
 
    <div class="col-sm-3">
        <div class="thumbnail">
            <p class="lead"><a href="{% url network.host_list %}">Hosts</a> are machines on the network.</p>
            <p>Proin mattis enim risus. Ut eu enim quis auctor. Duis lobortis sollicitudin lacus, scelerisque dictum arcu aliquam nec.</p>  
            <p class="text-right"><a href="#" class="btn btn-default">List</a> <a href="#" class="btn btn-success">Create</a></p>
        </div>
    </div>

    <div class="col-sm-3">
        <div class="thumbnail">
            <p class="lead"><a href="{% url network.host_list %}">Hosts</a> are machines on the network.</p>
            <p>Proin mattis enim risus. Ut eu enim quis auctor. Duis lobortis sollicitudin lacus, scelerisque dictum arcu aliquam nec.</p>  
            <p class="text-right"><a href="#" class="btn btn-default">List</a> <a href="#" class="btn btn-success">Create</a></p>
        </div>
    </div>

    <div class="col-sm-3">
        <div class="thumbnail">
            <p class="lead"><a href="{% url network.host_list %}">Hosts</a> are machines on the network.</p>
            <p>Proin mattis enim risus. Ut eu enim quis auctor. Duis lobortis sollicitudin lacus, scelerisque dictum arcu aliquam nec.</p>  
            <p class="text-right"><a href="#" class="btn btn-default">List</a> <a href="#" class="btn btn-success">Create</a></p>
        </div>
    </div>
    
    <div class="col-sm-3">
        <div class="thumbnail">
            <p class="lead"><a href="{% url network.host_list %}">Hosts</a> are machines on the network.</p>
            <p>Proin mattis enim risus. Ut eu enim quis auctor. Duis lobortis sollicitudin lacus, scelerisque dictum arcu aliquam nec.</p>  
            <p class="text-right"><a href="#" class="btn btn-default">List</a> <a href="#" class="btn btn-success">Create</a></p>
        </div>
    </div>

</div> 
{% endblock %}
