{% extends "base.html" %}

{% block pagebanner %}
  <div class="header">
      <h2>Zones</h2>
      <p>Hostbase generates DNS zone files for the following zones.
  </div>
  <br/>
{% endblock %}

{% block sidebar %}
{% include "navbar.tmpl" %}
<ul class="sidebar">
<li><a href="/hostbase/zones/{{ zone.id }}/edit/" class="sidebar">edit zone</a><br>
</li>
</ul>
{% include "logout.tmpl" %}
{% endblock %}

{% block content %}
<table border="0" width="100%">
   <colgroup>
   <col width="200">
   <col width="*">
   <tr> <td> <b>zone</b></td>
   <td> {{ zone.zone }}</td></tr>
   <tr> <td> <b>serial</b></td>
   <td> {{ zone.serial }}</td></tr>
   <tr> <td> <b>admin</b></td>
   <td> {{ zone.admin }}</td></tr>
   <tr> <td> <b>primary_master</b></td>
   <td> {{ zone.primary_master }}</td></tr>
   <tr> <td> <b>expire</b></td>
   <td> {{ zone.expire }}</td></tr>
   <tr> <td> <b>retry</b></td>
   <td> {{ zone.retry }}</td></tr>
   <tr> <td> <b>refresh</b></td>
   <td> {{ zone.refresh }}</td></tr>
   <tr> <td> <b>ttl</b></td>
   <td> {{ zone.ttl }}</td></tr>

   <tr><td valign="top"> <b>nameservers</b></td>
   <td>
   {% for nameserver in zone.nameservers.all %}
   {{ nameserver.name }}<br>
   {% endfor %}
   </td></tr>
   <tr><td valign="top"> <b>mxs</b></td>
   <td>
   {% for mx in zone.mxs.all %}
   {{ mx.priority }} {{ mx.mx }}<br>
   {% endfor %}
   </td></tr>
   {% if addresses %}
   <tr><td valign="top"> <b>A records</b></td>
   <td>
   {% for address in sof.addresses.all %}
   {{ address.ip_addr }}<br>
   {% endfor %}
   </td></tr>
   {% endif %}

   <tr> <td valign="top"> <b>aux</b></td>
   <td>
   {{ zone.aux|linebreaksbr }}
   </td></tr>

</table>
<br><br>
{% endblock %}

