101 lines
4.2 KiB
HTML
101 lines
4.2 KiB
HTML
{%- import "macros/display_rrset.html" as rrset -%}
|
||
{%- import "macros/icons.html" as icons -%}
|
||
|
||
{%- 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?name={{ node.name | trim_end_matches(pat=current_zone) | trim_end_matches(pat=".") }}" class="button">
|
||
{{ icons::plus_circle() }}
|
||
{{ 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 -%}
|