kopia lustrzana https://github.com/hholzgra/maposmatic/
make contact information configurable
rodzic
0ce991f75a
commit
08d44fb8df
|
@ -145,6 +145,9 @@ def all(request):
|
|||
'BRAND_NAME': www.settings.BRAND_NAME,
|
||||
|
||||
'PAYPAL_ID': www.settings.PAYPAL_ID,
|
||||
'CONTACT_EMAIL': www.settings.CONTACT_EMAIL,
|
||||
'CONTACT_CHAT': www.settings.CONTACT_CHAT,
|
||||
'EXTRA_FOOTER': www.settings.EXTRA_FOOTER,
|
||||
|
||||
'searchform': forms.MapSearchForm(request.GET),
|
||||
'blogposts': get_latest_blog_posts(),
|
||||
|
|
|
@ -28,6 +28,8 @@ from django import template
|
|||
from django.utils.safestring import mark_safe
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import www.settings
|
||||
|
||||
register = template.Library()
|
||||
|
||||
def job_status_to_str(value, arg, autoescape=None):
|
||||
|
@ -39,7 +41,10 @@ def job_status_to_str(value, arg, autoescape=None):
|
|||
if arg == 'ok':
|
||||
return _("Rendering was successful.")
|
||||
else:
|
||||
return _("Rendering failed! Please contact hartmut@php.net for more information.")
|
||||
if www.settings.CONTACT_EMAIL:
|
||||
return _("Rendering failed! Please contact %(email)s for more information.") % {'email': www.settings.CONTACT_EMAIL}
|
||||
else:
|
||||
return _("Rendering failed!")
|
||||
elif value == 3:
|
||||
if arg == 'ok':
|
||||
return _("Rendering is obsolete: the rendering was successful, but the files are no longer available.")
|
||||
|
|
|
@ -135,3 +135,11 @@ MEDIA_ROOT = '/home/media/media.lawrence.com/'
|
|||
# see also: https://developer.paypal.com/docs/integration/web/
|
||||
# e.g. PAYPAL_ID = 'YQPBAUM3JW8T2' # original MapOSMatic doation ID
|
||||
PAYPAL_ID = ''
|
||||
|
||||
|
||||
# contact information, to be displayed in page footer if set
|
||||
CONTACT_EMAIL = 'hartmut@php.net'
|
||||
CONTACT_CHAT = 'irc://irc.freenode.net/#maposmatic'
|
||||
|
||||
# custom footer text
|
||||
EXTRA_FOOTER = ''
|
||||
|
|
|
@ -149,10 +149,17 @@
|
|||
{% blocktrans %}MapOSMatic is a free software webservice to generate maps of cities using OpenStreetMap data.{% endblocktrans %}
|
||||
</p>
|
||||
<p>
|
||||
<address><a href="mailto:hartmut@php.net">hartmut@php.net</a></address>
|
||||
—
|
||||
<code>irc://irc.freenode.net/#maposmatic</code>
|
||||
{% if CONTACT_EMAIL %}
|
||||
<address><a href="mailto:{{CONTACT_EMAIL}}"><i class="glyphicon glyphicon-envelope"></i> {{CONTACT_EMAIL}}</a></address>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
{% if CONTACT_CHAT %}
|
||||
<a href="{{CONTACT_CHAT}}"><i class="glyphicon glyphicon-comment"></i> <tt>{{CONTACT_CHAT}}</tt></a>
|
||||
{% endif %}
|
||||
</p>
|
||||
{{ EXTRA_FOOTER|safe }}
|
||||
<!--
|
||||
<p class="hosted-by">
|
||||
{% blocktrans %}MapOSMatic website and rendering pipeline hosted by <a href="http://www.enix.org">eNiX</a>.<br />GIS database hosted by the <a href="http://www.fsffrance.org">Free Software Foundation France</a>.{% endblocktrans %}
|
||||
|
|
Ładowanie…
Reference in New Issue