From e6d85236a3e1136a466b093f764b81bf0c315ddd Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Sat, 15 Apr 2017 16:59:37 +0200 Subject: [PATCH] Handle template cleanups --- templates/whoisdb/handle_panel.html | 18 ++++++++++++++++++ templates/whoisdb/handle_show.html | 11 +---------- templates/whoisdb/handle_table.html | 5 ++++- templates/whoisdb/overview.html | 2 +- templates/whoisdb/search.html | 20 +------------------- 5 files changed, 25 insertions(+), 31 deletions(-) create mode 100644 templates/whoisdb/handle_panel.html diff --git a/templates/whoisdb/handle_panel.html b/templates/whoisdb/handle_panel.html new file mode 100644 index 0000000..022ad1b --- /dev/null +++ b/templates/whoisdb/handle_panel.html @@ -0,0 +1,18 @@ +{% with object.getAppName|add:":"|add:object.getClassName|lower|add:"-edit" as editView %} + {% with object.getAppName|add:":"|add:object.getClassName|lower|add:"-delete" as deleteView %} +
+
+ {{ object }} ({{ object.getClassName }}) + + + + + +
+
+ {% include "whoisdb/handle_table.html" with object=object %} +
+
+ {% endwith %} +{% endwith %} + diff --git a/templates/whoisdb/handle_show.html b/templates/whoisdb/handle_show.html index f36c796..0d12a43 100644 --- a/templates/whoisdb/handle_show.html +++ b/templates/whoisdb/handle_show.html @@ -3,15 +3,6 @@ {% load handletags %} {% block content %} -
-
-
-
{{ object }} ({{ object.getClassName }})
-
- {% include "whoisdb/handle_table.html" with object=object %} -
-
-
-
+{% include "whoisdb/handle_panel.html" with object=object %} {% endblock %} diff --git a/templates/whoisdb/handle_table.html b/templates/whoisdb/handle_table.html index 3b7a565..2101ad7 100644 --- a/templates/whoisdb/handle_table.html +++ b/templates/whoisdb/handle_table.html @@ -11,7 +11,10 @@ Actions {% with object.getAppName|add:":"|add:object.getClassName|lower|add:"-edit" as editView %} {% with object.getAppName|add:":"|add:object.getClassName|lower|add:"-delete" as deleteView %} - Edit object, Delete object + + + + {% endwith %} {% endwith %} diff --git a/templates/whoisdb/overview.html b/templates/whoisdb/overview.html index 879687a..54fabf2 100644 --- a/templates/whoisdb/overview.html +++ b/templates/whoisdb/overview.html @@ -13,7 +13,7 @@

You can create new database objects here. {% if hasDelegations %} - See also delegated objects. + See also lir/rir objects. {% endif %}

diff --git a/templates/whoisdb/search.html b/templates/whoisdb/search.html index 81370e4..1b669a6 100644 --- a/templates/whoisdb/search.html +++ b/templates/whoisdb/search.html @@ -12,19 +12,6 @@

- {% comment %} - {% if term %} -

-

Search for '{{ term }}'

- {% for obj in results %} -
{{ obj }}
- {% include "whoisdb/handle_table.html" with object=obj %} - {% empty %} - No objects found. - {% endfor %} -

- {% endif %} - {% endcomment %} {% if term and not results %} No objects found. {% endif %} @@ -36,12 +23,7 @@ {% for obj in results %}
-
-
{{ obj }} ({{ obj.getClassName }})
-
- {% include "whoisdb/handle_table.html" with object=obj %} -
-
+ {% include "whoisdb/handle_panel.html" with object=obj %}
{% endfor %}