maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Maposmatic-dev] [PATCH] website: add donation bu tton and page


From: Thomas Petazzoni
Subject: [Maposmatic-dev] [PATCH] website: add donation bu tton and page
Date: Fri, 30 Mar 2012 16:12:48 +0200

Signed-off-by: Thomas Petazzoni <address@hidden>
---
 www/maposmatic/views.py              |    5 ++
 www/templates/maposmatic/base.html   |   17 +++++++
 www/templates/maposmatic/donate.html |   77 ++++++++++++++++++++++++++++++++++
 www/urls.py                          |    3 +-
 4 files changed, 101 insertions(+), 1 deletions(-)
 create mode 100644 www/templates/maposmatic/donate.html

diff --git a/www/maposmatic/views.py b/www/maposmatic/views.py
index 44b6a15..567ce29 100644
--- a/www/maposmatic/views.py
+++ b/www/maposmatic/views.py
@@ -60,6 +60,11 @@ def about(request):
     return render_to_response('maposmatic/about.html',
                               context_instance=RequestContext(request))
 
+def donate(request):
+    """The donate page."""
+    return render_to_response('maposmatic/donate.html',
+                              context_instance=RequestContext(request))
+
 def new(request):
     """The map creation page and form."""
 
diff --git a/www/templates/maposmatic/base.html 
b/www/templates/maposmatic/base.html
index 2a70429..069032f 100644
--- a/www/templates/maposmatic/base.html
+++ b/www/templates/maposmatic/base.html
@@ -69,6 +69,7 @@
         <li {% block menu-jobs %}{% endblock %}><a href="{% url jobs %}">{% 
trans "Jobs" %}</a></li>
         <li {% block menu-maps %}{% endblock %}><a href="{% url maps %}">{% 
trans "Maps" %}</a></li>
         <li><a href="http://news.maposmatic.org";>{% trans "News" %}</a></li>
+        <li {% block menu-donate %}{% endblock %}><a href="{% url donate 
%}">{% trans "Donate" %}</a></li>
         <li {% block menu-about %}{% endblock %}><a href="{% url about %}">{% 
trans "About" %}</a></li>
       </ul>
     </div>
@@ -85,6 +86,22 @@
       </td>
 
       <td id="meta">
+       <div id="bdonate">
+         <h3>{% trans "Donate to MapOSMatic" %}</h3>
+
+         <form action="https://www.paypal.com/cgi-bin/webscr"; method="post" 
style="float: right; margin-left: 5px;">
+           <input type="hidden" name="cmd" value="_s-xclick"/>
+           <input type="hidden" name="hosted_button_id" value="YQPBAUM3JW8T2"/>
+           <input type="image" 
src="https://www.paypalobjects.com/en_GB/i/btn/btn_donate_LG.gif"; border="0" 
name="submit" alt="PayPal — The safer, easier way to pay online."/>
+           <img alt="" border="0" 
src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif"; width="1" height="1"/>
+         </form>
+
+         <p>{% blocktrans %}You can donate to help us improve the
+         service. See our <a href="/donate">donation</a> page.
+           {% endblocktrans %}</p>
+
+       </div>
+
        <div id="bosmtimestamp">
          <h3>{% trans "OSM database status" %}</h3>
          {% if osm_date %}
diff --git a/www/templates/maposmatic/donate.html 
b/www/templates/maposmatic/donate.html
new file mode 100644
index 0000000..425bb6b
--- /dev/null
+++ b/www/templates/maposmatic/donate.html
@@ -0,0 +1,77 @@
+{% extends "maposmatic/base.html" %}
+
+{% comment %}
+ coding: utf-8
+
+ maposmatic, the web front-end of the MapOSMatic city map generation system
+ Copyright (C) 2012  Thomas Petazzoni
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program.  If not, see <http://www.gnu.org/licenses/>.
+{% endcomment %}
+
+{% load i18n %}
+
+{% block menu-donate %}
+class="activelink"
+{% endblock %}
+
+{% block page %}
+<h1>{% trans "Donate" %}</h1>
+<h2>{% trans "Why donations are useful?" %}</h2>
+
+<p>{%blocktrans%}MapOSMatic is a project entirely developed and
+maintained by a team of volunteers (see our <a href="{% url about
+%}">About</a> page for details). However, running the MapOSMatic
+service and making improvements to it have various costs beyond the
+time of the volunteer developers.{%endblocktrans%}</p>
+
+<p>{%blocktrans%}Therefore, we are currently seeking donations to help
+us funding:{%endblocktrans%}</p>
+
+<ul>
+  <li>{%blocktrans%}Acquisition of a Solid-State Disk for the storage
+  of our local copy of the OpenStreetMap database. A SSD drive
+  performs 40 to 50 times better than the conventional hard drive we
+  are using today, and would therefore help us to reduce the lag
+  between our local database and the official one, providing more
+  up-to-date maps. The cost of such hardware is about 500 to 700
+  EUR.{%endblocktrans%}</li>
+
+  <li>{%blocktrans%}Participation to the transportation expenses of
+  the MapOSMatic developers when they gather for <i>hackfests</i>
+  (meeting of developers). You can read
+  our <a href="http://news.maposmatic.org";>blog</a> to learn more
+  about what we achieve during those hackfests. We usually implement a
+  huge number of improvements, new features and bug fixes during those
+  meetings. Those meetings take place during the holidays of the
+  developers, and we would like to at least compensate their travel
+  expenses.{%endblocktrans%}</li>
+
+</ul>
+
+<h2>{% trans "Donating?" %}</h2>
+
+<p>{%blocktrans%}Donations can be done through the
+well-known <a href="http://www.paypal.com";>PayPal</a> service. We
+accept donations of any amount, all donations are
+helpful.{%endblocktrans%}</p>
+
+<form action="https://www.paypal.com/cgi-bin/webscr"; method="post">
+  <input type="hidden" name="cmd" value="_s-xclick"/>
+  <input type="hidden" name="hosted_button_id" value="YQPBAUM3JW8T2"/>
+  <input type="image" 
src="https://www.paypalobjects.com/en_GB/i/btn/btn_donate_LG.gif"; border="0" 
name="submit" alt="PayPal — The safer, easier way to pay online."/>
+  <img alt="" border="0" 
src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif"; width="1" height="1"/>
+</form>
+
+{% endblock %}
diff --git a/www/urls.py b/www/urls.py
index 1a25b09..b6e63fa 100644
--- a/www/urls.py
+++ b/www/urls.py
@@ -41,7 +41,8 @@ urlpatterns = patterns('',
         name='main'),
     url(r'^about/$', maposmatic.views.about,
         name='about'),
-
+    url(r'^donate/$', maposmatic.views.donate,
+        name='donate'),
     url(r'^jobs/(?P<job_id>\d+)/(?P<job_nonce>[A-Za-z]{16})$',
         maposmatic.views.job,
         name='job-by-id-and-nonce'),
-- 
1.7.4.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]