summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/templates
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_warehouse/templates')
-rw-r--r--archaeological_warehouse/templates/ishtar/sheet_container.html15
1 files changed, 8 insertions, 7 deletions
diff --git a/archaeological_warehouse/templates/ishtar/sheet_container.html b/archaeological_warehouse/templates/ishtar/sheet_container.html
index 686bd08ff..737be11f6 100644
--- a/archaeological_warehouse/templates/ishtar/sheet_container.html
+++ b/archaeological_warehouse/templates/ishtar/sheet_container.html
@@ -109,22 +109,23 @@
{% if item.responsibility != item.location %}
{% field_flex_detail "Responsibility" item.responsibility %}
{% endif %}
- {% include "ishtar/blocks/sheet_creation_section.html" %}
{% field_flex "Old reference" item.old_reference %}
- {% if item.get_calculated_weight_percent > 5 %}
- <div class="alert alert-warning" role="alert">
+ {% with calculated_weight_percent=item.get_calculated_weight_percent%}
+ {% if calculated_weight_percent > 10 or calculated_weight_percent < -10 %}
+ <div class="alert alert-warning col-12" role="alert">
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> &nbsp;
- {% trans "Calculated weight is bigger than entered weight (over 5%)." %}
+ {% trans "Calculated weight and measured weight are too different (over 10%)." %}
</div>
- {% field_flex "Weight (g)" item.weight %}
+ {% field_flex "Measured weight (g)" item.weight %}
{% field_flex "Calculated weight (g)" item.calculated_weight %}
{% else %}
{% if item.weight %}
- {% field_flex "Weight (g)" item.weight %}
+ {% field_flex "Measured weight (g)" item.weight %}
{% elif item.calculated_weight %}
{% field_flex "Calculated weight (g)" item.calculated_weight %}
{% endif %}
- {% endif %}
+ {% endif %}{% endwith %}
+ {% include "ishtar/blocks/sheet_creation_section.html" %}
{% field_flex_full "Comment" item.comment "<pre>" "</pre>" %}
{% include "ishtar/blocks/sheet_json.html" %}
</div>