Display the current version + link to changelog

This commit is contained in:
David Larlet 2023-06-06 14:05:35 -04:00
parent d034e89034
commit fad196bff7
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD
4 changed files with 24 additions and 7 deletions

View file

@ -1143,9 +1143,16 @@ L.U.Map.include({
leaflet: 'http://leafletjs.com',
django: 'https://www.djangoproject.com',
umap: 'http://wiki.openstreetmap.org/wiki/UMap',
changelog: 'https://umap-project.readthedocs.io/en/latest/changelog/',
version: this.options.umap_version,
}
umapCredit.innerHTML = L._(
'Powered by <a href="{leaflet}">Leaflet</a> and <a href="{django}">Django</a>, glued by <a href="{umap}">uMap project</a>.',
`
Powered by <a href="{leaflet}">Leaflet</a> and
<a href="{django}">Django</a>,
glued by <a href="{umap}">uMap project</a>
(version <a href="{changelog}">{version}</a>).
`,
urls
)
const browser = L.DomUtil.create('li', '')

View file

@ -8,7 +8,11 @@ footer {
background-color: #2E3641;
text-align: center;
line-height: 140px;
color: #8F96A3;
color: #fff;
}
footer a {
color: #fff;
text-decoration: underline;
}
footer a.branding {
background-image: url("./img/logo_filigree.png");
@ -19,7 +23,6 @@ footer a.branding {
font-weight: bold;
height: 140px;
padding-left: 70px;
color: #8F96A3;
display: inline-block;
}

View file

@ -1,7 +1,9 @@
{% load i18n %}
<footer>
<a href="/" class="branding">umap</a> an OpenStreetMap project (version {{ UMAP_VERSION }})
<a href="https://wiki.openstreetmap.org/wiki/UMap" class="branding">uMap</a>
an OpenStreetMap project
(version <a href="https://umap-project.readthedocs.io/en/latest/changelog/">{{ UMAP_VERSION }}</a>)
{% get_language_info_list for LANGUAGES as languages %}
<form action="{% url "set_language" %}" method="post" class="i18n_switch">
{% csrf_token %}

View file

@ -39,6 +39,7 @@ from django.views.generic.detail import BaseDetailView
from django.views.generic.edit import CreateView, DeleteView, FormView, UpdateView
from django.views.generic.list import ListView
from . import VERSION
from .forms import (
DEFAULT_LATITUDE,
DEFAULT_LONGITUDE,
@ -398,6 +399,7 @@ class MapDetailMixin:
"anonymous_edit_statuses": [
(i, str(label)) for i, label in AnonymousMapPermissionsForm.STATUS
],
"umap_version": VERSION,
}
if self.get_short_url():
properties["shortUrl"] = self.get_short_url()
@ -637,7 +639,10 @@ class SendEditLink(FormLessEditMixin, FormView):
link = self.object.get_anonymous_edit_url()
send_mail(
_("The uMap edit link for your map: %(map_name)s" % {"map_name": self.object.name}),
_(
"The uMap edit link for your map: %(map_name)s"
% {"map_name": self.object.name}
),
_("Here is your secret edit link: %(link)s" % {"link": link}),
settings.FROM_EMAIL,
[email],