From fd729097126a2db34e43133b24b9675fcc031b37 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 18 Jun 2018 19:17:20 +0530 Subject: [PATCH] snapshot: Remove unnecessary column sizing - Implement button-table class for tables with buttons about them. Signed-off-by: Manish Tripathy Signed-off-by: Sunil Mohan Adapa Reviewed-by: Sunil Mohan Adapa --- .../snapshot/templates/snapshot_delete.html | 32 +++--- .../templates/snapshot_delete_all.html | 40 ++++--- .../snapshot/templates/snapshot_manage.html | 100 +++++++++--------- .../snapshot/templates/snapshot_rollback.html | 32 +++--- static/themes/default/css/plinth.css | 5 + 5 files changed, 99 insertions(+), 110 deletions(-) diff --git a/plinth/modules/snapshot/templates/snapshot_delete.html b/plinth/modules/snapshot/templates/snapshot_delete.html index 99af914ff..58d2880dd 100644 --- a/plinth/modules/snapshot/templates/snapshot_delete.html +++ b/plinth/modules/snapshot/templates/snapshot_delete.html @@ -26,24 +26,20 @@

{% trans "Delete this snapshot permanently?" %}

-
-
- - - - - - - - - - - - - -
{% trans "Number" %}{% trans "Date" %}{% trans "Description" %}
{{ snapshot.number }}{{ snapshot.date }}{{ snapshot.description }}
-
-
+ + + + + + + + + + + + + +
{% trans "Number" %}{% trans "Date" %}{% trans "Description" %}
{{ snapshot.number }}{{ snapshot.date }}{{ snapshot.description }}

diff --git a/plinth/modules/snapshot/templates/snapshot_delete_all.html b/plinth/modules/snapshot/templates/snapshot_delete_all.html index 7f2d8a69b..2e7e7f23b 100644 --- a/plinth/modules/snapshot/templates/snapshot_delete_all.html +++ b/plinth/modules/snapshot/templates/snapshot_delete_all.html @@ -26,28 +26,24 @@

{% trans "Delete the following snapshots permanently?" %}

-
-
- - - - - - - - {% for snapshot in snapshots %} - {% if not snapshot.is_default %} - - - - - - {% endif %} - {% endfor %} - -
{% trans "Number" %}{% trans "Date" %}{% trans "Description" %}
{{ snapshot.number }}{{ snapshot.date }}{{ snapshot.description }}
-
-
+ + + + + + + + {% for snapshot in snapshots %} + {% if not snapshot.is_default %} + + + + + + {% endif %} + {% endfor %} + +
{% trans "Number" %}{% trans "Date" %}{% trans "Description" %}
{{ snapshot.number }}{{ snapshot.date }}{{ snapshot.description }}

diff --git a/plinth/modules/snapshot/templates/snapshot_manage.html b/plinth/modules/snapshot/templates/snapshot_manage.html index 612c6a5e7..3c0ef1741 100644 --- a/plinth/modules/snapshot/templates/snapshot_manage.html +++ b/plinth/modules/snapshot/templates/snapshot_manage.html @@ -23,8 +23,9 @@ {% block content %} {% block configuration %} -

-

+
+ +
{% csrf_token %}
@@ -44,62 +45,57 @@
-

- -
-
- - - - - - - - - - {% for snapshot in snapshots %} - {% if snapshot.description != "current" %} - - - - - + + + + + + + + {% for snapshot in snapshots %} + {% if snapshot.description != "current" %} + + + + + + - - - {% endif %} - {% endfor %} - -
{% trans "Number" %}{% trans "Date" %}{% trans "Description" %}{% trans "Rollback" %}{% trans "Delete" %}
- {{ snapshot.number }} - {% if snapshot.is_default %} - - {% trans "active" %} - - {% endif %} - {{ snapshot.date }}{{ snapshot.description }} - +
{% trans "Number" %}{% trans "Date" %}{% trans "Description" %}{% trans "Rollback" %}{% trans "Delete" %}
+ {{ snapshot.number }} + {% if snapshot.is_default %} + + {% trans "active" %} + + {% endif %} + {{ snapshot.date }}{{ snapshot.description }} + + + + + {% if not snapshot.is_default %} + - - - {% if not snapshot.is_default %} - - - - {% endif %} -
-
-
+ {% endif %} + + + {% endif %} + {% endfor %} + + +
{% endblock %} {% endblock %} diff --git a/plinth/modules/snapshot/templates/snapshot_rollback.html b/plinth/modules/snapshot/templates/snapshot_rollback.html index 30bff99a1..f40911255 100644 --- a/plinth/modules/snapshot/templates/snapshot_rollback.html +++ b/plinth/modules/snapshot/templates/snapshot_rollback.html @@ -34,24 +34,20 @@ {% endblocktrans %}

-
-
- - - - - - - - - - - - - -
{% trans "Number" %}{% trans "Date" %}{% trans "Description" %}
{{ snapshot.number }}{{ snapshot.date }}{{ snapshot.description }}
-
-
+ + + + + + + + + + + + + +
{% trans "Number" %}{% trans "Date" %}{% trans "Description" %}
{{ snapshot.number }}{{ snapshot.date }}{{ snapshot.description }}

diff --git a/static/themes/default/css/plinth.css b/static/themes/default/css/plinth.css index 2f33d2d93..4f3276af1 100644 --- a/static/themes/default/css/plinth.css +++ b/static/themes/default/css/plinth.css @@ -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; +}