From 5aafa36d2ab68a50601a914cbfe2b4447b31da59 Mon Sep 17 00:00:00 2001 From: Harry Bridge Date: Thu, 31 Jan 2019 20:03:49 +0000 Subject: [PATCH] Tidy up logic for which links to show, made comments duplicate --- templates/asset_update.html | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/templates/asset_update.html b/templates/asset_update.html index fd6333e8..14716fd4 100644 --- a/templates/asset_update.html +++ b/templates/asset_update.html @@ -7,14 +7,16 @@ {% block main %}

- Asset - {% if object.id %} - | {{ object.asset_id }} + {% if edit and object %} + Edit Asset | {{ object.asset_id }} {% elif duplicate %} - Duplication of {{ object.asset_id }} + Duplication of Asset | {{ previous_asset_id }} + {% elif not object %} + Create Asset {% else %} - Create + Asset | {{ object.asset_id }} {% endif %} +

@@ -27,22 +29,22 @@
- {% if edit %} - {# #} + {% if edit and object %} + - {% if object.pk %} - Duplicate - {% endif %} + Duplicate + Delete {% elif duplicate %} + - Cancel + Cancel + {% elif not object %} + + {% else %} + Edit - Duplicate - {% endif %} - {% if object and not duplicate %} + Duplicate Delete {% endif %}
@@ -313,7 +315,7 @@