backups: Make backup location tables collapsible

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
[sunil@medhas.org Fix incorrectly removed <tr> tag in <thead>]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Joseph Nuthalapati 2019-07-26 17:30:21 +05:30 committed by Sunil Mohan Adapa
parent c2cb187d91
commit faac8cdd9c
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
2 changed files with 7 additions and 6 deletions

View File

@ -21,10 +21,11 @@
<table class="table table-bordered table-condensed table-striped"
id="archives-list">
<thead>
<thead class="collapsible-button" data-toggle="collapse" data-target="#{{ uuid }}">
<tr>
<th colspan="2">
<span style="vertical-align: text-top">
<span class="fa fa-chevron-right fa-fw" aria-hidden="true"></span>
{% if repository.error %}
<span class="fa fa-exclamation-triangle mount-error"
aria-hidden="true" title="{{ repository.error }}">
@ -63,7 +64,7 @@
{% endif %}
<a title="{% trans 'Remove Location. This will not delete the remote backup.' %}"
<a title="{% trans 'Remove Backup Location. This will not delete the remote backup.' %}"
role="button" class="repository-remove btn btn-sm btn-default"
href="{% url 'backups:repository-remove' uuid %}">
<span class="fa fa-trash-o" aria-hidden="true">
@ -77,7 +78,7 @@
</tr>
</thead>
<tbody>
<tbody class="collapse in" id="{{ uuid }}">
{% if repository.mounted %}
{% for archive in repository.archives %}

View File

@ -235,12 +235,12 @@ footer {
margin-left: 5px;
}
.collapsible-button .fa:before,
.no-js .collapsible-button.collapsed .fa:before {
.collapsible-button .fa-chevron-right:before,
.no-js .collapsible-button.collapsed .fa-chevron-right:before {
content: "\f078";
}
.collapsible-button.collapsed .fa:before {
.collapsible-button.collapsed .fa-chevron-right:before {
content: "\f054";
}