]> git.ipfire.org Git - ipfire.org.git/commitdiff
Update donation information.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 8 Nov 2012 21:29:02 +0000 (22:29 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 8 Nov 2012 21:29:02 +0000 (22:29 +0100)
www/templates/index.html
www/templates/modules/donation-box.html
www/templates/static/donation.html
www/templates/wishlist/index.html
www/templates/wishlist/modules/wish.html
www/templates/wishlist/wish.html
www/translations/de_DE/LC_MESSAGES/webapp.po
www/translations/webapp.pot
www/webapp/backend/wishlist.py

index 91fa7b9953639b62b6659ba15b68aa9aee718465..7ea5b06c8ea6b7e48d3431b8d7b5caea2aee3ec2 100644 (file)
                                        {% end %}
                                </ul>
                        </div>
+
+                       <p class="ac">
+                               <a class="btn btn-primary" href="/donate">{{ _("Support this project with your donation!") }}</a>
+                       </p>
                </div>
 
                <div class="span6 objectives">
index 7c5ba4afa3b93b01ae5e67323ade38d3debb79dc..a1a939f01a843107fece214e13aa2636235ee0aa 100644 (file)
-<div class="accordion" id="accordionDonate">
-       <div class="accordion-group">
-               <div class="accordion-heading">
-                       <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionDonate" href="#collapseOne">
-                               {{ _("Donate with PayPal or Credit Card") }}
-                       </a>
-               </div>
-               <div id="collapseOne" class="accordion-body collapse in">
-                       <div class="accordion-inner">
-                               {% if lang == "de" %}
-                                       <p>
-                                               PayPal ist unser bevorzugter und gleichzeitig einfachster Weg zu spenden.
-                                               Dazu einfach auf den Button klicken und den gewünschten Betrag eingeben.
-                                       </p>
+<div class="tabbable">
+       <ul class="nav nav-pills">
+               <li class="active">
+                       <a href="#paypal" data-toggle="tab">{{ _("Donate with PayPal or Credit Card") }}</a>
+               </li>
+               <li>
+                       <a href="#banktransfer" data-toggle="tab">{{ _("Donate by Bank Transfer") }}</a>
+               </li>
+       </ul>
+       <div class="tab-content">
+               <div class="tab-pane active" id="paypal">
+                       {% if lang == "de" %}
+                               <p>
+                                       PayPal ist unser bevorzugter und gleichzeitig einfachster Weg zu spenden.
+                                       Dazu einfach auf den Button klicken und den gewünschten Betrag eingeben.
+                               </p>
 
-                                       <div class="ac">
-                                               <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="Z44GQ52ZHKVFW">
-                                                       {% if reason_for_transfer %}
-                                                               <input type="hidden" name="item_name" value="{{ reason_for_transfer }}">
-                                                       {% end %}
-                                                       <input type="image" src="https://www.paypalobjects.com/de_DE/DE/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="Jetzt einfach, schnell und sicher online bezahlen – mit PayPal.">
-                                                       <img alt="" border="0" src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif" width="1" height="1">
-                                               </form>
-                                       </div>
-                               {% else %}
-                                       <p>
-                                               PayPal is our preferred way to make donations.
-                                               Simply click on the donate button and type in the
-                                               amount of money you would like to donate.
-                                       </p>
+                               <div class="ac">
+                                       <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="Z44GQ52ZHKVFW">
+                                               {% if reason_for_transfer %}
+                                                       <input type="hidden" name="item_name" value="{{ reason_for_transfer }}">
+                                               {% end %}
+                                               <input type="image" src="https://www.paypalobjects.com/de_DE/DE/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="Jetzt einfach, schnell und sicher online bezahlen – mit PayPal.">
+                                               <img alt="" border="0" src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif" width="1" height="1">
+                                       </form>
+                               </div>
 
-                                       <div class="ac">
-                                               <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="HHBTSN9QRWPAY">
-                                                       {% if reason_for_transfer %}
-                                                               <input type="hidden" name="item_name" value="{{ reason_for_transfer }}">
-                                                       {% end %}
-                                                       <input type="image" src="https://www.paypalobjects.com/en_US/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/de_DE/i/scr/pixel.gif" width="1" height="1">
-                                               </form>
-                                       </div>
-                               {% end %}
-                       </div>
-               </div>
-       </div>
+                               <p>
+                                       Wenn du nicht per PayPal spenden möchtest, kannst du das auch per
+                                       Banküberweisung tun. Dazu einfach oben auf den Button klicken.
+                               </p>
+                       {% else %}
+                               <p>
+                                       PayPal is our preferred way to make donations.
+                                       Simply click on the donate button and type in the
+                                       amount of money you would like to donate.
+                               </p>
 
-       <div class="accordion-group">
-               <div class="accordion-heading">
-                       <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionDonate" href="#collapseTwo">
-                               {{ _("Bank Transfer") }}
-                       </a>
+                               <div class="ac">
+                                       <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="HHBTSN9QRWPAY">
+                                               {% if reason_for_transfer %}
+                                                       <input type="hidden" name="item_name" value="{{ reason_for_transfer }}">
+                                               {% end %}
+                                               <input type="image" src="https://www.paypalobjects.com/en_US/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/de_DE/i/scr/pixel.gif" width="1" height="1">
+                                       </form>
+                               </div>
+
+                               <p>
+                                       If you are not keen on using PayPal, you can also donate by bank transfer.
+                                       Click on the button above to do so.
+                               </p>
+                       {% end %}
                </div>
-               <div id="collapseTwo" class="accordion-body collapse">
-                       <div class="accordion-inner">
-                               {% if lang == "de" %}
-                                       <p>
-                                               Ebenso ist eine Spende auf unser Bankkonto möglich.
-                                       </p>
-                               {% else %}
-                                       <p>
-                                               It is also possible to transfer donations into
-                                               our bank account.
-                                       </p>
-                               {% end %}
 
-                               <div class="row-fluid">
-                                       <div class="span6">
-                                               <h4>{{ _("euro bank transfer") }}</h4>
-                                               <blockquote>
-                                                       {{ _("IBAN") }}: DE86 4265 0150 1020 0768 89<br>
-                                                       {{ _("BIC-/SWIFT-Code") }}: WELADED1REK
-                                                       {% if reason_for_transfer %}
-                                                               <br>
-                                                               {{ _("Reason for transfer") }}:
-                                                               <strong>{{ reason_for_transfer }}</strong>
-                                                       {% end %}
-                                                       </blockquote>
-                                       </div>
+               <div class="tab-pane" id="banktransfer">
+                       {% if lang == "de" %}
+                               <p>
+                                       Ebenso ist eine Spende auf unser Bankkonto möglich.
+                               </p>
+                       {% else %}
+                               <p>
+                                       It is also possible to transfer donations into
+                                       our bank account.
+                               </p>
+                       {% end %}
 
-                                       <div class="span6">
-                                               <h4>{{ _("bank transfer within Germany") }}</h4>
-                                               <blockquote>
-                                                       {{ _("Bank account owner") }}: Michael Tremer<br>
-                                                       {{ _("Bank account number") }}: 1020076889<br>
-                                                       {{ _("Bank code") }}: 426 501 50
-                                                       {% if reason_for_transfer %}
-                                                               <br>
-                                                               {{ _("Reason for transfer") }}:
-                                                               <strong>{{ reason_for_transfer }}</strong>
-                                                       {% end %}
+                       <div class="row-fluid">
+                               <div class="span6">
+                                       <h4>{{ _("euro bank transfer") }}</h4>
+                                       <blockquote>
+                                               {{ _("IBAN") }}: DE86 4265 0150 1020 0768 89<br>
+                                               {{ _("BIC-/SWIFT-Code") }}: WELADED1REK
+                                               {% if reason_for_transfer %}
+                                                       <br>
+                                                       {{ _("Reason for transfer") }}:
+                                                       <strong>{{ reason_for_transfer }}</strong>
+                                               {% end %}
                                                </blockquote>
-                                       </div>
+                               </div>
+
+                               <div class="span6">
+                                       <h4>{{ _("bank transfer within Germany") }}</h4>
+                                       <blockquote>
+                                               {{ _("Bank account owner") }}: Michael Tremer<br>
+                                               {{ _("Bank account number") }}: 1020076889<br>
+                                               {{ _("Bank code") }}: 426 501 50
+                                               {% if reason_for_transfer %}
+                                                       <br>
+                                                       {{ _("Reason for transfer") }}:
+                                                       <strong>{{ reason_for_transfer }}</strong>
+                                               {% end %}
+                                       </blockquote>
                                </div>
                        </div>
                </div>
index 5c25fc83a8a9b4b4e0aaf903541f2cdbba90e8b6..3e1bd0642485b586c7ec88a644bcb29f0e231f7d 100644 (file)
@@ -57,7 +57,9 @@
                <div class="span10 offset1">
                        {{ modules.DonationBox() }}
 
-                       <div class="muted ac">
+                       <hr>
+
+                       <div class="ac">
                                <strong>{{ _("Did you know...?") }}</strong>
 
                                {% if lang == "de" %}
index 4f278702f54918f5c9f90025baf0978e3092ac1d..453b6b0fe260893acb2cb44ba00e10cbcd7f5f95 100644 (file)
                        </a>
                </p>
        {% end %}
+
+       <hr>
+
+       {% if lang == "de" %}
+               <p class="ac">
+                       Wenn du dich nicht entscheiden kannst für was
+                       deine Spende verwendet werden soll, klicke
+                       <a href="http://www.ipfire.org/donate">hier</a>.
+               </p>
+       {% else %}
+               <p class="ac">
+                       In case you cannot decide for which feature
+                       your donation should be used, click
+                       <a href="http://www.ipfire.org/donate">here</a>.
+               </p>
+       {% end %}
 {% end block %}
index db4391eea939e8a85814951901b7099a089ffedf..6c2d575b64ce268596342bdbb818460cddaef149 100644 (file)
@@ -16,7 +16,7 @@
                {% end %}
 
                <div class="progress {{ progress_bar }}">
-                       <div class="bar" style="width: {{ "%.2f%%" % wish.percentage }};"></div>
+                       <div class="bar" style="width: {{ "%.2f%%" % wish.percentage_bar }};"></div>
                </div>
 
                <div class="row-fluid">
index d6b50204ae1f2fde962ff10f916f4b709f635f21..9281b2a727264d6f23a49024c6180aec589c45f1 100644 (file)
@@ -9,18 +9,17 @@
 
        {{ modules.Wishlist([wish,], short=True) }}
 
-       <div class="pull-right">
-               <ul class="unstyled">
-                       <li>
-                               <i class="icon-calendar"></i>
-                               {{ _("Launched: %s") % wish.date_start }}
-                       </li>
-                       <li>
-                               <i class="icon-time"></i>
-                               {{ _("Funding ends: %s") % wish.date_end }}
-                       </li>
-               </ul>
-       </div>
-
        {{ wish.description }}
+
+       <hr>
+
+       <p class="ac">
+               <i class="icon-calendar"></i>
+               {{ _("Launched: %s") % wish.date_start }}
+
+               &bull;
+
+               <i class="icon-time"></i>
+               {{ _("Funding ends: %s") % wish.date_end }}
+       </p>
 {% end block %}
index b3d28196095e509a49911fd4d17ae492b7e0f6c6..a18759a83bd16a5633446194807f1a8dbebbde0f 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-02 13:12+0100\n"
+"POT-Creation-Date: 2012-11-08 21:41+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -641,7 +641,7 @@ msgid "About IPFire"
 msgstr "Über IPFire"
 
 #: templates/base-feature.html:9 templates/static/features/security.html:3
-#: templates/static/features/security.html:9 templates/index.html:118
+#: templates/static/features/security.html:9 templates/index.html:122
 msgid "Security"
 msgstr "Sicherheit"
 
@@ -925,44 +925,44 @@ msgstr "Seeders"
 msgid "Error"
 msgstr "Error"
 
-#: templates/modules/donation-box.html:5
+#: templates/modules/donation-box.html:4
 msgid "Donate with PayPal or Credit Card"
 msgstr "Mit PayPal oder Kreditkarte spenden"
 
-#: templates/modules/donation-box.html:53
-msgid "Bank Transfer"
-msgstr "Banküberweisung"
+#: templates/modules/donation-box.html:7
+msgid "Donate by Bank Transfer"
+msgstr "Per Banküberweisung spenden"
 
-#: templates/modules/donation-box.html:71
+#: templates/modules/donation-box.html:74
 msgid "euro bank transfer"
 msgstr "Europa-Banküberweisung"
 
-#: templates/modules/donation-box.html:73
+#: templates/modules/donation-box.html:76
 msgid "IBAN"
 msgstr "IBAN"
 
-#: templates/modules/donation-box.html:74
+#: templates/modules/donation-box.html:77
 msgid "BIC-/SWIFT-Code"
 msgstr "BIC-/SWIFT-Code"
 
-#: templates/modules/donation-box.html:77
-#: templates/modules/donation-box.html:91
+#: templates/modules/donation-box.html:80
+#: templates/modules/donation-box.html:94
 msgid "Reason for transfer"
 msgstr "Verwendungszweck"
 
-#: templates/modules/donation-box.html:84
+#: templates/modules/donation-box.html:87
 msgid "bank transfer within Germany"
 msgstr "Überweisung innerhalb Deutschlands"
 
-#: templates/modules/donation-box.html:86
+#: templates/modules/donation-box.html:89
 msgid "Bank account owner"
 msgstr "Kontoinhaber"
 
-#: templates/modules/donation-box.html:87
+#: templates/modules/donation-box.html:90
 msgid "Bank account number"
 msgstr "Kontonummer"
 
-#: templates/modules/donation-box.html:88
+#: templates/modules/donation-box.html:91
 msgid "Bank code"
 msgstr "BLZ"
 
@@ -1302,15 +1302,15 @@ msgstr "Impressum"
 msgid "Donation"
 msgstr "Spende"
 
-#: templates/static/donation.html:61
+#: templates/static/donation.html:63
 msgid "Did you know...?"
 msgstr "Schon gewusst?"
 
-#: templates/static/donation.html:77
+#: templates/static/donation.html:79
 msgid "How do we use financial support?"
 msgstr "Wofür werden Spenden eingesetzt?"
 
-#: templates/static/donation.html:129
+#: templates/static/donation.html:131
 msgid "Research & Development"
 msgstr "Forschung & Entwicklung"
 
@@ -1326,15 +1326,19 @@ msgstr "Neu!"
 msgid "What's new?"
 msgstr "Neuigkeiten"
 
-#: templates/index.html:135
+#: templates/index.html:116
+msgid "Support this project with your donation!"
+msgstr "Unterstütze dieses Projekt mit deiner Spende!"
+
+#: templates/index.html:139
 msgid "Flexibility"
 msgstr "Flexibilität"
 
-#: templates/index.html:152
+#: templates/index.html:156
 msgid "Open Source"
 msgstr "Open Source"
 
-#: templates/index.html:169
+#: templates/index.html:173
 msgid "Read more"
 msgstr "Mehr erfahren"
 
index 48de2119bc7f0d7db17882a5f65634a1e59d2ea5..f7986937872776b5b504a57cf01fe85a34c518c2 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-02 13:12+0100\n"
+"POT-Creation-Date: 2012-11-08 21:41+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -632,7 +632,7 @@ msgid "About IPFire"
 msgstr ""
 
 #: templates/base-feature.html:9 templates/static/features/security.html:3
-#: templates/static/features/security.html:9 templates/index.html:118
+#: templates/static/features/security.html:9 templates/index.html:122
 msgid "Security"
 msgstr ""
 
@@ -916,44 +916,44 @@ msgstr ""
 msgid "Error"
 msgstr ""
 
-#: templates/modules/donation-box.html:5
+#: templates/modules/donation-box.html:4
 msgid "Donate with PayPal or Credit Card"
 msgstr ""
 
-#: templates/modules/donation-box.html:53
-msgid "Bank Transfer"
+#: templates/modules/donation-box.html:7
+msgid "Donate by Bank Transfer"
 msgstr ""
 
-#: templates/modules/donation-box.html:71
+#: templates/modules/donation-box.html:74
 msgid "euro bank transfer"
 msgstr ""
 
-#: templates/modules/donation-box.html:73
+#: templates/modules/donation-box.html:76
 msgid "IBAN"
 msgstr ""
 
-#: templates/modules/donation-box.html:74
+#: templates/modules/donation-box.html:77
 msgid "BIC-/SWIFT-Code"
 msgstr ""
 
-#: templates/modules/donation-box.html:77
-#: templates/modules/donation-box.html:91
+#: templates/modules/donation-box.html:80
+#: templates/modules/donation-box.html:94
 msgid "Reason for transfer"
 msgstr ""
 
-#: templates/modules/donation-box.html:84
+#: templates/modules/donation-box.html:87
 msgid "bank transfer within Germany"
 msgstr ""
 
-#: templates/modules/donation-box.html:86
+#: templates/modules/donation-box.html:89
 msgid "Bank account owner"
 msgstr ""
 
-#: templates/modules/donation-box.html:87
+#: templates/modules/donation-box.html:90
 msgid "Bank account number"
 msgstr ""
 
-#: templates/modules/donation-box.html:88
+#: templates/modules/donation-box.html:91
 msgid "Bank code"
 msgstr ""
 
@@ -1293,15 +1293,15 @@ msgstr ""
 msgid "Donation"
 msgstr ""
 
-#: templates/static/donation.html:61
+#: templates/static/donation.html:63
 msgid "Did you know...?"
 msgstr ""
 
-#: templates/static/donation.html:77
+#: templates/static/donation.html:79
 msgid "How do we use financial support?"
 msgstr ""
 
-#: templates/static/donation.html:129
+#: templates/static/donation.html:131
 msgid "Research & Development"
 msgstr ""
 
@@ -1317,15 +1317,19 @@ msgstr ""
 msgid "What's new?"
 msgstr ""
 
-#: templates/index.html:135
+#: templates/index.html:116
+msgid "Support this project with your donation!"
+msgstr ""
+
+#: templates/index.html:139
 msgid "Flexibility"
 msgstr ""
 
-#: templates/index.html:152
+#: templates/index.html:156
 msgid "Open Source"
 msgstr ""
 
-#: templates/index.html:169
+#: templates/index.html:173
 msgid "Read more"
 msgstr ""
 
index 8a0554125716d5c9da0d6f6d4c695aa4147cc1a8..d3b7a26dad47d228995c3d58416d6166241d0a93 100644 (file)
@@ -16,7 +16,7 @@ class Wishlist(object):
                return Databases().webapp
 
        def get(self, slug):
-               wish = self.db.get("SELECT id FROM wishlist WHERE slug = %s", slug)
+               wish = self.db.get("SELECT * FROM wishlist WHERE slug = %s", slug)
 
                if wish:
                        return Wish(self, wish.id)
@@ -25,27 +25,27 @@ class Wishlist(object):
                wishes = []
 
                for row in self.db.query(query):
-                       wish = Wish(self, row.id)
+                       wish = Wish(self, row.id, row)
                        wishes.append(wish)
 
                return wishes
 
        def get_all_running(self):
-               return self.get_all_by_query("SELECT id FROM wishlist \
+               return self.get_all_by_query("SELECT * FROM wishlist \
                        WHERE DATE(NOW()) >= date_start AND DATE(NOW()) <= date_end AND published = 'Y'\
                        ORDER BY prio ASC, date_end ASC")
 
        def get_all_finished(self):
-               return self.get_all_by_query("SELECT id FROM wishlist \
+               return self.get_all_by_query("SELECT * FROM wishlist \
                        WHERE DATE(NOW()) > date_end AND published = 'Y' ORDER BY date_end ASC")
 
 
 class Wish(object):
-       def __init__(self, wishlist, id):
+       def __init__(self, wishlist, id, data=None):
                self.wishlist = wishlist
                self.id = id
 
-               self.__data = None
+               self.__data = data
 
        def __cmp__(self, other):
                return cmp(self.date_end, other.date_end)
@@ -90,6 +90,13 @@ class Wish(object):
        def percentage(self):
                return (self.donated / self.goal) * 100
 
+       @property
+       def percentage_bar(self):
+               if self.percentage > 100:
+                       return 100
+
+               return self.percentage
+
        @property
        def running(self):
                if self.remaining_days < 0: