nomilo/templates/pages/records.html
2026-07-01 01:12:30 +02:00

62 lines
2.1 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{%- extends "bases/app.html" -%}
{%- block title -%}{{ current_zone }} {% endblock title -%}
{%- block main -%}
<h1>{{ tr(msg="zone-header", zone_name=current_zone) }}</h1>
<details>
<summary>Debug</summary>
<pre>{{ records | json_encode(pretty=true) }}</pre>
</details>
{% if flash_message == "configure-success" or flash_message == "delete-success" %}
<p class="flash success">
{{ tr(msg="zone-content-flash-message", attr=flash_message) }}
</p>
{% endif %}
<section>
<header class="zone-content-header">
<h2>{{ tr(msg="zone-content-records-header") }}</h2>
<a href="{{ url }}/edit" class="button primary">
{{ <icon.plus_circle /> }}
{{ tr(msg="zone-content-new-sub-domain-button") }}
</a>
</header>
{%- for node in records.records -%}
{% set name = node.name | trim_end(pat=current_zone) | trim_end(pat=".") %}
<article class="domain">
<header class="zone-content-header">
<h3>{{ node.name }}</h3>
<a href="{{ url }}/edit?name={{ name }}">
{{ <icon.plus_circle /> }}
{{ tr(msg="zone-content-new-record-button") }}
</a>
</header>
<div class="records">
{%- for records in node.records %}
{{ <dns.config
records={records}
name={name}
fqdn={node.name}
url={url}
lang={lang}
/> }}
{%- endfor -%}
</div>
</article>
{%- endfor -%}
</section>
<section>
<h2>{{ tr(msg="zone-content-aliases-header") }}</h2>
<ul>
{%- for alias in records.aliases -%}
<li>{{ alias.from }} → {{ alias.target }}</li>
{%- endfor -%}
</ul>
</section>
{%- endblock main -%}