Skip to content
Snippets Groups Projects
Commit ee308a2f authored by xaralis's avatar xaralis Committed by jan.bednarik
Browse files

feat(district): allow customize initial zoom for geo feature detail

parent a336128d
No related branches found
No related tags found
2 merge requests!522Release,!519Geo feature collection minor fixes & improvements
Pipeline #8246 passed
# Generated by Django 4.0.4 on 2022-05-26 09:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("district", "0076_districtgeofeaturecollectionpage_content_after_and_more"),
]
operations = [
migrations.AddField(
model_name="districtgeofeaturedetailpage",
name="initial_zoom",
field=models.IntegerField(default=15, verbose_name="Výchozí zoom"),
),
]
......@@ -1405,7 +1405,7 @@ class DistrictGeoFeatureCollectionPage(
MultiFieldPanel(
[
FieldPanel("perex"),
FieldPanel("hero_cta_buttons"),
StreamFieldPanel("hero_cta_buttons"),
StreamFieldPanel("content"),
StreamFieldPanel("content_after"),
ImageChooserPanel("logo_image"),
......@@ -1571,6 +1571,12 @@ class DistrictGeoFeatureDetailPage(
verbose_name="Obsah",
blank=True,
)
initial_zoom = models.IntegerField(
"Výchozí zoom",
default=15,
null=False,
blank=False,
)
sort_order = models.IntegerField(
"Index řazení",
null=True,
......@@ -1594,7 +1600,13 @@ class DistrictGeoFeatureDetailPage(
],
"Základní informace",
),
MultiFieldPanel(
[
FieldPanel("geojson"),
FieldPanel("initial_zoom"),
],
"Mapka",
),
PageChooserPanel("guarantor"),
FieldPanel("sort_order"),
]
......
......@@ -74,7 +74,7 @@
data-display-zoom-control="false"
data-display-legend="false"
data-display-popups="false"
data-initial-zoom="15"
data-initial-zoom="{{ page.initial_zoom }}"
data-tile-server-config="{{ js_map.tile_server_config }}"
data-tile-style="{{ js_map.style }}"
data-categories="{{ js_map.categories }}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment