Sunil Mohan Adapa 7c07126fe9
dynamicdns: Use inline SVG icons
Tests:

- All the icons appear as before in both light/dark themes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2026-03-19 19:13:13 -04:00

95 lines
3.2 KiB
HTML

{% extends "app.html" %}
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load bootstrap %}
{% load i18n %}
{% load plinth_extras %}
{% block extra_content %}
<h3>{% trans "Domains" %}</h3>
<div class="btn-toolbar">
<a href="{% url 'dynamicdns:domain-add' %}" class="btn btn-primary"
role="button" title="{% trans 'Add Domain' %}">
{% icon 'plus' %}
{% trans 'Add Domain' %}
</a>
</div>
{% if domains_status %}
<div class="table-responsive domains-status">
<table class="table">
<thead>
<tr>
<th>{% trans "Domain" %}</th>
<th>{% trans "Last update" %}</th>
<th>{% trans "Result" %}</th>
<th>{% trans "IP Address" %}</th>
<th>{% trans "Actions" %}</th>
</tr>
</thead>
<tbody>
{% for domain in domains_status.values %}
<tr>
<td class="domain-name">
<a href="{% url 'dynamicdns:domain-edit' domain.domain %}"
title="{% blocktrans trimmed with domain=domain.domain %}
Edit domain {{ domain }}
{% endblocktrans %}">
{{ domain.domain }}
</a>
</td>
<td>
{% if domain.timestamp %}
{{ domain.timestamp|timesince }}
{% else %}
{% trans "Not yet" %}
{% endif %}
</td>
<td>
{% if domain.result %}
<span class="badge text-bg-success">
{% trans "Success" %}
</span>
{% elif not domain.timestamp %}
-
{% else %}
<span class="badge text-bg-warning">
{% trans "Failed" %}
</span>
{% endif %}
{% if domain.error_message %}
({{ domain.error_message }})
{% elif domain.error_code %}
({{ domain.error_code }})
{% endif %}
</td>
<td>{{ domain.ip_address|default_if_none:'-' }}</td>
<td>
<a href="{% url 'dynamicdns:domain-edit' domain.domain %}"
class="btn btn-default btn-sm domain-edit" role="button"
title="{% blocktrans trimmed with domain=domain.domain %}
Edit domain {{ domain }}
{% endblocktrans %}">
{% icon 'pencil-square-o' %}
</a>
<a href="{% url 'dynamicdns:domain-delete' domain.domain %}"
class="btn btn-default btn-sm domain-delete" role="button"
title="{% blocktrans trimmed with domain=domain.main %}
Delete domain {{ domain }}
{% endblocktrans %}">
{% icon 'trash' %}
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p>{% trans "No domains configured." %}</p>
{% endif %}
{% endblock %}