Compare commits

..

No commits in common. "740c09ce6d7e31bcdf1287b82dfffed947f5644d" and "0a30530a3e97bfd4ff654794e5981dca7987b6c1" have entirely different histories.

22 changed files with 304 additions and 352 deletions

View file

@ -1,5 +1,5 @@
# Force rtfd to use a recent version of mkdocs # Force rtfd to use a recent version of mkdocs
mkdocs==1.6.0 mkdocs==1.6.0
pymdown-extensions==10.8.1 pymdown-extensions==10.8.1
mkdocs-material==9.5.23 mkdocs-material==9.5.21
mkdocs-static-i18n==1.2.3 mkdocs-static-i18n==1.2.3

View file

@ -22,7 +22,7 @@ You can import icons manually by going to your uMap admin page: `https://your.se
## Import icons automatically ## Import icons automatically
To import icons on your uMap server, you will need to use the command `umap import_pictograms` (making sure the virtualenv is active). To import icons on your uMap server, you will need to use the command `umap import_pictograms`.
Note: you can get help with `umap import_pictograms -h` Note: you can get help with `umap import_pictograms -h`

View file

@ -27,8 +27,6 @@ services:
volumes: volumes:
- umap_userdata:/srv/umap/uploads - umap_userdata:/srv/umap/uploads
# FIX the path on the left, below, to your location # FIX the path on the left, below, to your location
# OPTIONAL, you can comment the line below out for default
# values to apply
- /home/ubuntu/umap.conf:/etc/umap/umap.conf - /home/ubuntu/umap.conf:/etc/umap/umap.conf
restart: always restart: always
depends_on: depends_on:
@ -44,8 +42,3 @@ Note that youll have to set a [`SECRET_KEY`](https://docs.djangoproject.com/e
```sh ```sh
$ python3 -c 'import secrets; print(secrets.token_hex(100))' $ python3 -c 'import secrets; print(secrets.token_hex(100))'
``` ```
User accounts can be managed via the Django admin page ({SITE_URL}/admin). The required superuser must be created on the container command line with this command:
```bash
umap createsuperuser
```

View file

@ -1,5 +1,5 @@
# Force rtfd to use a recent version of mkdocs # Force rtfd to use a recent version of mkdocs
mkdocs==1.6.0 mkdocs==1.6.0
pymdown-extensions==10.8.1 pymdown-extensions==10.8.1
mkdocs-material==9.5.23 mkdocs-material==9.5.21
mkdocs-static-i18n==1.2.3 mkdocs-static-i18n==1.2.3

View file

@ -47,7 +47,7 @@ dev = [
"ruff==0.4.3", "ruff==0.4.3",
"djlint==1.34.1", "djlint==1.34.1",
"mkdocs==1.6.0", "mkdocs==1.6.0",
"mkdocs-material==9.5.23", "mkdocs-material==9.5.21",
"mkdocs-static-i18n==1.2.3", "mkdocs-static-i18n==1.2.3",
"vermin==1.6.0", "vermin==1.6.0",
"pymdown-extensions==10.8.1", "pymdown-extensions==10.8.1",

View file

@ -1 +1 @@
VERSION = "2.3.1" VERSION = "2.3.0"

Binary file not shown.

View file

@ -7,7 +7,7 @@
# Daniel Koć <daniel@xn--ko-wla.pl>, 2015 # Daniel Koć <daniel@xn--ko-wla.pl>, 2015
# endro, 2016 # endro, 2016
# endro, 2015-2016 # endro, 2015-2016
# Krzysztof Chorzempa, 2023-2024 # Krzysztof Chorzempa, 2023
# Maciej Kowalik <m.kowalik.79@gmail.com>, 2016 # Maciej Kowalik <m.kowalik.79@gmail.com>, 2016
# maro21 OSM, 2020-2021 # maro21 OSM, 2020-2021
# Piotr Strębski <strebski@gmail.com>, 2020 # Piotr Strębski <strebski@gmail.com>, 2020
@ -17,9 +17,9 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: uMap\n" "Project-Id-Version: uMap\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-04-24 19:16+0000\n" "POT-Creation-Date: 2024-02-15 13:53+0000\n"
"PO-Revision-Date: 2013-11-22 14:00+0000\n" "PO-Revision-Date: 2013-11-22 14:00+0000\n"
"Last-Translator: Krzysztof Chorzempa, 2023-2024\n" "Last-Translator: Bartosz Racławski <bartosz.raclawski@openstreetmap.pl>, 2023\n"
"Language-Team: Polish (http://app.transifex.com/openstreetmap/umap/language/pl/)\n" "Language-Team: Polish (http://app.transifex.com/openstreetmap/umap/language/pl/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -35,115 +35,115 @@ msgstr "Edycja możliwa tylko z sekretnym odnośnikiem"
msgid "Everyone can edit" msgid "Everyone can edit"
msgstr "Wszyscy mogą edytować" msgstr "Wszyscy mogą edytować"
#: forms.py:69 models.py:384 #: forms.py:69 models.py:371
msgid "Inherit" msgid "Inherit"
msgstr "Odziedzicz" msgstr ""
#: middleware.py:13 #: middleware.py:13
msgid "Site is readonly for maintenance" msgid "Site is readonly for maintenance"
msgstr "Strona jest w trybie tylko do odczytu z powodu prac konserwacyjnych" msgstr "Strona jest w trybie tylko do odczytu z powodu prac konserwacyjnych"
#: models.py:53 #: models.py:50
msgid "name" msgid "name"
msgstr "nazwa" msgstr "nazwa"
#: models.py:84 #: models.py:81
msgid "details" msgid "details"
msgstr "szczegóły" msgstr "szczegóły"
#: models.py:85 #: models.py:82
msgid "Link to a page where the licence is detailed." msgid "Link to a page where the licence is detailed."
msgstr "Odnośnik do strony ze szczegółowym opisem licencji." msgstr "Odnośnik do strony ze szczegółowym opisem licencji."
#: models.py:95 #: models.py:92
msgid "URL template using OSM tile format" msgid "URL template using OSM tile format"
msgstr "Szablon URL używający formatu kafelków OSM" msgstr "Szablon URL używający formatu kafelków OSM"
#: models.py:101 #: models.py:98
msgid "Order of the tilelayers in the edit box" msgid "Order of the tilelayers in the edit box"
msgstr "Kolejność podkładów w oknie edycji" msgstr "Kolejność podkładów w oknie edycji"
#: models.py:147 models.py:385 #: models.py:144 models.py:372
msgid "Everyone" msgid "Everyone"
msgstr "Każdy" msgstr "Każdy"
#: models.py:148 models.py:154 models.py:386 #: models.py:145 models.py:151 models.py:373
msgid "Editors only" msgid "Editors only"
msgstr "Tylko edytorzy" msgstr "Tylko edytorzy"
#: models.py:149 models.py:387 #: models.py:146 models.py:374
msgid "Owner only" msgid "Owner only"
msgstr "Tylko właściciel" msgstr "Tylko właściciel"
#: models.py:152 #: models.py:149
msgid "Everyone (public)" msgid "Everyone (public)"
msgstr "Każdy (publiczne)" msgstr "Każdy (publiczne)"
#: models.py:153 #: models.py:150
msgid "Anyone with link" msgid "Anyone with link"
msgstr "Każdy z linkiem" msgstr "Każdy z linkiem"
#: models.py:155 #: models.py:152
msgid "Blocked" msgid "Blocked"
msgstr "Zablokowane" msgstr "Zablokowane"
#: models.py:158 #: models.py:155 models.py:378
msgid "center"
msgstr "środek"
#: models.py:159
msgid "zoom"
msgstr "przybliżenie"
#: models.py:161
msgid "locate"
msgstr "lokalizuj"
#: models.py:161
msgid "Locate user on load?"
msgstr "Lokalizować użytkownika po załadowaniu?"
#: models.py:165
msgid "Choose the map licence."
msgstr "Wybierz licencję mapy."
#: models.py:166
msgid "licence"
msgstr "licencja"
#: models.py:177
msgid "owner"
msgstr "właściciel"
#: models.py:181
msgid "editors"
msgstr "edytorzy"
#: models.py:186 models.py:408
msgid "edit status"
msgstr "status edycji"
#: models.py:191
msgid "share status"
msgstr "udostępnij status"
#: models.py:194 models.py:403
msgid "settings"
msgstr "ustawienia"
#: models.py:325
msgid "Clone of"
msgstr "Kopia"
#: models.py:394
msgid "description" msgid "description"
msgstr "opis" msgstr "opis"
#: models.py:398 #: models.py:156
msgid "center"
msgstr "środek"
#: models.py:157
msgid "zoom"
msgstr "przybliżenie"
#: models.py:159
msgid "locate"
msgstr "lokalizuj"
#: models.py:159
msgid "Locate user on load?"
msgstr "Lokalizować użytkownika po załadowaniu?"
#: models.py:163
msgid "Choose the map licence."
msgstr "Wybierz licencję mapy."
#: models.py:164
msgid "licence"
msgstr "licencja"
#: models.py:175
msgid "owner"
msgstr "właściciel"
#: models.py:179
msgid "editors"
msgstr "edytorzy"
#: models.py:184 models.py:392
msgid "edit status"
msgstr "status edycji"
#: models.py:189
msgid "share status"
msgstr "udostępnij status"
#: models.py:192 models.py:387
msgid "settings"
msgstr "ustawienia"
#: models.py:320
msgid "Clone of"
msgstr "Kopia"
#: models.py:382
msgid "display on load" msgid "display on load"
msgstr "wyświetl po załadowaniu" msgstr "wyświetl po załadowaniu"
#: models.py:399 #: models.py:383
msgid "Display this layer on load." msgid "Display this layer on load."
msgstr "Wyświetl tę warstwę po załadowaniu." msgstr "Wyświetl tę warstwę po załadowaniu."
@ -163,7 +163,7 @@ msgstr "%(current_user)s nie posiada map."
#: templates/auth/user_form.html:6 #: templates/auth/user_form.html:6
msgid "My Maps" msgid "My Maps"
msgstr "Moje Mapy" msgstr ""
#: templates/auth/user_form.html:7 #: templates/auth/user_form.html:7
msgid "My Profile" msgid "My Profile"
@ -299,7 +299,7 @@ msgstr "Zainspiruj się, przejrzyj mapy"
msgid "You are logged in. Continuing..." msgid "You are logged in. Continuing..."
msgstr "Jesteś zalogowany. Kontynuowanie..." msgstr "Jesteś zalogowany. Kontynuowanie..."
#: templates/umap/map_list.html:9 views.py:349 #: templates/umap/map_list.html:9 views.py:341
msgid "by" msgid "by"
msgstr "przez" msgstr "przez"
@ -313,15 +313,15 @@ msgstr "Nazwa"
#: templates/umap/map_table.html:7 #: templates/umap/map_table.html:7
msgid "Preview" msgid "Preview"
msgstr "Podgląd" msgstr ""
#: templates/umap/map_table.html:8 #: templates/umap/map_table.html:8
msgid "Who can see" msgid "Who can see"
msgstr "Kto może zobaczyć" msgstr ""
#: templates/umap/map_table.html:9 #: templates/umap/map_table.html:9
msgid "Who can edit" msgid "Who can edit"
msgstr "Kto może edytować" msgstr ""
#: templates/umap/map_table.html:10 #: templates/umap/map_table.html:10
msgid "Last save" msgid "Last save"
@ -335,60 +335,60 @@ msgstr "Właściciel"
msgid "Actions" msgid "Actions"
msgstr "Akcje" msgstr "Akcje"
#: templates/umap/map_table.html:26 templates/umap/map_table.html:28 #: templates/umap/map_table.html:25 templates/umap/map_table.html:27
msgid "Open preview" msgid "Open preview"
msgstr "Otwórz podgląd" msgstr ""
#: templates/umap/map_table.html:48 templates/umap/map_table.html:50 #: templates/umap/map_table.html:46 templates/umap/map_table.html:48
msgid "Share" msgid "Share"
msgstr "Udostępnij" msgstr "Udostępnij"
#: templates/umap/map_table.html:54 templates/umap/map_table.html:56 #: templates/umap/map_table.html:51 templates/umap/map_table.html:53
msgid "Edit" msgid "Edit"
msgstr "Edytuj" msgstr "Edytuj"
#: templates/umap/map_table.html:60 templates/umap/map_table.html:62 #: templates/umap/map_table.html:56 templates/umap/map_table.html:58
msgid "Download" msgid "Download"
msgstr "Pobierz" msgstr "Pobierz"
#: templates/umap/map_table.html:66 templates/umap/map_table.html:68 #: templates/umap/map_table.html:63 templates/umap/map_table.html:65
msgid "Clone" msgid "Clone"
msgstr "Skopiuj" msgstr ""
#: templates/umap/map_table.html:77 templates/umap/map_table.html:79 #: templates/umap/map_table.html:73 templates/umap/map_table.html:75
msgid "Delete" msgid "Delete"
msgstr "Usuń" msgstr ""
#: templates/umap/map_table.html:93 #: templates/umap/map_table.html:88
msgid "first" msgid "first"
msgstr "pierwszy" msgstr ""
#: templates/umap/map_table.html:94 #: templates/umap/map_table.html:89
msgid "previous" msgid "previous"
msgstr "poprzedni" msgstr ""
#: templates/umap/map_table.html:102 #: templates/umap/map_table.html:98
#, python-format #, python-format
msgid "Page %(maps_number)s of %(num_pages)s" msgid "Page %(maps_number)s of %(num_pages)s"
msgstr "Strona %(maps_number)s. z %(num_pages)s" msgstr ""
#: templates/umap/map_table.html:107 #: templates/umap/map_table.html:104
msgid "next" msgid "next"
msgstr "" msgstr ""
#: templates/umap/map_table.html:108 #: templates/umap/map_table.html:105
msgid "last" msgid "last"
msgstr "" msgstr ""
#: templates/umap/map_table.html:116 #: templates/umap/map_table.html:113
#, python-format #, python-format
msgid "Lines per page: %(per_page)s" msgid "Lines per page: %(per_page)s"
msgstr "" msgstr ""
#: templates/umap/map_table.html:121 #: templates/umap/map_table.html:118
#, python-format #, python-format
msgid "%(count)s maps" msgid "%(count)s maps"
msgstr "%(count)s map" msgstr ""
#: templates/umap/navigation.html:10 templates/umap/user_dashboard.html:4 #: templates/umap/navigation.html:10 templates/umap/user_dashboard.html:4
msgid "My Dashboard" msgid "My Dashboard"
@ -481,83 +481,78 @@ msgstr "Znajdź mapy"
msgid "Search" msgid "Search"
msgstr "Szukaj" msgstr "Szukaj"
#: templates/umap/user_dashboard.html:7 templates/umap/user_dashboard.html:27 #: templates/umap/user_dashboard.html:7 templates/umap/user_dashboard.html:26
msgid "Search my maps" msgid "Search my maps"
msgstr "Przeszukaj moje mapy" msgstr "Przeszukaj moje mapy"
#: templates/umap/user_dashboard.html:10 #: templates/umap/user_dashboard.html:11
#, python-format #, python-format
msgid "My Maps (%(count)s)" msgid "My Maps (%(count)s)"
msgstr "Moje Mapy (%(count)s)" msgstr ""
#: templates/umap/user_dashboard.html:12 #: templates/umap/user_dashboard.html:13
msgid "My profile" msgid "My profile"
msgstr "Mój profil" msgstr "Mój profil"
#: templates/umap/user_dashboard.html:20 templates/umap/user_dashboard.html:24 #: templates/umap/user_dashboard.html:21 templates/umap/user_dashboard.html:23
msgid "Maps title" msgid "Maps title"
msgstr "Nazwa mapy" msgstr ""
#: templates/umap/user_dashboard.html:32 #: templates/umap/user_dashboard.html:32
#, python-format #, python-format
msgid "Download %(count)s maps" msgid "Download %(count)s maps"
msgstr "Pobierz %(count)s map" msgstr ""
#: templates/umap/user_dashboard.html:42 #: templates/umap/user_dashboard.html:42
msgid "You have no map yet." msgid "You have no map yet."
msgstr "Nie masz jeszcze żadnej mapy." msgstr "Nie masz jeszcze żadnej mapy."
#: views.py:354 #: views.py:346
msgid "View the map" msgid "View the map"
msgstr "Zobacz mapę" msgstr "Zobacz mapę"
#: views.py:716 #: views.py:704
msgid "See full screen" msgid "See full screen"
msgstr "" msgstr ""
#: views.py:817 #: views.py:803
msgid "Map editors updated with success!" msgid "Map editors updated with success!"
msgstr "Edytorzy mapy zaktualizowani pomyślnie!" msgstr "Edytorzy mapy zaktualizowani pomyślnie!"
#: views.py:854 #: views.py:841
#, python-format #, python-format
msgid "The uMap edit link for your map: %(map_name)s" msgid "The uMap edit link for your map: %(map_name)s"
msgstr "Link uMap do edytowania twojej mapy: %(map_name)s" msgstr "Link uMap do edytowania twojej mapy: %(map_name)s"
#: views.py:857 #: views.py:844
#, python-format #, python-format
msgid "Here is your secret edit link: %(link)s" msgid "Here is your secret edit link: %(link)s"
msgstr "Oto twój sekretny link do edycji: %(link)s" msgstr "Oto twój sekretny link do edycji: %(link)s"
#: views.py:864 #: views.py:850
#, python-format
msgid "Can't send email to %(email)s"
msgstr "Nie można wysłać emaila do %(email)s"
#: views.py:867
#, python-format #, python-format
msgid "Email sent to %(email)s" msgid "Email sent to %(email)s"
msgstr "Email wysłany do %(email)s" msgstr "Email wysłany do %(email)s"
#: views.py:878 #: views.py:861
msgid "Only its owner can delete the map." msgid "Only its owner can delete the map."
msgstr "Tylko właściciel może usunąć mapę." msgstr "Tylko właściciel może usunąć mapę."
#: views.py:906 #: views.py:889
#, python-format #, python-format
msgid "" msgid ""
"Your map has been cloned! If you want to edit this map from another " "Your map has been cloned! If you want to edit this map from another "
"computer, please use this link: %(anonymous_url)s" "computer, please use this link: %(anonymous_url)s"
msgstr "Twoja mapa została skopiowana! Jeśli chcesz edytować ją z innego komputera, użyj odnośnika: %(anonymous_url)s" msgstr "Twoja mapa została skopiowana! Jeśli chcesz edytować ją z innego komputera, użyj odnośnika: %(anonymous_url)s"
#: views.py:911 #: views.py:894
msgid "Congratulations, your map has been cloned!" msgid "Congratulations, your map has been cloned!"
msgstr "Gratulacje, twoja mapa została skopiowana!" msgstr "Gratulacje, twoja mapa została skopiowana!"
#: views.py:1146 #: views.py:1130
msgid "Layer successfully deleted." msgid "Layer successfully deleted."
msgstr "Warstwa usunięta pomyślnie." msgstr "Warstwa usunięta pomyślnie."
#: views.py:1168 #: views.py:1152
msgid "Permissions updated with success!" msgid "Permissions updated with success!"
msgstr "Pomyślnie zaktualizowano uprawnienia!" msgstr ""

Binary file not shown.

View file

@ -4,15 +4,14 @@
# #
# Translators: # Translators:
# Joao Ponce de Leao Paulouro <joao.ponceleao@gmail.com>, 2014 # Joao Ponce de Leao Paulouro <joao.ponceleao@gmail.com>, 2014
# lecalam, 2024
# Rui <xymarior@yandex.com>, 2016,2018-2019 # Rui <xymarior@yandex.com>, 2016,2018-2019
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: uMap\n" "Project-Id-Version: uMap\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-04-24 19:16+0000\n" "POT-Creation-Date: 2024-02-15 13:53+0000\n"
"PO-Revision-Date: 2013-11-22 14:00+0000\n" "PO-Revision-Date: 2013-11-22 14:00+0000\n"
"Last-Translator: lecalam, 2024\n" "Last-Translator: Joao Ponce de Leao Paulouro <joao.ponceleao@gmail.com>, 2014\n"
"Language-Team: Portuguese (http://app.transifex.com/openstreetmap/umap/language/pt/)\n" "Language-Team: Portuguese (http://app.transifex.com/openstreetmap/umap/language/pt/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -22,121 +21,121 @@ msgstr ""
#: forms.py:44 forms.py:70 #: forms.py:44 forms.py:70
msgid "Only editable with secret edit link" msgid "Only editable with secret edit link"
msgstr "Unicamente editável através de hiperligação secreta" msgstr "Unicamente editável através de link secreto"
#: forms.py:45 forms.py:71 #: forms.py:45 forms.py:71
msgid "Everyone can edit" msgid "Everyone can edit"
msgstr "Todos podem editar" msgstr "Todos podem editar"
#: forms.py:69 models.py:384 #: forms.py:69 models.py:371
msgid "Inherit" msgid "Inherit"
msgstr "Herdado" msgstr ""
#: middleware.py:13 #: middleware.py:13
msgid "Site is readonly for maintenance" msgid "Site is readonly for maintenance"
msgstr "O site está em modo de leitura para manutenção" msgstr "O site está em modo de leitura para manutenção"
#: models.py:53 #: models.py:50
msgid "name" msgid "name"
msgstr "nome" msgstr "nome"
#: models.py:84 #: models.py:81
msgid "details" msgid "details"
msgstr "detalhes" msgstr "detalhes"
#: models.py:85 #: models.py:82
msgid "Link to a page where the licence is detailed." msgid "Link to a page where the licence is detailed."
msgstr "Hiperligação para uma página detalhando a licença." msgstr "Link para uma página detalhando a licença."
#: models.py:95 #: models.py:92
msgid "URL template using OSM tile format" msgid "URL template using OSM tile format"
msgstr "Modelo de URL no formato de mosaicos OSM" msgstr "Modelo de URL no formato de telas OSM"
#: models.py:101 #: models.py:98
msgid "Order of the tilelayers in the edit box" msgid "Order of the tilelayers in the edit box"
msgstr "Ordem das camadas de mosaicos na caixa de edição" msgstr "Ordem das camadas na caixa de edição"
#: models.py:147 models.py:385 #: models.py:144 models.py:372
msgid "Everyone" msgid "Everyone"
msgstr "Todos" msgstr ""
#: models.py:148 models.py:154 models.py:386 #: models.py:145 models.py:151 models.py:373
msgid "Editors only" msgid "Editors only"
msgstr "Apenas editores" msgstr ""
#: models.py:149 models.py:387 #: models.py:146 models.py:374
msgid "Owner only" msgid "Owner only"
msgstr "Apenas o proprietário" msgstr ""
#: models.py:149
msgid "Everyone (public)"
msgstr ""
#: models.py:150
msgid "Anyone with link"
msgstr ""
#: models.py:152 #: models.py:152
msgid "Everyone (public)"
msgstr "Todos (público)"
#: models.py:153
msgid "Anyone with link"
msgstr "Quem tiver a hiperligação"
#: models.py:155
msgid "Blocked" msgid "Blocked"
msgstr "Bloqueado" msgstr ""
#: models.py:158 #: models.py:155 models.py:378
msgid "center"
msgstr "centro"
#: models.py:159
msgid "zoom"
msgstr "zoom"
#: models.py:161
msgid "locate"
msgstr "localizar"
#: models.py:161
msgid "Locate user on load?"
msgstr "Localizar utilizador no início?"
#: models.py:165
msgid "Choose the map licence."
msgstr "Escolha uma licença para o mapa."
#: models.py:166
msgid "licence"
msgstr "licença"
#: models.py:177
msgid "owner"
msgstr "proprietário"
#: models.py:181
msgid "editors"
msgstr "editores"
#: models.py:186 models.py:408
msgid "edit status"
msgstr "editar estado"
#: models.py:191
msgid "share status"
msgstr "partilhar estado"
#: models.py:194 models.py:403
msgid "settings"
msgstr "parâmetros"
#: models.py:325
msgid "Clone of"
msgstr "Clone de"
#: models.py:394
msgid "description" msgid "description"
msgstr "descrição" msgstr "descrição"
#: models.py:398 #: models.py:156
msgid "center"
msgstr "centro"
#: models.py:157
msgid "zoom"
msgstr "zoom"
#: models.py:159
msgid "locate"
msgstr "localizar"
#: models.py:159
msgid "Locate user on load?"
msgstr "Localizar utilizador no início?"
#: models.py:163
msgid "Choose the map licence."
msgstr "Escolha uma licença para o mapa."
#: models.py:164
msgid "licence"
msgstr "licença"
#: models.py:175
msgid "owner"
msgstr "proprietário"
#: models.py:179
msgid "editors"
msgstr "editores"
#: models.py:184 models.py:392
msgid "edit status"
msgstr "editar estado"
#: models.py:189
msgid "share status"
msgstr "partilhar estado"
#: models.py:192 models.py:387
msgid "settings"
msgstr "parâmetros"
#: models.py:320
msgid "Clone of"
msgstr "Clone de"
#: models.py:382
msgid "display on load" msgid "display on load"
msgstr "mostrar no início" msgstr "mostrar no início"
#: models.py:399 #: models.py:383
msgid "Display this layer on load." msgid "Display this layer on load."
msgstr "Apresentar esta camada ao carregar." msgstr "Apresentar esta camada ao carregar."
@ -147,7 +146,7 @@ msgstr "Ir para a página principal"
#: templates/auth/user_detail.html:5 #: templates/auth/user_detail.html:5
#, python-format #, python-format
msgid "Browse %(current_user)s's maps" msgid "Browse %(current_user)s's maps"
msgstr "Ver mapas de %(current_user)s" msgstr "Consulte os mapas de %(current_user)s"
#: templates/auth/user_detail.html:12 #: templates/auth/user_detail.html:12
#, python-format #, python-format
@ -156,45 +155,45 @@ msgstr "%(current_user)s não tem mapas."
#: templates/auth/user_form.html:6 #: templates/auth/user_form.html:6
msgid "My Maps" msgid "My Maps"
msgstr "Meus mapas" msgstr ""
#: templates/auth/user_form.html:7 #: templates/auth/user_form.html:7
msgid "My Profile" msgid "My Profile"
msgstr "Meu perfil" msgstr ""
#: templates/auth/user_form.html:20 #: templates/auth/user_form.html:20
msgid "Save" msgid "Save"
msgstr "Guardar" msgstr ""
#: templates/auth/user_form.html:25 #: templates/auth/user_form.html:25
msgid "Your current providers" msgid "Your current providers"
msgstr "Os seus fornecedores atuais" msgstr ""
#: templates/auth/user_form.html:31 #: templates/auth/user_form.html:31
msgid "Connect to another provider" msgid "Connect to another provider"
msgstr "Conectar a outro fornecedor" msgstr ""
#: templates/auth/user_form.html:33 #: templates/auth/user_form.html:33
msgid "" msgid ""
"It's a good habit to connect your account to more than one provider, in case" "It's a good habit to connect your account to more than one provider, in case"
" one provider becomes unavailable, temporarily or even permanently." " one provider becomes unavailable, temporarily or even permanently."
msgstr "É um bom hábito conectar a sua conta a mais do que um fornecedor, no caso de um fornecedor ficar indisponível, temporariamente ou mesmo permanentemente." msgstr ""
#: templates/auth/user_stars.html:5 #: templates/auth/user_stars.html:5
#, python-format #, python-format
msgid "Browse %(current_user)s's starred maps" msgid "Browse %(current_user)s's starred maps"
msgstr "Ver mapas com estrela de %(current_user)s's" msgstr ""
#: templates/auth/user_stars.html:12 #: templates/auth/user_stars.html:12
#, python-format #, python-format
msgid "%(current_user)s has no starred maps yet." msgid "%(current_user)s has no starred maps yet."
msgstr "%(current_user)s não tem mapas com estrela." msgstr ""
#: templates/base.html:12 #: templates/base.html:12
msgid "" msgid ""
"uMap lets you create maps with OpenStreetMap layers in a minute and embed " "uMap lets you create maps with OpenStreetMap layers in a minute and embed "
"them in your site." "them in your site."
msgstr "uMap permite-lhe criar mapas com camadas do OpenStreetMap num minuto e incorporá-los no seu site." msgstr ""
#: templates/registration/login.html:16 #: templates/registration/login.html:16
msgid "Please log in with your account" msgid "Please log in with your account"
@ -269,7 +268,7 @@ msgstr "Testar a demo"
msgid "" msgid ""
"This instance of uMap is currently in read only mode, no creation/edit is " "This instance of uMap is currently in read only mode, no creation/edit is "
"allowed." "allowed."
msgstr "Esta instância do uMap está atualmente em modo só de leitura, não sendo permitida a criação/edição." msgstr ""
#: templates/umap/content.html:30 #: templates/umap/content.html:30
#, python-format #, python-format
@ -292,7 +291,7 @@ msgstr "Inspire-se, explore os mapas"
msgid "You are logged in. Continuing..." msgid "You are logged in. Continuing..."
msgstr "Sucesso na identificação. Continuando..." msgstr "Sucesso na identificação. Continuando..."
#: templates/umap/map_list.html:9 views.py:349 #: templates/umap/map_list.html:9 views.py:341
msgid "by" msgid "by"
msgstr "por" msgstr "por"
@ -302,94 +301,94 @@ msgstr "Mais"
#: templates/umap/map_table.html:6 #: templates/umap/map_table.html:6
msgid "Name" msgid "Name"
msgstr "Nome" msgstr ""
#: templates/umap/map_table.html:7 #: templates/umap/map_table.html:7
msgid "Preview" msgid "Preview"
msgstr "Pré-visualizar" msgstr ""
#: templates/umap/map_table.html:8 #: templates/umap/map_table.html:8
msgid "Who can see" msgid "Who can see"
msgstr "Quem pode ver" msgstr ""
#: templates/umap/map_table.html:9 #: templates/umap/map_table.html:9
msgid "Who can edit" msgid "Who can edit"
msgstr "Quem pode editar" msgstr ""
#: templates/umap/map_table.html:10 #: templates/umap/map_table.html:10
msgid "Last save" msgid "Last save"
msgstr "Último guardar" msgstr ""
#: templates/umap/map_table.html:11 #: templates/umap/map_table.html:11
msgid "Owner" msgid "Owner"
msgstr "Proprietário" msgstr ""
#: templates/umap/map_table.html:12 #: templates/umap/map_table.html:12
msgid "Actions" msgid "Actions"
msgstr "Ações" msgstr ""
#: templates/umap/map_table.html:26 templates/umap/map_table.html:28 #: templates/umap/map_table.html:25 templates/umap/map_table.html:27
msgid "Open preview" msgid "Open preview"
msgstr "Abrir pré-visualização" msgstr ""
#: templates/umap/map_table.html:48 templates/umap/map_table.html:50 #: templates/umap/map_table.html:46 templates/umap/map_table.html:48
msgid "Share" msgid "Share"
msgstr "Partilhar" msgstr ""
#: templates/umap/map_table.html:54 templates/umap/map_table.html:56 #: templates/umap/map_table.html:51 templates/umap/map_table.html:53
msgid "Edit" msgid "Edit"
msgstr "Editar" msgstr ""
#: templates/umap/map_table.html:60 templates/umap/map_table.html:62 #: templates/umap/map_table.html:56 templates/umap/map_table.html:58
msgid "Download" msgid "Download"
msgstr "Descarregar" msgstr ""
#: templates/umap/map_table.html:66 templates/umap/map_table.html:68 #: templates/umap/map_table.html:63 templates/umap/map_table.html:65
msgid "Clone" msgid "Clone"
msgstr "Clonar" msgstr ""
#: templates/umap/map_table.html:77 templates/umap/map_table.html:79 #: templates/umap/map_table.html:73 templates/umap/map_table.html:75
msgid "Delete" msgid "Delete"
msgstr "Eliminar" msgstr ""
#: templates/umap/map_table.html:93 #: templates/umap/map_table.html:88
msgid "first" msgid "first"
msgstr "primeiro" msgstr ""
#: templates/umap/map_table.html:94 #: templates/umap/map_table.html:89
msgid "previous" msgid "previous"
msgstr "anterior" msgstr ""
#: templates/umap/map_table.html:102 #: templates/umap/map_table.html:98
#, python-format #, python-format
msgid "Page %(maps_number)s of %(num_pages)s" msgid "Page %(maps_number)s of %(num_pages)s"
msgstr "Página %(maps_number)s de %(num_pages)s" msgstr ""
#: templates/umap/map_table.html:107 #: templates/umap/map_table.html:104
msgid "next" msgid "next"
msgstr "seguinte" msgstr ""
#: templates/umap/map_table.html:108 #: templates/umap/map_table.html:105
msgid "last" msgid "last"
msgstr "+ultimo" msgstr ""
#: templates/umap/map_table.html:116 #: templates/umap/map_table.html:113
#, python-format #, python-format
msgid "Lines per page: %(per_page)s" msgid "Lines per page: %(per_page)s"
msgstr "Linhas por página: %(per_page)s" msgstr ""
#: templates/umap/map_table.html:121 #: templates/umap/map_table.html:118
#, python-format #, python-format
msgid "%(count)s maps" msgid "%(count)s maps"
msgstr "%(count)s mapas" msgstr ""
#: templates/umap/navigation.html:10 templates/umap/user_dashboard.html:4 #: templates/umap/navigation.html:10 templates/umap/user_dashboard.html:4
msgid "My Dashboard" msgid "My Dashboard"
msgstr "O meu painel de controlo" msgstr ""
#: templates/umap/navigation.html:13 #: templates/umap/navigation.html:13
msgid "Starred maps" msgid "Starred maps"
msgstr "Mapas com estrela" msgstr ""
#: templates/umap/navigation.html:17 #: templates/umap/navigation.html:17
msgid "Log in" msgid "Log in"
@ -405,7 +404,7 @@ msgstr "Sobre"
#: templates/umap/navigation.html:24 #: templates/umap/navigation.html:24
msgid "Help" msgid "Help"
msgstr "Ajuda" msgstr ""
#: templates/umap/navigation.html:29 #: templates/umap/navigation.html:29
msgid "Change password" msgid "Change password"
@ -453,17 +452,17 @@ msgstr "A sua palavra-passe foi alterada"
#, python-format #, python-format
msgid "%(count)s map found:" msgid "%(count)s map found:"
msgid_plural "%(count)s maps found:" msgid_plural "%(count)s maps found:"
msgstr[0] "%(count)s mapa encontrado:" msgstr[0] ""
msgstr[1] "%(count)s mapas encontrados:" msgstr[1] ""
msgstr[2] "%(count)s mapas encontrados:" msgstr[2] ""
#: templates/umap/search.html:18 #: templates/umap/search.html:18
msgid "No map found." msgid "No map found."
msgstr "Não foi encontrado nenhum mapa." msgstr ""
#: templates/umap/search.html:21 #: templates/umap/search.html:21
msgid "Latest created maps" msgid "Latest created maps"
msgstr "Últimos mapas criados" msgstr ""
#: templates/umap/search_bar.html:3 #: templates/umap/search_bar.html:3
msgid "Search maps" msgid "Search maps"
@ -473,83 +472,78 @@ msgstr "Procurar mapas"
msgid "Search" msgid "Search"
msgstr "Procurar" msgstr "Procurar"
#: templates/umap/user_dashboard.html:7 templates/umap/user_dashboard.html:27 #: templates/umap/user_dashboard.html:7 templates/umap/user_dashboard.html:26
msgid "Search my maps" msgid "Search my maps"
msgstr "Procurar os meus mapas" msgstr ""
#: templates/umap/user_dashboard.html:10 #: templates/umap/user_dashboard.html:11
#, python-format #, python-format
msgid "My Maps (%(count)s)" msgid "My Maps (%(count)s)"
msgstr "Meus mapas (%(count)s)" msgstr ""
#: templates/umap/user_dashboard.html:12 #: templates/umap/user_dashboard.html:13
msgid "My profile" msgid "My profile"
msgstr "Meu perfil" msgstr ""
#: templates/umap/user_dashboard.html:20 templates/umap/user_dashboard.html:24 #: templates/umap/user_dashboard.html:21 templates/umap/user_dashboard.html:23
msgid "Maps title" msgid "Maps title"
msgstr "Título do mapa" msgstr ""
#: templates/umap/user_dashboard.html:32 #: templates/umap/user_dashboard.html:32
#, python-format #, python-format
msgid "Download %(count)s maps" msgid "Download %(count)s maps"
msgstr "Descarregar %(count)s mapas" msgstr ""
#: templates/umap/user_dashboard.html:42 #: templates/umap/user_dashboard.html:42
msgid "You have no map yet." msgid "You have no map yet."
msgstr "Ainda não tem nenhum mapa." msgstr ""
#: views.py:354 #: views.py:346
msgid "View the map" msgid "View the map"
msgstr "Ver o mapa" msgstr "Ver o mapa"
#: views.py:716 #: views.py:704
msgid "See full screen" msgid "See full screen"
msgstr "Ver em ecrã inteiro" msgstr ""
#: views.py:817 #: views.py:803
msgid "Map editors updated with success!" msgid "Map editors updated with success!"
msgstr "Os editores do mapa foram atualizados com sucesso!" msgstr "Os editores do mapa foram atualizados com sucesso!"
#: views.py:854 #: views.py:841
#, python-format #, python-format
msgid "The uMap edit link for your map: %(map_name)s" msgid "The uMap edit link for your map: %(map_name)s"
msgstr "A hiperligação de edição do uMap para o seu mapa: %(map_name)s" msgstr ""
#: views.py:857 #: views.py:844
#, python-format #, python-format
msgid "Here is your secret edit link: %(link)s" msgid "Here is your secret edit link: %(link)s"
msgstr "Aqui está a hiperligação de edição secreta: %(link)s" msgstr ""
#: views.py:864 #: views.py:850
#, python-format
msgid "Can't send email to %(email)s"
msgstr "Não é possível enviar o email para %(email)s"
#: views.py:867
#, python-format #, python-format
msgid "Email sent to %(email)s" msgid "Email sent to %(email)s"
msgstr "Email enviado para %(email)s" msgstr ""
#: views.py:878 #: views.py:861
msgid "Only its owner can delete the map." msgid "Only its owner can delete the map."
msgstr "Só o proprietário pode eliminar o mapa." msgstr "Só o proprietário pode eliminar o mapa."
#: views.py:906 #: views.py:889
#, python-format #, python-format
msgid "" msgid ""
"Your map has been cloned! If you want to edit this map from another " "Your map has been cloned! If you want to edit this map from another "
"computer, please use this link: %(anonymous_url)s" "computer, please use this link: %(anonymous_url)s"
msgstr "O seu mapa foi clonado! Se quiser editar este mapa noutro computador, por favor utilize esta hiperligação: %(anonymous_url)s" msgstr "O seu mapa foi clonado! Se quiser editar este mapa noutro computador, por favor utilize este link: %(anonymous_url)s"
#: views.py:911 #: views.py:894
msgid "Congratulations, your map has been cloned!" msgid "Congratulations, your map has been cloned!"
msgstr "Parabéns, o seu mapa foi clonado!" msgstr "Parabéns, o seu mapa foi clonado!"
#: views.py:1146 #: views.py:1130
msgid "Layer successfully deleted." msgid "Layer successfully deleted."
msgstr "Camada eliminada com sucesso." msgstr "Camada eliminada com sucesso."
#: views.py:1168 #: views.py:1152
msgid "Permissions updated with success!" msgid "Permissions updated with success!"
msgstr "Permissões atualizadas com sucesso!" msgstr ""

View file

@ -466,7 +466,6 @@ input.switch:checked ~ label:after {
.button-bar { .button-bar {
grid-gap: 7px; grid-gap: 7px;
} }
.umap-multiplechoice.by2,
.button-bar.half { .button-bar.half {
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
} }

View file

@ -65,9 +65,7 @@ body.login header {
.login-grid .login-openstreetmap-oauth2 { .login-grid .login-openstreetmap-oauth2 {
background-image: url("./openstreetmap.png"); background-image: url("./openstreetmap.png");
} }
.login-grid .login-oidc {
background-image: url("./authentik.png");
}
/* **************************** */ /* **************************** */
/* home */ /* home */

View file

@ -9,7 +9,18 @@ export default class Browser {
filter: '', filter: '',
inBbox: false, inBbox: false,
} }
this.mode = 'layers' this._mode = 'layers'
}
set mode(value) {
// Store the mode so we can respect it when we redraw
if (['data', 'filters'].includes(value)) this.map.panel.mode = 'expanded'
else if (value === 'layers') this.map.panel.mode = 'condensed'
this._mode = value
}
get mode() {
return this._mode
} }
addFeature(feature, parent) { addFeature(feature, parent) {
@ -62,7 +73,7 @@ export default class Browser {
addDataLayer(datalayer, parent) { addDataLayer(datalayer, parent) {
let className = `datalayer ${datalayer.getHidableClass()}` let className = `datalayer ${datalayer.getHidableClass()}`
if (this.mode !== 'layers') className += ' show-list' if (this.map.panel.mode !== 'condensed') className += ' show-list'
const container = DomUtil.create('div', className, parent), const container = DomUtil.create('div', className, parent),
headline = DomUtil.create('h5', '', container) headline = DomUtil.create('h5', '', container)
container.id = this.datalayerId(datalayer) container.id = this.datalayerId(datalayer)

View file

@ -6,9 +6,7 @@ export class Panel {
this.parent = map._controlContainer this.parent = map._controlContainer
this.map = map this.map = map
this.container = DomUtil.create('div', '', this.parent) this.container = DomUtil.create('div', '', this.parent)
// This will be set once according to the panel configurated at load this.mode = 'condensed'
// or by using panels as popups
this.mode = null
this.classname = 'left' this.classname = 'left'
DomEvent.disableClickPropagation(this.container) DomEvent.disableClickPropagation(this.container)
DomEvent.on(this.container, 'contextmenu', DomEvent.stopPropagation) // Do not activate our custom context menu. DomEvent.on(this.container, 'contextmenu', DomEvent.stopPropagation) // Do not activate our custom context menu.
@ -16,12 +14,8 @@ export class Panel {
DomEvent.on(this.container, 'MozMousePixelScroll', DomEvent.stopPropagation) DomEvent.on(this.container, 'MozMousePixelScroll', DomEvent.stopPropagation)
} }
setDefaultMode(mode) {
if (!this.mode) this.mode = mode
}
open({ content, className, actions = [] } = {}) { open({ content, className, actions = [] } = {}) {
this.container.className = `with-transition panel ${this.classname} ${this.mode || ''}` this.container.className = `with-transition panel ${this.classname} ${this.mode}`
this.container.innerHTML = '' this.container.innerHTML = ''
const actionsContainer = DomUtil.create('ul', 'toolbox', this.container) const actionsContainer = DomUtil.create('ul', 'toolbox', this.container)
const body = DomUtil.create('div', 'body', this.container) const body = DomUtil.create('div', 'body', this.container)
@ -46,14 +40,14 @@ export class Panel {
} }
resize() { resize() {
if (this.mode === 'condensed') { if (this.mode === 'expanded') {
this.mode = 'expanded'
this.container.classList.remove('condensed')
this.container.classList.add('expanded')
} else {
this.mode = 'condensed' this.mode = 'condensed'
this.container.classList.remove('expanded') this.container.classList.remove('expanded')
this.container.classList.add('condensed') this.container.classList.add('condensed')
} else {
this.mode = 'expanded'
this.container.classList.remove('condensed')
this.container.classList.add('expanded')
} }
} }

View file

@ -941,11 +941,7 @@ L.FormBuilder.MultiChoice = L.FormBuilder.Element.extend({
if (!this.container.querySelector(`input[type="radio"][value="${value}"]`)) { if (!this.container.querySelector(`input[type="radio"][value="${value}"]`)) {
value = this.options.default !== undefined ? this.options.default : this.default value = this.options.default !== undefined ? this.options.default : this.default
} }
const choices = this.getChoices().map(([value, label]) => value) this.container.querySelector(`input[type="radio"][value="${value}"]`).checked = true
if (choices.includes(value)) {
this.container.querySelector(`input[type="radio"][value="${value}"]`).checked =
true
}
}, },
value: function () { value: function () {

View file

@ -214,16 +214,14 @@ U.Map = L.Map.extend({
if (L.Util.queryString('share')) { if (L.Util.queryString('share')) {
this.share.open() this.share.open()
} else if (this.options.onLoadPanel === 'databrowser') { } else if (this.options.onLoadPanel === 'databrowser') {
this.panel.setDefaultMode('expanded')
this.openBrowser('data') this.openBrowser('data')
} else if (this.options.onLoadPanel === 'datalayers') { } else if (this.options.onLoadPanel === 'datalayers') {
this.panel.setDefaultMode('condensed')
this.openBrowser('layers') this.openBrowser('layers')
} else if (this.options.onLoadPanel === 'datafilters') { } else if (this.options.onLoadPanel === 'datafilters') {
this.panel.setDefaultMode('expanded') this.panel.mode = 'expanded'
this.openBrowser('filters') this.openBrowser('filters')
} else if (this.options.onLoadPanel === 'caption') { } else if (this.options.onLoadPanel === 'caption') {
this.panel.setDefaultMode('condensed') this.panel.mode = 'condensed'
this.openCaption() this.openCaption()
} }
if (L.Util.queryString('edit')) { if (L.Util.queryString('edit')) {

View file

@ -55,7 +55,6 @@ U.Popup.Panel = U.Popup.extend({
}, },
onAdd: function (map) { onAdd: function (map) {
map.panel.setDefaultMode('expanded')
map.panel.open({ map.panel.open({
content: this._content, content: this._content,
actions: [U.Browser.backButton(map)], actions: [U.Browser.backButton(map)],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View file

@ -1,4 +1,3 @@
import re
from copy import deepcopy from copy import deepcopy
from time import sleep from time import sleep
@ -64,9 +63,8 @@ def bootstrap(map, live_server):
def test_data_browser_should_be_open(live_server, page, bootstrap, map): def test_data_browser_should_be_open(live_server, page, bootstrap, map):
page.goto(f"{live_server.url}{map.get_absolute_url()}") page.goto(f"{live_server.url}{map.get_absolute_url()}")
panel = page.locator(".panel.left.on") el = page.locator(".umap-browser")
expect(panel).to_have_class(re.compile(".*expanded.*")) expect(el).to_be_visible()
expect(panel.locator(".umap-browser")).to_be_visible()
expect(page.get_by_text("one point in france")).to_be_visible() expect(page.get_by_text("one point in france")).to_be_visible()
expect(page.get_by_text("one line in new zeland")).to_be_visible() expect(page.get_by_text("one line in new zeland")).to_be_visible()
expect(page.get_by_text("one polygon in greenland")).to_be_visible() expect(page.get_by_text("one polygon in greenland")).to_be_visible()

View file

@ -1,5 +1,3 @@
import re
import pytest import pytest
from playwright.sync_api import expect from playwright.sync_api import expect
@ -17,9 +15,8 @@ def test_caption(live_server, page, map):
) )
hidden = DataLayerFactory(map=map, name="Hidden", settings={"inCaption": False}) hidden = DataLayerFactory(map=map, name="Hidden", settings={"inCaption": False})
page.goto(f"{live_server.url}{map.get_absolute_url()}") page.goto(f"{live_server.url}{map.get_absolute_url()}")
panel = page.locator(".panel.left.on") panel = page.locator(".umap-caption")
expect(panel).to_have_class(re.compile(".*condensed.*")) expect(panel).to_be_visible()
expect(panel.locator(".umap-caption")).to_be_visible()
expect(panel.locator(".datalayer-legend").get_by_text(basic.name)).to_be_visible() expect(panel.locator(".datalayer-legend").get_by_text(basic.name)).to_be_visible()
expect( expect(
panel.locator(".datalayer-legend .off").get_by_text(non_loaded.name) panel.locator(".datalayer-legend .off").get_by_text(non_loaded.name)

View file

@ -1,5 +1,4 @@
import copy import copy
import re
import pytest import pytest
from playwright.sync_api import expect from playwright.sync_api import expect
@ -102,9 +101,7 @@ def test_simple_facet_search(live_server, page, map):
DataLayerFactory(map=map, data=DATALAYER_DATA2) DataLayerFactory(map=map, data=DATALAYER_DATA2)
DataLayerFactory(map=map, data=DATALAYER_DATA3) DataLayerFactory(map=map, data=DATALAYER_DATA3)
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.948/1.670") page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.948/1.670")
panel = page.locator(".panel.left.on") panel = page.locator(".umap-browser")
expect(panel).to_have_class(re.compile(".*expanded.*"))
expect(panel.locator(".umap-browser")).to_be_visible()
# From a non browsable datalayer, should not be impacted # From a non browsable datalayer, should not be impacted
paths = page.locator(".leaflet-overlay-pane path") paths = page.locator(".leaflet-overlay-pane path")
expect(paths).to_be_visible() expect(paths).to_be_visible()

View file

@ -1,4 +1,3 @@
import re
from copy import deepcopy from copy import deepcopy
import pytest import pytest
@ -63,19 +62,3 @@ def test_should_display_tooltip_with_variable(live_server, map, page, bootstrap)
map.save() map.save()
page.goto(f"{live_server.url}{map.get_absolute_url()}") page.goto(f"{live_server.url}{map.get_absolute_url()}")
expect(page.get_by_text("Foo test marker")).to_be_visible() expect(page.get_by_text("Foo test marker")).to_be_visible()
def test_should_open_popup_panel_on_click(live_server, map, page, bootstrap):
map.settings["properties"]["popupShape"] = "Panel"
map.save()
page.goto(f"{live_server.url}{map.get_absolute_url()}")
panel = page.locator(".panel.left.on")
expect(panel).to_be_hidden()
page.locator(".leaflet-marker-icon").click()
expect(panel).to_be_visible()
expect(panel).to_have_class(re.compile(".*expanded.*"))
expect(panel.get_by_role("heading", name="test marker")).to_be_visible()
expect(panel.get_by_text("Some description")).to_be_visible()
# Close popup
page.locator("#map").click()
expect(panel).to_be_hidden()