summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/gis/openlayers-osm.html2
-rw-r--r--ishtar_common/templates/ishtar/blocks/sheet_geographic.html4
-rw-r--r--ishtar_common/templates/ishtar/forms/geo_form.html10
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> &nbsp;{% 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 %}