diff --git a/umap/managers.py b/umap/managers.py index afed1cf1..3627649c 100644 --- a/umap/managers.py +++ b/umap/managers.py @@ -9,6 +9,13 @@ class PublicManager(models.Manager): .filter(share_status=self.model.PUBLIC) ) + def starred_by_staff(self): + from .models import Star, User + + staff = User.objects.filter(is_staff=True) + stars = Star.objects.filter(by__in=staff).values("map") + return self.get_queryset().filter(pk__in=stars) + class PrivateQuerySet(models.QuerySet): def for_user(self, user): diff --git a/umap/static/umap/css/dialog.css b/umap/static/umap/css/dialog.css index b3dcf0ff..dc5b30a4 100644 --- a/umap/static/umap/css/dialog.css +++ b/umap/static/umap/css/dialog.css @@ -4,7 +4,7 @@ margin-top: 100px; width: var(--dialog-width); max-width: 100vw; - max-height: 50vh; + max-height: 80vh; padding: 20px; border: 1px solid #222; background-color: var(--background-color); @@ -12,11 +12,14 @@ border-radius: 5px; overflow-y: auto; height: fit-content; - max-height: 90vh; } .umap-dialog ul + h4 { margin-top: var(--box-margin); } +.umap-dialog .body { + max-height: 50vh; + overflow-y: auto; +} :where([data-component="no-dialog"]:not([hidden])) { display: block; position: relative; diff --git a/umap/static/umap/js/modules/form/fields.js b/umap/static/umap/js/modules/form/fields.js index c3a23bd4..17a58326 100644 --- a/umap/static/umap/js/modules/form/fields.js +++ b/umap/static/umap/js/modules/form/fields.js @@ -725,7 +725,7 @@ Fields.IconUrl = class extends Fields.BlurInput { `) - this.tabs.appendChild(root) + ;[recent, symbols, chars, url].forEach((node) => this.tabs.appendChild(node)) if (Icon.RECENT.length) { recent.addEventListener('click', (event) => { event.stopPropagation() diff --git a/umap/static/umap/js/modules/importers/templates.js b/umap/static/umap/js/modules/importers/templates.js index b628e638..1299284a 100644 --- a/umap/static/umap/js/modules/importers/templates.js +++ b/umap/static/umap/js/modules/importers/templates.js @@ -4,26 +4,22 @@ import { BaseAjax, SingleMixin } from '../autocomplete.js' import { translate } from '../i18n.js' import * as Utils from '../utils.js' -const BOUNDARY_TYPES = { - admin_6: 'département', - admin_7: 'pays (loi Voynet)', - admin_8: 'commune', - admin_9: 'quartier, hameau, arrondissement', - political: 'canton', - local_authority: 'EPCI', -} - const TEMPLATE = ` -
${translate('GeoDataMine: thematic data from OpenStreetMap')}.
-${translate('Use a template to initialize your map')}.
+