mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-22 10:01:45 +00:00
- Keep the badge-{severity} classes as they are meant for convenience of mapping
severity to style.
- Match bootstrap colors to maintain consistency and contrast.
Tests:
- Visually confirm that all the changes effective.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
88 lines
3.1 KiB
HTML
88 lines
3.1 KiB
HTML
{% comment %}
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
{% endcomment %}
|
|
|
|
{% load bootstrap %}
|
|
{% load i18n %}
|
|
|
|
<h3>{% trans "Connections" %}</h3>
|
|
|
|
<div class="btn-toolbar">
|
|
<a href="{% url 'networks:scan' %}" class="btn btn-default"
|
|
role="button" title="{% trans 'Nearby Wi-Fi Networks' %}">
|
|
<span class="fa fa-wifi" aria-hidden="true"></span>
|
|
{% trans "Nearby Wi-Fi Networks" %}
|
|
</a>
|
|
<a href="{% url 'networks:add' %}" class="btn btn-default"
|
|
role="button" title="{% trans 'Add Connection' %}">
|
|
<span class="fa fa-plus" aria-hidden="true"></span>
|
|
{% trans "Add Connection" %}
|
|
</a>
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
<table class="table">
|
|
<tbody>
|
|
{% for connection in connections %}
|
|
<tr>
|
|
<td class="connection-status-cell">
|
|
{% if connection.is_active %}
|
|
<span class="badge text-bg-success connection-status-label">
|
|
{% trans "Active" %}
|
|
</span>
|
|
{% else %}
|
|
<span class="badge text-bg-warning connection-status-label">
|
|
{% trans "Inactive" %}
|
|
</span>
|
|
{% endif %}
|
|
</td>
|
|
|
|
<td>
|
|
<a class="connection-show-label"
|
|
href="{% url 'networks:show' connection.uuid %}"
|
|
title="{% blocktrans with name=connection.name %}Show connection {{ name }}{% endblocktrans %}">
|
|
{{ connection.name }}
|
|
</a>
|
|
</td>
|
|
|
|
<td>
|
|
<span class="connection-type-label">
|
|
{{ connection.type_name }}
|
|
</span>
|
|
</td>
|
|
|
|
<td class="connection-actions">
|
|
{% if connection.is_active %}
|
|
{% if not connection.primary %}
|
|
<form class="form form-action" method="post"
|
|
action="{% url 'networks:deactivate' connection.uuid %}">
|
|
{% csrf_token %}
|
|
<button type="submit" class="btn btn-default btn-sm">
|
|
{% trans "Deactivate" %}</button>
|
|
</form>
|
|
{% endif %}
|
|
{% else %}
|
|
<form class="form form-action" method="post"
|
|
action="{% url 'networks:activate' connection.uuid %}">
|
|
{% csrf_token %}
|
|
<button type="submit" class="btn btn-default btn-sm">
|
|
{% trans "Activate" %}</button>
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% if not connection.primary %}
|
|
<a href="{% url 'networks:delete' connection.uuid %}"
|
|
class="btn btn-default btn-sm"
|
|
role="button"
|
|
title="{% blocktrans with name=connection.name %}Delete connection {{ name }}{% endblocktrans %}">
|
|
<span class="fa fa-trash-o" aria-hidden="true"></span>
|
|
</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% include "connections_diagram.html" %}
|