FreedomBox/plinth/modules/snapshot/templates/snapshot_manage.html
Sunil Mohan Adapa 4d71e80b1e
ui: Drop use of badge-* utility classes for newer replacements
- 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>
2024-12-12 12:30:28 +02:00

79 lines
2.7 KiB
HTML

{% extends "app.html" %}
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% block configuration %}
<form class="form" method="post">
<div class="button-table">
<div class="btn-toolbar">
{% csrf_token %}
<input type="submit" class="btn btn-primary" name="create"
value="{% trans 'Create Snapshot' %}"/>
<input type="submit" class="btn btn-danger button-secondary"
name="delete_selected"
value="{% trans 'Delete Snapshots' %}"
{{ has_deletable_snapshots|yesno:',disabled="disabled"' }}/>
</div>
<div class="table-responsive">
<table class="table">
<thead>
<th>{% trans "Number" %}</th>
<th>{% trans "Date" %}</th>
<th>{% trans "Description" %}</th>
<th class="centered-column">{% trans "Rollback" %}</th>
<th class="centered-column"><input type="checkbox" id="select-all"></th>
</thead>
<tbody>
{% for snapshot in snapshots %}
<tr>
<td>
{{ snapshot.number }}
{% if snapshot.is_default %}
<span class="badge text-bg-secondary">
{% trans "will be used at next boot" %}
</span>
{% endif %}
{% if snapshot.is_active %}
<span class="badge text-bg-success">
{% trans "in use" %}
</span>
{% endif %}
</td>
<td>{{ snapshot.date }}</td>
<td>{% trans snapshot.description %}</td>
<td class="centered-column">
<a href="{% url 'snapshot:rollback' snapshot.number %}"
class="btn btn-default btn-sm" role="button"
title="{% blocktrans trimmed with number=snapshot.number %}
Rollback to snapshot #{{ number }}
{% endblocktrans %}">
<span class="fa fa-repeat"
aria-hidden="true"></span>
</a>
</td>
<td class="centered-column">
{% if not snapshot.is_default and not snapshot.is_active %}
<input type="checkbox" name="snapshot_list" value={{ snapshot.number }} />
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</form>
{% endblock %}
{% block page_js %}
<script type="text/javascript" src="{% static 'snapshot/snapshot.js' %}"></script>
{% endblock %}