diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index 1eadc11c..5f8224c8 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -251,10 +251,10 @@ L.U.Map.include({ } this.initShortcuts() this.onceDatalayersLoaded(function () { - if (this.options.onLoadPanel === 'databrowser') this.openBrowser() + if (L.Util.queryString('share')) this.renderShareBox() + else if (this.options.onLoadPanel === 'databrowser') this.openBrowser() else if (this.options.onLoadPanel === 'caption') this.displayCaption() else if (this.options.onLoadPanel === 'datafilters') this.openFilter() - else if (this.options.onLoadPanel === 'share') this.renderShareBox() }) this.onceDataLoaded(function () { const slug = L.Util.queryString('feature') diff --git a/umap/templates/umap/map_table.html b/umap/templates/umap/map_table.html index 0e4cf947..43d8e9a5 100644 --- a/umap/templates/umap/map_table.html +++ b/umap/templates/umap/map_table.html @@ -20,7 +20,7 @@ {{ map_inst.owner }} - {% translate "Share" %} + {% translate "Share" %} {% translate "Edit" %} {% translate "Download" %} diff --git a/umap/tests/test_views.py b/umap/tests/test_views.py index 8adb8ebf..f8522d39 100644 --- a/umap/tests/test_views.py +++ b/umap/tests/test_views.py @@ -257,5 +257,5 @@ def test_user_dashboard_display_user_maps(client, map): body = response.content.decode() assert map.name in body assert f"{map.get_absolute_url()}?edit" in body - assert f"{map.get_absolute_url()}?onLoadPanel=share" in body + assert f"{map.get_absolute_url()}?share" in body assert f"{map.get_absolute_url()}?download" in body