mirror of
https://forge.dns-witch.net/dns-witch/nomilo.git
synced 2026-03-14 03:05:26 +01:00
98 lines
3.7 KiB
HTML
98 lines
3.7 KiB
HTML
{%- import "macros/display_rrset.html" as rrset -%}
|
||
{%- import "macros/icons.html" as icons -%}
|
||
{%- import "macros/display_section.html" as display_section -%}
|
||
|
||
{%- 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>
|
||
|
||
<!--
|
||
<pre>
|
||
{{ records | json_encode(pretty=true) }}
|
||
</pre>
|
||
-->
|
||
{% if flash_message == "configure-success" %}
|
||
<p class="flash success">
|
||
{{ tr(msg="zone-content-flash-message", attr="configure-success", lang=lang) }}
|
||
</p>
|
||
{% endif %}
|
||
|
||
<section>
|
||
<h2>{{ tr(msg="zone-content-records-header", lang=lang) }}</h2>
|
||
{%- for node in records.records -%}
|
||
{% set name = node.name | trim_end_matches(pat=current_zone) | trim_end_matches(pat=".") %}
|
||
<article class="domain">
|
||
<header>
|
||
<h3>{{ node.name }}</h3>
|
||
|
||
<a href="{{ url }}/new?name={{ name }}" 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") -%}
|
||
{{ display_section::card(
|
||
section="web",
|
||
records=records,
|
||
name=name,
|
||
fqdn=node.name,
|
||
url=url,
|
||
lang=lang) }}
|
||
{%- endif -%}
|
||
|
||
{%- if sections.mail -%}
|
||
{%- set records = sections.mail | group_by(attribute="record_type") -%}
|
||
{{ display_section::card(
|
||
section="mail",
|
||
records=records,
|
||
name=name,
|
||
fqdn=node.name,
|
||
url=url,
|
||
lang=lang) }}
|
||
{%- endif -%}
|
||
|
||
{%- if sections.services -%}
|
||
{%- set records = sections.services | group_by(attribute="record_type") -%}
|
||
{{ display_section::card(
|
||
section="service",
|
||
records=records,
|
||
name=name,
|
||
fqdn=node.name,
|
||
url=url,
|
||
lang=lang) }}
|
||
{%- endif -%}
|
||
|
||
{%- if sections.miscellaneous -%}
|
||
{%- for record in sections.miscellaneous -%}
|
||
{{ rrset::rrset(
|
||
record=record,
|
||
name=name,
|
||
fqdn=node.name,
|
||
url=url,
|
||
lang=lang) }}
|
||
{%- endfor -%}
|
||
{%- 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 -%}
|