mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
feat: display contact infos in the footer
This adds a new settings: UMAP_HOST_INFOS Also, renames UMAP_FEEDBACK_LINK in UMAP_HELP_URL. cf #2004
This commit is contained in:
parent
70ebffd023
commit
a72691e390
7 changed files with 36 additions and 13 deletions
|
@ -199,7 +199,7 @@ Possible values:
|
||||||
Set to True if you want to display a message saying that your instance is not
|
Set to True if you want to display a message saying that your instance is not
|
||||||
ready for production use (no backup, etc.)
|
ready for production use (no backup, etc.)
|
||||||
|
|
||||||
#### UMAP_FEEDBACK_LINK
|
#### UMAP_HELP_URL
|
||||||
|
|
||||||
Link to show on the header under the "Feedback and help" label.
|
Link to show on the header under the "Feedback and help" label.
|
||||||
|
|
||||||
|
@ -211,6 +211,19 @@ Which feed to display on the home page. Three valid values:
|
||||||
- `"highlighted"`, which shows the maps that have been starred by a staff member
|
- `"highlighted"`, which shows the maps that have been starred by a staff member
|
||||||
- `None`, which does not show any map on the home page
|
- `None`, which does not show any map on the home page
|
||||||
|
|
||||||
|
#### UMAP_HOST_INFOS
|
||||||
|
|
||||||
|
Informations about the entity hosting this uMap instance.
|
||||||
|
|
||||||
|
```
|
||||||
|
UMAP_HOST_INFOS = {
|
||||||
|
"name": "OpenStreetMap France",
|
||||||
|
"url": "https://openstreetmap.fr",
|
||||||
|
"contact": "blah@openstreetmap.fr"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
#### UMAP_IMPORTERS
|
#### UMAP_IMPORTERS
|
||||||
|
|
||||||
Activate preset importers to connect uMap with external sources.
|
Activate preset importers to connect uMap with external sources.
|
||||||
|
|
|
@ -5,12 +5,13 @@ from . import VERSION
|
||||||
|
|
||||||
def settings(request):
|
def settings(request):
|
||||||
return {
|
return {
|
||||||
"UMAP_FEEDBACK_LINK": djsettings.UMAP_FEEDBACK_LINK,
|
"UMAP_HELP_URL": djsettings.UMAP_HELP_URL,
|
||||||
"SITE_NAME": djsettings.SITE_NAME,
|
"SITE_NAME": djsettings.SITE_NAME,
|
||||||
"SITE_URL": djsettings.SITE_URL,
|
"SITE_URL": djsettings.SITE_URL,
|
||||||
"ENABLE_ACCOUNT_LOGIN": djsettings.ENABLE_ACCOUNT_LOGIN,
|
"ENABLE_ACCOUNT_LOGIN": djsettings.ENABLE_ACCOUNT_LOGIN,
|
||||||
"UMAP_READONLY": djsettings.UMAP_READONLY,
|
"UMAP_READONLY": djsettings.UMAP_READONLY,
|
||||||
"UMAP_DEMO_SITE": djsettings.UMAP_DEMO_SITE,
|
"UMAP_DEMO_SITE": djsettings.UMAP_DEMO_SITE,
|
||||||
|
"UMAP_HOST_INFOS": djsettings.UMAP_HOST_INFOS,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,5 +41,7 @@ if path:
|
||||||
globals()["TEMPLATES"][0]["DIRS"] = [value]
|
globals()["TEMPLATES"][0]["DIRS"] = [value]
|
||||||
elif key == "UMAP_CUSTOM_STATICS":
|
elif key == "UMAP_CUSTOM_STATICS":
|
||||||
globals()["STATICFILES_DIRS"].insert(0, value)
|
globals()["STATICFILES_DIRS"].insert(0, value)
|
||||||
|
elif key == "UMAP_FEEDBACK_LINK":
|
||||||
|
globals()["UMAP_HELP_URL"] = value
|
||||||
else:
|
else:
|
||||||
globals()[key] = value
|
globals()[key] = value
|
||||||
|
|
|
@ -251,7 +251,7 @@ UMAP_MAPS_PER_PAGE = 5
|
||||||
UMAP_MAPS_PER_SEARCH = 25
|
UMAP_MAPS_PER_SEARCH = 25
|
||||||
UMAP_MAPS_PER_PAGE_OWNER = 10
|
UMAP_MAPS_PER_PAGE_OWNER = 10
|
||||||
UMAP_SEARCH_CONFIGURATION = "simple"
|
UMAP_SEARCH_CONFIGURATION = "simple"
|
||||||
UMAP_FEEDBACK_LINK = "https://wiki.openstreetmap.org/wiki/UMap#Feedback_and_help"
|
UMAP_HELP_URL = "https://wiki.openstreetmap.org/wiki/UMap#Feedback_and_help"
|
||||||
USER_MAPS_URL = "user_maps"
|
USER_MAPS_URL = "user_maps"
|
||||||
DATABASES = {"default": env.db(default="postgis://localhost:5432/umap")}
|
DATABASES = {"default": env.db(default="postgis://localhost:5432/umap")}
|
||||||
UMAP_DEFAULT_SHARE_STATUS = None
|
UMAP_DEFAULT_SHARE_STATUS = None
|
||||||
|
@ -259,6 +259,7 @@ UMAP_DEFAULT_EDIT_STATUS = None
|
||||||
UMAP_DEFAULT_FEATURES_HAVE_OWNERS = False
|
UMAP_DEFAULT_FEATURES_HAVE_OWNERS = False
|
||||||
UMAP_HOME_FEED = "latest"
|
UMAP_HOME_FEED = "latest"
|
||||||
UMAP_IMPORTERS = {}
|
UMAP_IMPORTERS = {}
|
||||||
|
UMAP_HOST_INFOS = {}
|
||||||
|
|
||||||
UMAP_READONLY = env("UMAP_READONLY", default=False)
|
UMAP_READONLY = env("UMAP_READONLY", default=False)
|
||||||
UMAP_GZIP = True
|
UMAP_GZIP = True
|
||||||
|
|
|
@ -3,15 +3,17 @@ header {
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
height: 140px;
|
min-height: 140px;
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
background-color: #2E3641;
|
background-color: var(--color-darkBlue);
|
||||||
text-align: center;
|
color: var(--color-light);
|
||||||
line-height: 140px;
|
display: flex;
|
||||||
color: #fff;
|
align-items: center;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
footer a {
|
footer a {
|
||||||
color: #fff;
|
color: var(--color-light);
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
footer a.branding {
|
footer a.branding {
|
||||||
|
@ -20,8 +22,9 @@ footer a.branding {
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 60px auto;
|
background-size: 60px auto;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
|
height: 60px;
|
||||||
|
line-height: 60px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
height: 140px;
|
|
||||||
padding-inline-start: 70px;
|
padding-inline-start: 70px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,11 @@
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<a href="https://wiki.openstreetmap.org/wiki/UMap" class="branding">uMap</a>
|
<a href="https://wiki.openstreetmap.org/wiki/UMap" class="branding">uMap</a>
|
||||||
an OpenStreetMap project
|
<span>{% trans "An OpenStreetMap project" %}
|
||||||
(version <a href="https://umap-project.readthedocs.io/en/master/changelog/">{{ UMAP_VERSION }}</a>)
|
({% trans "version" %} <a href="https://umap-project.readthedocs.io/en/master/changelog/">{{ UMAP_VERSION }}</a>)</span>
|
||||||
|
{% if UMAP_HOST_INFOS.url and UMAP_HOST_INFOS.name %}<span>{% trans "Hosted by" %} <a href="{{ UMAP_HOST_INFOS.url }}">{{ UMAP_HOST_INFOS.name }}</a></span>{% endif %}
|
||||||
|
{% if UMAP_HOST_INFOS.email %}<a href="mailto:{{ UMAP_HOST_INFOS.email }}">{% trans "Contact" %}</a>{% endif %}
|
||||||
|
{% if UMAP_HELP_URL %}<a href="{{ UMAP_HELP_URL }}">{% trans "Help" %}</a>{% endif %}
|
||||||
{% get_language_info_list for LANGUAGES as languages %}
|
{% get_language_info_list for LANGUAGES as languages %}
|
||||||
<form action="{% url "set_language" %}" method="post" class="i18n_switch">
|
<form action="{% url "set_language" %}" method="post" class="i18n_switch">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<a href="{% url "about" %}">{% trans "About" %}</a>
|
<a href="{% url "about" %}">{% trans "About" %}</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ UMAP_FEEDBACK_LINK }}">{% trans "Help" %}</a>
|
<a href="{{ UMAP_HELP_URL }}">{% trans "Help" %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
{% if user.has_usable_password %}
|
{% if user.has_usable_password %}
|
||||||
|
|
Loading…
Reference in a new issue