From 116ae29dabf6c93be86bbb8cb24f6a42f30ad1b3 Mon Sep 17 00:00:00 2001 From: Ludvig Wadenstein Date: Mon, 15 Jul 2013 22:47:10 +0200 Subject: [PATCH] Removed some duplication of savebutton markup in templates --- .../bootstrap/includes/save_buttons.html | 22 ++++++++++++----- .../djadmin2/bootstrap/model_update_form.html | 24 ++----------------- 2 files changed, 18 insertions(+), 28 deletions(-) diff --git a/djadmin2/templates/djadmin2/bootstrap/includes/save_buttons.html b/djadmin2/templates/djadmin2/bootstrap/includes/save_buttons.html index 2f5a25f..bd90f8b 100644 --- a/djadmin2/templates/djadmin2/bootstrap/includes/save_buttons.html +++ b/djadmin2/templates/djadmin2/bootstrap/includes/save_buttons.html @@ -1,6 +1,16 @@ -{% load i18n %} -
- - - -
\ No newline at end of file +{% load admin2_tags i18n %} +
+
+ {% if object %} + + + {% trans "Delete" %} + + {% endif %} +
+ + + +
+
+
diff --git a/djadmin2/templates/djadmin2/bootstrap/model_update_form.html b/djadmin2/templates/djadmin2/bootstrap/model_update_form.html index 26fc4bc..b47fce2 100644 --- a/djadmin2/templates/djadmin2/bootstrap/model_update_form.html +++ b/djadmin2/templates/djadmin2/bootstrap/model_update_form.html @@ -43,17 +43,7 @@
{% if view.model_admin.save_on_top %} -
-
- {% if object %} - - - {% trans "Delete" %} - - {% endif %} - {% include "djadmin2/bootstrap/includes/save_buttons.html" %} -
-
+ {% include "djadmin2/bootstrap/includes/save_buttons.html" %} {% endif %}
@@ -110,17 +100,7 @@
{% if view.model_admin.save_on_bottom %} -
-
- {% if object %} - - - {% trans "Delete" %} - - {% endif %} - {% include "djadmin2/bootstrap/includes/save_buttons.html" %} -
-
+ {% include "djadmin2/bootstrap/includes/save_buttons.html" %} {% endif %}