mirror of
https://forge.familier.net.eu.org/dns-witch/nomilo.git
synced 2025-05-14 22:22:35 +02:00
102 lines
4.5 KiB
HTML
102 lines
4.5 KiB
HTML
{% import "macros/display_rrset.html" as rrset %}
|
|
{% extends "bases/app.html" %}
|
|
|
|
{% block title %}{{ tr(msg="zone-content-title", lang=lang) }} - {{ current_zone }} - {% endblock title %}
|
|
|
|
{% block main %}
|
|
<h1>{{ tr(msg="zone-header", lang=lang, zone_name="<strong>" ~ current_zone ~ "</strong>") | safe }}</h1>
|
|
<svg width="0" height="0" aria-hidden="true" style="position: absolute;">
|
|
<defs>
|
|
<clipPath id="corner-folder-tab-right" clipPathUnits="objectBoundingBox">
|
|
<path d="m 0,0 c .25,0 0.75,1 1,1 l -1,0 z"/>
|
|
</clipPath>
|
|
</defs>
|
|
</svg>
|
|
|
|
<section>
|
|
<h2>{{ tr(msg="zone-content-records-header", lang=lang) }}</h2>
|
|
{% for node in records.records %}
|
|
<article class="domain">
|
|
<header>
|
|
<h3 class="folder-tab">{{ node.name }}</h3>
|
|
<span class="sep"></span>
|
|
<a href="{{ url }}/new?subdomain={{ node.name | trim_end_matches(pat=current_zone) | trim_end_matches(pat=".") }}" class="button">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-plus-circle" viewBox="0 0 16 16" aria-hidden="true">
|
|
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/>
|
|
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4"/>
|
|
</svg>
|
|
{{ tr(msg="zone-content-new-record-button", lang=lang) }}
|
|
</a>
|
|
</header>
|
|
{% set sections = node.records | group_by(attribute="record_section") %}
|
|
<div class="records">
|
|
{% if sections.web %}
|
|
{% set records = sections.web | group_by(attribute="record_type") %}
|
|
<h4>{{ tr(msg="zone-content-section-web-header", lang=lang) }}</h4>
|
|
<ul>
|
|
{% if records.addresses %}
|
|
{{ rrset::rrset(
|
|
record=records.addresses.0,
|
|
zone=current_zone,
|
|
lang=lang) }}
|
|
{% endif %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
{% if sections.mail %}
|
|
{% set records = sections.mail | group_by(attribute="record_type") %}
|
|
<h4>{{ tr(msg="zone-content-section-mail-header", lang=lang) }}</h4>
|
|
<ul>
|
|
{% if records.mailservers %}
|
|
{{ rrset::rrset(
|
|
record=records.mailservers.0,
|
|
zone=current_zone,
|
|
lang=lang) }}
|
|
{% endif %}
|
|
{% if records.spf %}
|
|
{{ rrset::rrset(
|
|
record=records.spf.0,
|
|
zone=current_zone,
|
|
lang=lang) }}
|
|
{% endif %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
{% if sections.services %}
|
|
<h4>{{ tr(msg="zone-content-section-services-header", lang=lang) }}</h4>
|
|
<ul>
|
|
{% for service in sections.services %}
|
|
{{ rrset::rrset(
|
|
record=service,
|
|
zone=current_zone,
|
|
lang=lang) }}
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
{% if sections.miscellaneous %}
|
|
<h4>{{ tr(msg="zone-content-section-general-header", lang=lang) }}</h4>
|
|
<ul>
|
|
{% for record in sections.miscellaneous %}
|
|
{{ rrset::rrset(
|
|
record=record,
|
|
zone=current_zone,
|
|
lang=lang) }}
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
</div>
|
|
</article>
|
|
{% endfor %}
|
|
</section>
|
|
<section>
|
|
<h2>{{ tr(msg="zone-content-aliases-header", lang=lang) }}</h2>
|
|
|
|
<ul>
|
|
{% for alias in records.aliases %}
|
|
<li>{{ alias.from }} → {{ alias.target }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</section>
|
|
{% endblock main %}
|