mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
snapshots: Move manual page link to the index page
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
8451c0b2dc
commit
a61046d7d0
@ -21,83 +21,85 @@
|
|||||||
{% load bootstrap %}
|
{% load bootstrap %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block configuration %}
|
{% block content %}
|
||||||
<p>
|
{% block configuration %}
|
||||||
<div class="row">
|
<p>
|
||||||
<form class="form" method="post">
|
<div class="row">
|
||||||
{% csrf_token %}
|
<form class="form" method="post">
|
||||||
<div class="col-xs-6 text-left">
|
{% csrf_token %}
|
||||||
<input type="submit" class="btn btn-primary" name="create"
|
<div class="col-xs-6 text-left">
|
||||||
value="{% trans 'Create Snapshot' %}"/>
|
<input type="submit" class="btn btn-primary" name="create"
|
||||||
|
value="{% trans 'Create Snapshot' %}"/>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="col-xs-6 text-right">
|
||||||
|
<a title="{% trans 'Delete all the snapshots' %}"
|
||||||
|
role="button" class="btn btn-danger"
|
||||||
|
{% if not has_deletable_snapshots %}
|
||||||
|
disabled="disabled"
|
||||||
|
{% else %}
|
||||||
|
href="{% url 'snapshot:delete-all' %}"
|
||||||
|
{% endif %}>
|
||||||
|
{% trans 'Delete All' %}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
<div class="col-xs-6 text-right">
|
|
||||||
<a title="{% trans 'Delete all the snapshots' %}"
|
|
||||||
role="button" class="btn btn-danger"
|
|
||||||
{% if not has_deletable_snapshots %}
|
|
||||||
disabled="disabled"
|
|
||||||
{% else %}
|
|
||||||
href="{% url 'snapshot:delete-all' %}"
|
|
||||||
{% endif %}>
|
|
||||||
{% trans 'Delete All' %}
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</p>
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<table class="table table-bordered table-condensed table-striped">
|
<table class="table table-bordered table-condensed table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<th>{% trans "Number" %}</th>
|
<th>{% trans "Number" %}</th>
|
||||||
<th>{% trans "Date" %}</th>
|
<th>{% trans "Date" %}</th>
|
||||||
<th>{% trans "Description" %}</th>
|
<th>{% trans "Description" %}</th>
|
||||||
<th>{% trans "Rollback" %}</th>
|
<th>{% trans "Rollback" %}</th>
|
||||||
<th>{% trans "Delete" %}</th>
|
<th>{% trans "Delete" %}</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for snapshot in snapshots %}
|
{% for snapshot in snapshots %}
|
||||||
{% if snapshot.description != "current" %}
|
{% if snapshot.description != "current" %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{{ snapshot.number }}
|
{{ snapshot.number }}
|
||||||
{% if snapshot.is_default %}
|
{% if snapshot.is_default %}
|
||||||
<span class="label label-primary">
|
<span class="label label-primary">
|
||||||
{% trans "active" %}
|
{% trans "active" %}
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ snapshot.date }}</td>
|
<td>{{ snapshot.date }}</td>
|
||||||
<td>{{ snapshot.description }}</td>
|
<td>{{ snapshot.description }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url 'snapshot:rollback' snapshot.number %}"
|
<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="glyphicon glyphicon-repeat"
|
|
||||||
aria-hidden="true"></span>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% if not snapshot.is_default %}
|
|
||||||
<a href="{% url 'snapshot:delete' snapshot.number %}"
|
|
||||||
class="btn btn-default btn-sm" role="button"
|
class="btn btn-default btn-sm" role="button"
|
||||||
title="{% blocktrans trimmed with number=snapshot.number %}
|
title="{% blocktrans trimmed with number=snapshot.number %}
|
||||||
Delete snapshot #{{ number }}
|
Rollback to snapshot #{{ number }}
|
||||||
{% endblocktrans %}">
|
{% endblocktrans %}">
|
||||||
<span class="glyphicon glyphicon-trash"
|
<span class="glyphicon glyphicon-repeat"
|
||||||
aria-hidden="true"></span>
|
aria-hidden="true"></span>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
</td>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
{% if not snapshot.is_default %}
|
||||||
{% endif %}
|
<a href="{% url 'snapshot:delete' snapshot.number %}"
|
||||||
{% endfor %}
|
class="btn btn-default btn-sm" role="button"
|
||||||
</tbody>
|
title="{% blocktrans trimmed with number=snapshot.number %}
|
||||||
</table>
|
Delete snapshot #{{ number }}
|
||||||
|
{% endblocktrans %}">
|
||||||
|
<span class="glyphicon glyphicon-trash"
|
||||||
|
aria-hidden="true"></span>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@ -60,6 +60,7 @@ def index(request):
|
|||||||
request, 'snapshot.html', {
|
request, 'snapshot.html', {
|
||||||
'title': snapshot_module.name,
|
'title': snapshot_module.name,
|
||||||
'description': snapshot_module.description,
|
'description': snapshot_module.description,
|
||||||
|
'manual_page': snapshot_module.manual_page,
|
||||||
'subsubmenu': subsubmenu,
|
'subsubmenu': subsubmenu,
|
||||||
'form': form
|
'form': form
|
||||||
})
|
})
|
||||||
@ -82,7 +83,6 @@ def manage(request):
|
|||||||
'snapshots': snapshots,
|
'snapshots': snapshots,
|
||||||
'has_deletable_snapshots': has_deletable_snapshots,
|
'has_deletable_snapshots': has_deletable_snapshots,
|
||||||
'subsubmenu': subsubmenu,
|
'subsubmenu': subsubmenu,
|
||||||
'manual_page': snapshot_module.manual_page,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user