From 7f2c4d2f18bd82ab3dabb2771f2cd8cecc26cca7 Mon Sep 17 00:00:00 2001 From: Tom Price Date: Thu, 22 Jan 2015 19:12:01 +0000 Subject: [PATCH] Improved Event UI --- RIGS/templates/RIGS/event_detail.html | 8 +++-- RIGS/templates/RIGS/event_form.html | 43 +++++++++++++++++---------- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/RIGS/templates/RIGS/event_detail.html b/RIGS/templates/RIGS/event_detail.html index a28240ba..5d3eb9e9 100644 --- a/RIGS/templates/RIGS/event_detail.html +++ b/RIGS/templates/RIGS/event_detail.html @@ -5,7 +5,7 @@ {% block content %}
-

N{{ object.pk|stringformat:"05d" }}

+

Event {% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %}{{ object.pk }}{% endif %}

@@ -13,7 +13,7 @@ class="glyphicon glyphicon-edit"> -
@@ -111,6 +111,8 @@ class="glyphicon glyphicon-edit"> +
@@ -133,6 +135,8 @@ class="glyphicon glyphicon-edit"> +
Last edited at {{ object.last_edited_at|date:"SHORT_DATETIME_FORMAT" }} by {{ object.last_edited_by }}.
diff --git a/RIGS/templates/RIGS/event_form.html b/RIGS/templates/RIGS/event_form.html index b2e8ccad..9349463b 100644 --- a/RIGS/templates/RIGS/event_form.html +++ b/RIGS/templates/RIGS/event_form.html @@ -2,7 +2,8 @@ {% load widget_tweaks %} {% load static %} {% load multiply from filters %} -{% block title %}{% if object.pk %}Event {{ object.pk }}{% else %}New Event{% endif %}{% endblock %} +{% block title %}{% if object.pk %}Event {% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %} + {{ object.pk }}{% endif %}{% else %}New Event{% endif %}{% endblock %} {% block css %} @@ -69,15 +70,25 @@ {% endblock %} {% block content %} -

- {% if object.pk %} - Event {{ object.pk }} - {% else %} - New Event - {% endif %} -

- {% include 'form_errors.html' %}
{% csrf_token %} +
+
+

+ {% if object.pk %} + Event N{{ object.pk|stringformat:"05d" }} + {% else %} + New Event + {% endif %} +

+
+
+
+ +
+
+
+ {% include 'form_errors.html' %} {% render_field form.is_rig style="display: none" %} @@ -306,16 +317,16 @@ -
-
-
- -
-
-
+
+
+ +
+