host-list.html 1.53 KB
Newer Older
1 2 3 4 5 6
{% extends "network/base.html" %}
{% load render_table from django_tables2 %}
{% load i18n %}
{% load l10n %}
{% load staticfiles %}

Kálmán Viktor committed
7 8
{% block title-page %}{% trans "Hosts" %}{% endblock %}

9 10
{% block content %}
<div class="page-header">
11 12 13 14 15 16 17 18
  <a href="{% url "network.host_create" %}" class="btn btn-success pull-right">
    <i class="fa fa-plus-circle"></i>
    {% trans "Create a new host" %}
  </a>
  <h1>
    {% trans "Hosts" %}
    <small>{% trans "list of all hosts" %}</small>
  </h1>
19 20
</div>

21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
<div class="row">
  <div class="col-md-9">
    <ul class="nav nav-pills" style="margin: 5px 0 20px 0;">
      <li class="disabled"><a href="#">{% trans "Filter by vlans" %}</a></li>
      <li {% if not request.GET.vlan %} class="active"{% endif %}>
        <a href="{{ request.path }}">{% trans "ALL" %}</a>
      </li>
      {% for vlan in vlans %}
        <li{% if request.GET.vlan|add:"0" == vlan.id %} class="active"{% endif %}>
          <a href="?vlan={{ vlan.id }}">{{ vlan.name }}</a>
        </li>
      {% endfor %}
    </ul>
  </div>
  <div class="col-md-3">
    <form action="" method="GET">
      <div class="input-group pull-right">
        <input type="text" id="network-host-list-input" name="s" class="form-control"
        value="{{ request.GET.s }}" placeholder="{% trans "Search..." %}"/>
        <span class="input-group-btn">
          <button class="btn btn-primary"><i class="fa fa-search"></i></button>
        </span>
      </div>
    </form>
  </div>
</div>
47 48

<div class="table-responsive">
49
  {% render_table table %}
50 51
</div>
{% endblock %}