summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/blocks/sheet_geo_items.html
blob: 36fbabfcf7af83687014348d03b256b1fb2701c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{% load i18n window_field %}{% if PROFILE.mapping %}
{% if geo_item.point_2d or geo_item.multi_polygon %}
<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>
            {% if geo_item.SLUG == "operation" %}
            <option id="disp-context-records" value="contextrecords">{% trans "Context records" %}</option>
            <option value="basefinds">{% trans "Everything" %}</option>
            {% else %}
            <option value="basefinds">{% trans "Base finds" %}</option>
            {% endif %}
        </select>
    </dd>
    <dd>
        <label for="get-polygons" id="label-get-polygons">{% trans "Geometry: " %}</label>
        <select name="get-polygons" id="get-polygons">
            <option value="polygons" selected="selected">{% trans "Display polygons" %}</option>
            <option value="points">{% trans "Display points" %}</option>
        </select>
    </dd>
</dl>
<script>
var hide_get_polygons = function() {
    const disp = $("#display-geo-items");
    const get_poly = $("#get-polygons");
    const label = $("#label-get-polygons");
    get_poly.hide();
    label.hide();
    disp.change( function () {
        if (disp.val() === "") {
            get_poly.hide();
            label.hide();
        } else { get_poly.show();
            label.show();}
    })
}
hide_get_polygons();
</script>
{% endif %}
{% endif %}