mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
snapshot: Remove unnecessary column sizing
- Implement button-table class for tables with buttons about them. Signed-off-by: Manish Tripathy <manisht@thougtworks.com> Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
a596ad5f37
commit
fd72909712
@ -26,24 +26,20 @@
|
||||
|
||||
<p>{% trans "Delete this snapshot permanently?" %}</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<table class="table table-bordered table-condensed table-striped">
|
||||
<thead>
|
||||
<th>{% trans "Number" %}</th>
|
||||
<th>{% trans "Date" %}</th>
|
||||
<th>{% trans "Description" %}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ snapshot.number }}</td>
|
||||
<td>{{ snapshot.date }}</td>
|
||||
<td>{{ snapshot.description }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-bordered table-condensed table-striped">
|
||||
<thead>
|
||||
<th>{% trans "Number" %}</th>
|
||||
<th>{% trans "Date" %}</th>
|
||||
<th>{% trans "Description" %}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ snapshot.number }}</td>
|
||||
<td>{{ snapshot.date }}</td>
|
||||
<td>{{ snapshot.description }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<form class="form" method="post">
|
||||
|
||||
@ -26,28 +26,24 @@
|
||||
|
||||
<p>{% trans "Delete the following snapshots permanently?" %}</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<table class="table table-bordered table-condensed table-striped">
|
||||
<thead>
|
||||
<th>{% trans "Number" %}</th>
|
||||
<th>{% trans "Date" %}</th>
|
||||
<th>{% trans "Description" %}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for snapshot in snapshots %}
|
||||
{% if not snapshot.is_default %}
|
||||
<tr>
|
||||
<td>{{ snapshot.number }}</td>
|
||||
<td>{{ snapshot.date }}</td>
|
||||
<td>{{ snapshot.description }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-bordered table-condensed table-striped">
|
||||
<thead>
|
||||
<th>{% trans "Number" %}</th>
|
||||
<th>{% trans "Date" %}</th>
|
||||
<th>{% trans "Description" %}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for snapshot in snapshots %}
|
||||
{% if not snapshot.is_default %}
|
||||
<tr>
|
||||
<td>{{ snapshot.number }}</td>
|
||||
<td>{{ snapshot.date }}</td>
|
||||
<td>{{ snapshot.description }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<form class="form" method="post">
|
||||
|
||||
@ -23,8 +23,9 @@
|
||||
|
||||
{% block content %}
|
||||
{% block configuration %}
|
||||
<p>
|
||||
<div class="row">
|
||||
<div class="button-table">
|
||||
|
||||
<div class="button-row row">
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="col-xs-6 text-left">
|
||||
@ -44,62 +45,57 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<table class="table table-bordered table-condensed table-striped">
|
||||
<thead>
|
||||
<th>{% trans "Number" %}</th>
|
||||
<th>{% trans "Date" %}</th>
|
||||
<th>{% trans "Description" %}</th>
|
||||
<th>{% trans "Rollback" %}</th>
|
||||
<th>{% trans "Delete" %}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for snapshot in snapshots %}
|
||||
{% if snapshot.description != "current" %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ snapshot.number }}
|
||||
{% if snapshot.is_default %}
|
||||
<span class="label label-primary">
|
||||
{% trans "active" %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ snapshot.date }}</td>
|
||||
<td>{{ snapshot.description }}</td>
|
||||
<td>
|
||||
<a href="{% url 'snapshot:rollback' snapshot.number %}"
|
||||
<table class="table table-bordered table-condensed table-striped">
|
||||
<thead>
|
||||
<th>{% trans "Number" %}</th>
|
||||
<th>{% trans "Date" %}</th>
|
||||
<th>{% trans "Description" %}</th>
|
||||
<th>{% trans "Rollback" %}</th>
|
||||
<th>{% trans "Delete" %}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for snapshot in snapshots %}
|
||||
{% if snapshot.description != "current" %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ snapshot.number }}
|
||||
{% if snapshot.is_default %}
|
||||
<span class="label label-primary">
|
||||
{% trans "active" %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ snapshot.date }}</td>
|
||||
<td>{{ snapshot.description }}</td>
|
||||
<td>
|
||||
<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"
|
||||
title="{% blocktrans trimmed with number=snapshot.number %}
|
||||
Rollback to snapshot #{{ number }}
|
||||
Delete snapshot #{{ number }}
|
||||
{% endblocktrans %}">
|
||||
<span class="glyphicon glyphicon-repeat"
|
||||
<span class="glyphicon glyphicon-trash"
|
||||
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"
|
||||
title="{% blocktrans trimmed with number=snapshot.number %}
|
||||
Delete snapshot #{{ number }}
|
||||
{% endblocktrans %}">
|
||||
<span class="glyphicon glyphicon-trash"
|
||||
aria-hidden="true"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@ -34,24 +34,20 @@
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<table class="table table-bordered table-condensed table-striped">
|
||||
<thead>
|
||||
<th>{% trans "Number" %}</th>
|
||||
<th>{% trans "Date" %}</th>
|
||||
<th>{% trans "Description" %}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ snapshot.number }}</td>
|
||||
<td>{{ snapshot.date }}</td>
|
||||
<td>{{ snapshot.description }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-bordered table-condensed table-striped">
|
||||
<thead>
|
||||
<th>{% trans "Number" %}</th>
|
||||
<th>{% trans "Date" %}</th>
|
||||
<th>{% trans "Description" %}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ snapshot.number }}</td>
|
||||
<td>{{ snapshot.date }}</td>
|
||||
<td>{{ snapshot.description }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<form class="form" method="post">
|
||||
|
||||
@ -280,3 +280,8 @@ a.menu_link_active {
|
||||
height: 100px;
|
||||
font-size: 80px
|
||||
}
|
||||
|
||||
/* Button table - Tables with a list of actions as buttons on top */
|
||||
.button-table > .button-row + .table {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user