kopia lustrzana https://github.com/hholzgra/maposmatic/
Allow to hide donation pages to MapOSMatic project
rodzic
06c9c39d6f
commit
162a864d45
|
@ -105,6 +105,7 @@ def all(request):
|
|||
'BRAND_NAME': www.settings.BRAND_NAME,
|
||||
'CONTACT_EMAIL': www.settings.CONTACT_EMAIL,
|
||||
'EXTRA_FOOTER': www.settings.EXTRA_FOOTER,
|
||||
'MAPOSMATIC_DONATION': www.settings.MAPOSMATIC_DONATION,
|
||||
'BBOX_MAXIMUM_LENGTH_IN_METERS': www.settings.BBOX_MAXIMUM_LENGTH_IN_METERS,
|
||||
|
||||
'searchform': forms.MapSearchForm(request.GET),
|
||||
|
|
|
@ -73,11 +73,15 @@ def about(request):
|
|||
|
||||
def donate(request):
|
||||
"""The donate page."""
|
||||
if not www.settings.MAPOSMATIC_DONATION:
|
||||
return HttpResponseRedirect(reverse('main'))
|
||||
return render_to_response('maposmatic/donate.html',
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
def donate_thanks(request):
|
||||
"""The thanks for donation page."""
|
||||
if not www.settings.MAPOSMATIC_DONATION:
|
||||
return HttpResponseRedirect(reverse('main'))
|
||||
return render_to_response('maposmatic/donate-thanks.html',
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
|
|
|
@ -323,6 +323,9 @@ CONTACT_EMAIL = ""
|
|||
# If you want to provide extra information in the footer put it in EXTRA_FOOTER
|
||||
EXTRA_FOOTER = ""
|
||||
|
||||
# Show a link to donate to the MapOSMatic team
|
||||
MAPOSMATIC_DONATION = False
|
||||
|
||||
try:
|
||||
from settings_local import *
|
||||
except ImportError:
|
||||
|
|
|
@ -116,6 +116,9 @@ https://docs.djangoproject.com/en/1.8/ref/settings/
|
|||
# DAEMON_ERRORS_EMAIL_REPLY_TO = 'noreply@domain.com'
|
||||
# DAEMON_ERRORS_JOB_URL = 'http://domain.com/jobs/%d'
|
||||
|
||||
# # Show a link to donate to the MapOSMatic team
|
||||
# MAPOSMATIC_DONATION = False
|
||||
|
||||
# # Displayed on the top menu
|
||||
# BRAND_NAME = "MapOSMatic"
|
||||
# # Front page feed
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<li class="{% block menu-new %}{% endblock %}"><a href="{% url "new" %}"><i class="icon-white icon-edit"></i> {% trans "Create map" %}</a></li>
|
||||
<li class="{% block menu-maps %}{% endblock %}"><a href="{% url "maps" %}"><i class="icon-white icon-list"></i> {% trans "Maps" %}</a></li>
|
||||
<li class="{% block menu-about %}{% endblock %}"><a href="{% url "about" %}"><i class="icon-white icon-comment"></i> {% trans "About" %}</a></li>
|
||||
<li class="{% block menu-donate %}{% endblock %}"><a href="{% url "donate" %}"><i class="icon-white icon-gift"></i> {% trans "Donate" %}</a></li>
|
||||
{% if MAPOSMATIC_DONATION %}<li class="{% block menu-donate %}{% endblock %}"><a href="{% url "donate" %}"><i class="icon-white icon-gift"></i> {% trans "Donate" %}</a></li>{% endif %}
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
|
|
|
@ -118,6 +118,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
{% if MAPOSMATIC_DONATION %}
|
||||
<div class="span4">
|
||||
<h2>{% trans "Donate" %}</h2>
|
||||
|
||||
|
@ -133,5 +134,6 @@
|
|||
<img alt="" border="0" src="https://www.paypalobjects.com/{{paypal_lang_code}}/i/scr/pixel.gif" width="1" height="1"/>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
Ładowanie…
Reference in New Issue