Improve buttons on network relay partial

This commit is contained in:
Mark Veidemanis 2022-08-02 07:50:45 +01:00
parent c7e5ac5aac
commit 62ef524ac7
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 23 additions and 11 deletions

View File

@ -7,14 +7,19 @@
<table class="table is-fullwidth is-hoverable"> <table class="table is-fullwidth is-hoverable">
<thead> <thead>
<th>id</th> <th>id</th>
<th>registered</th> <th>reg</th>
<th>enabled</th> <th>on</th>
<th> <th>
<span class="icon"> <span class="icon">
<i class="fa-solid fa-hashtag"></i> <i class="fa-solid fa-hashtag"></i>
</span> </span>
</th> </th>
<th>nick</th> <th>nick</th>
<th>
<span class="icon">
<i class="fa-solid fa-wrench" aria-hidden="true"></i>
</span>
</th>
</thead> </thead>
<tbody> <tbody>
{% for relay in relays %} {% for relay in relays %}
@ -36,6 +41,21 @@
<span class="icon"> <span class="icon">
<i class="fa-solid fa-check" aria-hidden="true"></i> <i class="fa-solid fa-check" aria-hidden="true"></i>
</span> </span>
{% else %}
<span class="icon">
<i class="fa-solid fa-xmark" aria-hidden="true"></i>
</span>
{% endif %}
</td>
<td>
{{ relay.chans }}
</td>
<td>
{{ relay.nick }}
</td>
<td>
<div class="buttons">
{% if relay.enabled %}
<button <button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-get="{% url 'threshold_irc_network_relay_status' relay|index:'net' relay|index:'id' 0 %}" hx-get="{% url 'threshold_irc_network_relay_status' relay|index:'net' relay|index:'id' 0 %}"
@ -47,9 +67,6 @@
</span> </span>
</button> </button>
{% else %} {% else %}
<span class="icon">
<i class="fa-solid fa-xmark" aria-hidden="true"></i>
</span>
<button <button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-get="{% url 'threshold_irc_network_relay_status' relay|index:'net' relay|index:'id' 1 %}" hx-get="{% url 'threshold_irc_network_relay_status' relay|index:'net' relay|index:'id' 1 %}"
@ -71,12 +88,7 @@
<i class="fa-solid fa-xmark" aria-hidden="true"></i> <i class="fa-solid fa-xmark" aria-hidden="true"></i>
</span> </span>
</button> </button>
</td> </div>
<td>
{{ relay.chans }}
</td>
<td>
{{ relay.nick }}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}