Merge pull request #1129 from umap-project/explicit-version
Display the current version + link to changelog
This commit is contained in:
commit
fca9e6a124
4 changed files with 24 additions and 7 deletions
|
@ -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', '')
|
||||
|
@ -2022,8 +2029,8 @@ L.U.Map.include({
|
|||
name.textContent = this.getDisplayName()
|
||||
}
|
||||
if (this.options.user) {
|
||||
const userLabel = L.DomUtil.add('a', 'umap-user', title, this.options.user.name)
|
||||
userLabel.href = this.options.user.url
|
||||
const userLabel = L.DomUtil.add('a', 'umap-user', title, this.options.user.name)
|
||||
userLabel.href = this.options.user.url
|
||||
}
|
||||
L.bind(setName, this)()
|
||||
L.DomEvent.on(name, 'click', this.edit, this)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 %}
|
||||
|
|
|
@ -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],
|
||||
|
|
Loading…
Reference in a new issue