{% extends "network/base.html" %}
{% load render_table from django_tables2 %}
{% load i18n %}
{% load l10n %}
{% load static %}
{% load crispy_forms_tags %}

{% block title-page %}{{ form.name.value }} | {% trans "vlan" %}{% endblock %}

{% block content %}
<div class="page-header">
    <a href="{% url "network.vlan_delete" vid=vlan_vid %}" class="btn btn-danger pull-right"><i class="fa fa-times-circle"></i> {% trans "Delete this vlan" %}</a>
    <h2>{{ form.name.value }} <small>{% trans "details of vlan" %}</small></h2>
</div>

<div class="row">
  <div class="col-sm-6">
    {% crispy form %}
  </div>
  <div class="col-sm-6">
    <div class="page-header">
      <a href="{% url "network.host_create" %}?vlan={{vlan.pk}}" class="btn btn-success pull-right"><i class="fa fa-plus-circle"></i> {% trans "Create a new host" %}</a>
      <h3>{% trans "Host list" %}</h3>
    </div>
    {% render_table host_list %}

    <div class="page-header">
      <h3>{% trans "Unregistered hosts" %}</h3>
    </div>
    {% render_table dhcp_list %}

    <div class="page-header">
      <h3>{% trans "Manage access" %}</h3>
    </div>
    {% include "dashboard/_manage_access.html" with table_id="vlan-access-table" %}
  </div>
</div>
{% endblock %}
