From 7137bd6475a789f67d42692467ca8b34b0a678ee Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 29 May 2018 17:54:24 +0200 Subject: Better display of json fields on sheet --- archaeological_finds/templates/ishtar/sheet_find.html | 4 ++-- ishtar_common/templates/ishtar/blocks/sheet_json.html | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index 092d0fc1e..f22c17137 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -195,14 +195,14 @@ {% endif %} -{% include "ishtar/blocks/sheet_json.html" %} - {% if item.dating or item.dating_comment %}

{% trans "Dating" %}

{% field_flex "Dating" item.dating %} {% field_flex_full "Comment on dating" item.dating_comment "
" "
" %} {% endif %} +{% include "ishtar/blocks/sheet_json.html" %} + {% if item.container %}

{% trans "Warehouse"%}

diff --git a/ishtar_common/templates/ishtar/blocks/sheet_json.html b/ishtar_common/templates/ishtar/blocks/sheet_json.html index 6aaf4bae7..8927eb057 100644 --- a/ishtar_common/templates/ishtar/blocks/sheet_json.html +++ b/ishtar_common/templates/ishtar/blocks/sheet_json.html @@ -1,8 +1,6 @@ {% load i18n window_field %} {% for json_section, json_fields in item.json_sections %} -{% if json_section %} -

{{json_section}}

-{% endif %} +

{% if json_section %}{{json_section}}{% else %}{% trans "Data" %}{% endif %}

{% for label, value in json_fields %} {% if forloop.first %}
{% endif %} {% field_flex label value %} -- cgit v1.2.3