summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/blocks/sheet_geo_items.html
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates/ishtar/blocks/sheet_geo_items.html')
-rw-r--r--ishtar_common/templates/ishtar/blocks/sheet_geo_items.html60
1 files changed, 41 insertions, 19 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/sheet_geo_items.html b/ishtar_common/templates/ishtar/blocks/sheet_geo_items.html
index 99fc7b866..3d76a5aa5 100644
--- a/ishtar_common/templates/ishtar/blocks/sheet_geo_items.html
+++ b/ishtar_common/templates/ishtar/blocks/sheet_geo_items.html
@@ -3,39 +3,61 @@
<dl class="col-12">
<dt>{% trans "Display geo items" %}</dt>
<dd>
- <label for="display-geo-items">{% trans "Display associated features: " %}</label>
- <select name="display-geo-items" id="display-geo-items">
- <option value="" selected="selected">{% trans "None" %}</option>
+ <fieldset>
{% if geo_item.SLUG == "operation" %}
- <option id="disp-context-records" value="contextrecords">{% trans "Context records" %}</option>
- <option value="basefinds">{% trans "Everything" %}</option>
+ <input type="checkbox" name="display-cr-for-ope" id="display-cr-for-ope">
+ <label for="display-cr-for-ope">{% trans "Display context records" %}</label>
+ <input type="checkbox" name="display-bf-for-ope" id="display-bf-for-ope">
+ <label for="display-bf-for-ope">{% trans "Display base finds" %}</label>
{% else %}
- <option value="basefinds">{% trans "Base finds" %}</option>
+ <input type="checkbox" name="display-bf-for-cr" id="display-bf-for-cr">
+ <label for="display-bf-for-cr">{% trans "Display base finds" %}</label>
{% endif %}
- </select>
+ </fieldset>
</dd>
<dd>
- <label for="get-polygons" id="label-get-polygons">{% trans "Geometry: " %}</label>
- <select name="get-polygons" id="get-polygons">
+ {% if geo_item.SLUG == "operation" %}
+ <label for="get-poly-ope" id="label-get-poly-ope">{% trans "Geometry: " %}</label>
+ <select name="get-poly-ope" id="get-poly-ope">
+ <option value="polygons" selected="selected">{% trans "Display polygons" %}</option>
+ <option value="points">{% trans "Display points" %}</option>
+ </select>
+ {% else %}
+ <label for="get-poly-cr" id="label-get-poly-cr">{% trans "Geometry: " %}</label>
+ <select name="get-poly-cr" id="get-poly-cr">
<option value="polygons" selected="selected">{% trans "Display polygons" %}</option>
<option value="points">{% trans "Display points" %}</option>
</select>
+ {% endif %}
</dd>
</dl>
<script>
-var hide_get_polygons = function() {
- var disp = $("#display-geo-items");
- var get_poly = $("#get-polygons");
- var label = $("#label-get-polygons");
+const hide_get_polygons = function() {
+ {% if geo_item.SLUG == "operation" %}
+ const disp_cr = $("#display-cr-for-ope");
+ const disp_bf = $("#display-bf-for-ope");
+ const get_poly = $("#get-poly-ope");
+ const label = $("#label-get-poly-ope");
+ {% else %}
+ const disp_cr = null;
+ const disp_bf = $("#display-bf-for-cr");
+ const get_poly = $("#get-poly-cr");
+ const label = $("#label-get-poly-cr");
+ {% endif %}
get_poly.hide();
label.hide();
- disp.change( function () {
- if (disp.val() === "") {
+ const display_get_poly = function () {
+ if (disp_bf.prop('checked') || ((disp_cr != null) && disp_cr.prop('checked'))) {
+ get_poly.show();
+ label.show();
+ } else {
get_poly.hide();
- label.hide();
- } else { get_poly.show();
- label.show();}
- })
+ label.hide();}
+ }
+ if (disp_cr != null) {
+ disp_cr.change( display_get_poly );
+ }
+ disp_bf.change( display_get_poly )
}
hide_get_polygons();