From d9227ddb0b356951e9db6b0310b4bfe20add89a5 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 18 Aug 2016 19:44:02 +0200 Subject: Finds: add creation date, creator, modification date, modifier to sheet (refs #3062) --- .../templates/ishtar/sheet_find.html | 25 +++++++++++++++++++++- .../templates/ishtar/sheet_operation.html | 2 +- ishtar_common/models.py | 7 ++++++ 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index 57ed7e662..33c884db3 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -32,7 +32,18 @@ {% field_li "Free-ID" item.label %} {% field_li "Previous ID" item.previous_id %} {% field_li "Description" item.description %} -{% field_li "Created by" item.history_creator.ishtaruser.full_label %} +{% with item.history_creation_date|date:"SHORT_DATETIME_FORMAT" as creation_date %} +{% with item.history_creator.ishtaruser.full_label|add:"
"|add:creation_date|add:"" as creator %} +{% field_li "Created by" creator|safe %} +{% endwith %} +{% endwith %} +{% if item.history_creation_date != item.last_edition_date %} +{% with item.last_edition_date|date:"SHORT_DATETIME_FORMAT" as edition_date %} +{% with item.history_modifier.ishtaruser.full_label|add:"
"|add:edition_date|add:"" as modifier %} +{% field_li "Last modified by" modifier|safe %} +{% endwith %} +{% endwith %} +{% endif %} {% field_li "Administrative index" item.administrative_index %} {% field_li_multiple "Material types" item.material_types %} {% field_li "Dating" item.dating %} @@ -123,6 +134,18 @@