diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-06-08 12:10:44 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-12 12:21:01 +0100 |
| commit | f4bbccb5214ff0dd2cbd7bc76973f64c06fc9509 (patch) | |
| tree | fe6e7dbda13a8aef85247aba058b3231af890f96 /ishtar_common/templates | |
| parent | fcdab311103db69b15589e07354a8e91aec64c67 (diff) | |
| download | Ishtar-f4bbccb5214ff0dd2cbd7bc76973f64c06fc9509.tar.bz2 Ishtar-f4bbccb5214ff0dd2cbd7bc76973f64c06fc9509.zip | |
Geodata - geoforms: manage large number of related items - fix zoom - better + button
Diffstat (limited to 'ishtar_common/templates')
| -rw-r--r-- | ishtar_common/templates/gis/openlayers-osm.html | 2 | ||||
| -rw-r--r-- | ishtar_common/templates/ishtar/blocks/sheet_geographic.html | 4 | ||||
| -rw-r--r-- | ishtar_common/templates/ishtar/forms/geo_form.html | 10 |
3 files changed, 15 insertions, 1 deletions
diff --git a/ishtar_common/templates/gis/openlayers-osm.html b/ishtar_common/templates/gis/openlayers-osm.html index 404ab5708..a6797a580 100644 --- a/ishtar_common/templates/gis/openlayers-osm.html +++ b/ishtar_common/templates/gis/openlayers-osm.html @@ -19,5 +19,7 @@ $(document).ready(function() { let layer_extent = features[0].getGeometry().getExtent().slice(0); features.forEach(function(feature){ ol.extent.extend(layer_extent, feature.getGeometry().getExtent())}); {{ module }}.map.getView().fit(layer_extent, {{ module }}.map.getSize()); + let current_zoom = {{ module }}.map.getView().getZoom(); + if ({{ module }}.map.getView().getZoom() > 18) {{ module }}.map.getView().setZoom(18); }); {% endblock %} diff --git a/ishtar_common/templates/ishtar/blocks/sheet_geographic.html b/ishtar_common/templates/ishtar/blocks/sheet_geographic.html index 709186c1e..d1ac63815 100644 --- a/ishtar_common/templates/ishtar/blocks/sheet_geographic.html +++ b/ishtar_common/templates/ishtar/blocks/sheet_geographic.html @@ -28,5 +28,7 @@ {% endfor %} </table> {% if permission_change_geo %} -<a href="{% url 'create-pre-geo' item.app_label item.model_name item.pk %}"><i class="fa fa-pencil"></i></a> +<div class="text-center"> + <a class="btn btn-success" href="{% url 'create-pre-geo' item.app_label item.model_name item.pk %}"><i class="fa fa-plus"></i> {% trans "geo item" %}</a> +</div> {% endif %} diff --git a/ishtar_common/templates/ishtar/forms/geo_form.html b/ishtar_common/templates/ishtar/forms/geo_form.html new file mode 100644 index 000000000..d09ae22d8 --- /dev/null +++ b/ishtar_common/templates/ishtar/forms/geo_form.html @@ -0,0 +1,10 @@ +{% extends "ishtar/forms/base_related_items.html" %} +{% load i18n %} +{% block form_head %} +{{ block.super }} +{% if form.too_many %} +<div class="alert alert-warning"> + {% trans "Many items are attached to this geographic item. Only the ten first of each type are displayed in this form." %} +</div> +{% endif %} +{% endblock %} |
