class OfferAdmin(admin.ModelAdmin):
model = Offer
- list_display = ['title', 'author', 'target', 'sum', 'state', 'start', 'end', 'due']
+ list_display = ['title', 'author', 'target', 'sum', 'is_win', 'start', 'end', 'due']
search_fields = ['title', 'author']
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-03-27 17:36+0100\n"
-"PO-Revision-Date: 2013-03-27 17:36+0100\n"
-"Last-Translator: Radek Czajka <radek.czajka@gmail.com>\n"
+"POT-Creation-Date: 2013-04-25 10:52+0200\n"
+"PO-Revision-Date: 2013-04-25 10:52+0100\n"
+"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
#: forms.py:10
+#: templates/funding/wlfund.html:25
+msgid "Amount"
+msgstr "Kwota"
+
+#: forms.py:12
msgid "Name"
msgstr "Imię i nazwisko"
-#: forms.py:11
-msgid "Anonymously"
-msgstr "Anonimowo"
-
#: forms.py:13
-msgid "Check if you don't want your name to be visible publicly."
-msgstr "Zaznacz, jeśli nie chcesz by Twoje nazwisko było widoczne publicznie."
-
-#: forms.py:14
-msgid "E-mail"
-msgstr "E-mail"
-
-#: forms.py:15
-msgid "Won't be publicised."
-msgstr "Nie zostanie opublikowany."
+msgid "Optional name for public list of contributors. <br/>Leave empty if you prefer to remain anonymous. <br/>If we need any data for your perks, we'll get to you by e-mail anyway."
+msgstr "Opcjonalnie imię i nazwisko lub pseudonim do listy darczyńców. <br/>Zostaw puste, jeśli wolisz pozostać anonimową/anonimowym.<br/>Jeśli będziemy potrzebować Twoich danych, by wysłać Ci prezenty, zwrócimy się do Ciebie e-mailem."
#: forms.py:16
-msgid "Amount"
-msgstr "Kwota"
+msgid "Contact e-mail"
+msgstr "E-mail kontaktowy"
+
+#: forms.py:17
+msgid "Won't be publicised. <br/>We'll use it to contact you about your perks and fundraiser status updates.<br/> Leave empty if you prefer not to be contacted by us."
+msgstr "Nie będzie publikowany.<br/>Użyjemy go do kontaktowania się z Tobą w sprawie prezentów i informacji o zmianach statusu zbiórki.<br/>Zostaw puste, jeśli nie chcesz abyśmy się z Tobą kontaktowali."
-#: models.py:13
+#: models.py:15
msgid "author"
msgstr "autor"
-#: models.py:14
+#: models.py:16
msgid "title"
msgstr "tytuł"
-#: models.py:15
+#: models.py:17
msgid "slug"
msgstr "slug"
-#: models.py:17
-msgid "Published book."
-msgstr "Opublikowana książka."
-
#: models.py:18
-msgid "redakcja URL"
-msgstr "URL na Redakcji"
+#: models.py:100
+msgid "description"
+msgstr "opis"
#: models.py:19
msgid "target"
msgid "When will it be published if the money is raised."
msgstr "Kiedy książka zostanie opublikowana, jeśli uda się zebrać pieniądze."
+#: models.py:24
+msgid "redakcja URL"
+msgstr "URL na Redakcji"
+
#: models.py:26
-#: models.py:82
+msgid "Published book."
+msgstr "Opublikowana książka."
+
+#: models.py:29
#: models.py:97
+#: models.py:118
msgid "offer"
msgstr "zbiórka"
-#: models.py:27
+#: models.py:30
msgid "offers"
msgstr "zbiórki"
-#: models.py:83
+#: models.py:98
msgid "price"
msgstr "cena"
-#: models.py:84
-#: models.py:98
+#: models.py:99
+#: models.py:119
msgid "name"
msgstr "nazwa"
-#: models.py:85
-msgid "description"
-msgstr "opis"
+#: models.py:101
+msgid "end date"
+msgstr "data końcowa"
-#: models.py:88
+#: models.py:104
msgid "perk"
msgstr "prezent"
-#: models.py:89
-#: models.py:102
+#: models.py:105
+#: models.py:123
msgid "perks"
msgstr "prezenty"
-#: models.py:99
+#: models.py:120
msgid "email"
msgstr "e-mail"
-#: models.py:100
-#: models.py:115
+#: models.py:121
+#: models.py:150
msgid "amount"
msgstr "kwota"
-#: models.py:101
+#: models.py:122
msgid "payed at"
msgstr "data wpłaty"
-#: models.py:103
-msgid "anonymous"
-msgstr "anonimowo"
-
-#: models.py:106
+#: models.py:133
msgid "funding"
msgstr "wpłata"
-#: models.py:107
+#: models.py:134
msgid "fundings"
msgstr "wpłaty"
-#: models.py:116
+#: models.py:151
msgid "when"
msgstr "kiedy"
-#: models.py:120
+#: models.py:154
msgid "money spent on a book"
msgstr "pieniądze wydane na książkę"
-#: models.py:121
+#: models.py:155
msgid "money spent on books"
msgstr "pieniądze wydane na książki"
-#: templates/funding/offer_detail.html:22
-msgid "Support"
-msgstr "Wesprzyj"
+#: templates/funding/no_thanks.html:5
+#: templates/funding/no_thanks.html.py:9
+msgid "Payment failed"
+msgstr "Płatność nie doszła do skutku"
+
+#: templates/funding/no_thanks.html:12
+msgid "You're support has not been processed successfully."
+msgstr "Twoje wsparcie nie zostało zaksięgowane."
+
+#: templates/funding/no_thanks.html:17
+#: templates/funding/thanks.html:29
+msgid "Go back to the current fundraiser."
+msgstr "Wróć do aktualnej zbiórki."
+
+#: templates/funding/offer_detail.html:24
+msgid "Support the publication"
+msgstr "Wesprzyj publikację"
-#: templates/funding/offer_detail.html:39
+#: templates/funding/offer_detail.html:29
+msgid "Donate!"
+msgstr "Wpłać!"
+
+#: templates/funding/offer_detail.html:35
+msgid "See all fundraisers."
+msgstr "Zobacz wszystkie zbiórki."
+
+#: templates/funding/offer_detail.html:40
msgid "Supporters"
msgstr "Wpłaty"
-#: templates/funding/offer_detail.html:49
+#: templates/funding/offer_detail.html:54
msgid "Anonymous"
msgstr "Anonim"
-#: templates/funding/offer_list.html:6
-#: templates/funding/offer_list.html:9
-msgid "Support Wolne Lektury"
-msgstr "Wspieraj Wolne Lektury"
+#: templates/funding/offer_list.html:7
+#: templates/funding/offer_list.html:12
+msgid "All fundraisers"
+msgstr "Wszystkie zbiórki"
+
+#: templates/funding/offer_list.html:20
+msgid "Current fundraiser:"
+msgstr "Aktualna zbiórka:"
-#: templates/funding/offer_list.html:16
-msgid "funding closed"
-msgstr "zbiórka zakończona"
+#: templates/funding/offer_list.html:22
+#: templates/funding/offer_list.html:38
+msgid "Previous fundraisers:"
+msgstr "Poprzednie zbiórki:"
#: templates/funding/thanks.html:5
-#: templates/funding/thanks.html.py:9
+#: templates/funding/thanks.html.py:12
+msgid "Thank you for your support!"
+msgstr "Dziękujemy za Twoje wsparcie!"
+
+#: templates/funding/thanks.html:9
msgid "Thank you!"
msgstr "Dziękujemy!"
-#: templates/funding/thanks.html:12
-msgid "Thank you for your support!"
-msgstr "Dziękujemy za Twoje wsparcie!"
+#: templates/funding/thanks.html:15
+#: templates/funding/tags/offer_status.html:18
+msgid "Full amount was successfully raised!"
+msgstr "Udało się zebrać pełną kwotę!"
-#: templates/funding/thanks.html:14
-msgid "Go back to the current fundraiser."
-msgstr "Wróć do aktualnej zbiórki."
+#: templates/funding/thanks.html:17
+#: templates/funding/tags/offer_status.html:6
+#, python-format
+msgid ""
+"The fundraiser\n"
+" ends on %(end)s. The book will be published by %(due)s."
+msgstr "Zbiórka kończy się %(end)s. Książka zostanie opublikowana do %(due)s."
+
+#: templates/funding/thanks.html:20
+#, python-format
+msgid ""
+"Your\n"
+" donation will be spent on publishing\n"
+" the book %(b)s if the full amount is raised by %(end)s.\n"
+" The book will then be published by %(due)s."
+msgstr "Pieniądze przez Ciebie wpłacone zostaną przekazane napublikację książki %(b)s, jeśli do %(end)s uda nam się zebrać pełnąkwotę potrzebną na digitalizację, redakcję techniczną i literacką.Książka zostanie wówczas opublikowana do %(due)s."
+
+#: templates/funding/thanks.html:32
+msgid "Tell your friends!"
+msgstr "Powiedz swoim znajomym!"
+
+#: templates/funding/thanks.html:34
+msgid "I support Wolne Lektury."
+msgstr "Wspieram Wolne Lektury"
#: templates/funding/wlfund.html:4
#: templates/funding/wlfund.html.py:8
-msgid "Wolne Lektury Fund"
-msgstr "Fundusz Wolnych Lektur"
+msgid "Remaining funds"
+msgstr "Pozostałe środki"
-#: templates/funding/wlfund.html:14
+#: templates/funding/wlfund.html:11
+#, python-format
+msgid ""
+"If\n"
+"the full amount needed for publishing a book is not raised in time,\n"
+"the funds are spent on <a href=\"%(r)s\">other books waiting for\n"
+"publication</a>. The same thing happens with any money remaining\n"
+"from successful fundraisers."
+msgstr "Jeśli nie udało się zebrać pełnej kwoty potrzebnej do opublikowaniaksiążki, środki przekazujemy na redakcję <a href=\"%(r)s\">innych utworów oczekujących napublikację w serwisie</a>. Na ten celprzekazujemy również pozostałe środki ze zbiórek ukończonych sukcesem."
+
+#: templates/funding/wlfund.html:16
+msgid "Spending these remaining funds is recorded in this table."
+msgstr "W poniższej tabeli rejetrujemy wydatkowanie tych środków."
+
+#: templates/funding/wlfund.html:23
+msgid "Date"
+msgstr "Data"
+
+#: templates/funding/wlfund.html:24
+msgid "Title"
+msgstr "Tytuł"
+
+#: templates/funding/wlfund.html:26
msgid "Balance"
msgstr "Bilans"
-#: templates/funding/wlfund.html:26
-msgid "Book"
-msgstr "Książka"
+#: templates/funding/wlfund.html:33
+msgid "Money spent on publishing the book"
+msgstr "Pieniądze przeznaczone na opublikowanie książki"
-#: templates/funding/wlfund.html:34
-msgid "Excessive money from fundraiser"
-msgstr "Pieniądze pozostałe ze zbiórki"
+#: templates/funding/wlfund.html:42
+msgid "Money remaining from the fundraiser for"
+msgstr "Pieniądze pozostałe ze zbiórki na"
-#: templates/funding/tags/funding.html:10
-msgid "Support a book:"
-msgstr "Wesprzyj książkę:"
+#: templates/funding/snippets/any_remaining.html:3
+#, python-format
+msgid ""
+"Any <a href=\"%(wlfund)s\">remaining funds</a> will be spent\n"
+"on other books waiting to be published in the library."
+msgstr "Wszelkie <a href=\"%(wlfund)s\">pozostałe środki</a> przeznaczymy na inne książki czekające na publikację w serwisie."
-#: templates/funding/tags/funding.html:14
+#: templates/funding/tags/funding.html:8
+msgid "Support a book!"
+msgstr "Wesprzyj kolejną publikację!"
+
+#: templates/funding/tags/funding.html:21
msgid "collected"
msgstr "zebrane"
-#: templates/funding/tags/funding.html:16
+#: templates/funding/tags/funding.html:24
+msgid "missing"
+msgstr "brakuje"
+
+#: templates/funding/tags/funding.html:27
msgid "until fundraiser end"
msgstr "do końca zbiórki"
-#: templates/funding/tags/offer_detail_head.html:5
+#: templates/funding/tags/offer_status.html:11
#, python-format
msgid ""
"If the target is met\n"
" by %(end)s, this book will be published by %(due)s."
msgstr "Jeśli do %(end)s uda się zebrać pełną kwotę, książka zostanie opublikowana do %(due)s."
-#: templates/funding/tags/offer_detail_head.html:10
+#: templates/funding/tags/offer_status.html:22
+msgid "The amount needed was not raised."
+msgstr "Nie udało się zebrać pełnej kwoty."
+
+#: templates/funding/tags/offer_status_more.html:12
#, python-format
msgid ""
-"Any excessive money will be transfered to the\n"
-" <a href=\"%(url)s\">Wolne Lektury Fund</a>."
+"The book\n"
+" <a href=\"%(bu)s\">%(bt)s</a> has been already published."
msgstr ""
-"Wszelkie pozostałe środki zostaną przekazane na\n"
-" <a href=\"%(url)s\">Fundusz Wolnych Lektur</a>."
-
-#: templates/funding/tags/offer_detail_head.html:15
-msgid "See the published book:"
-msgstr "Zobacz opublikowaną książkę:"
-
-#: templates/funding/tags/offer_detail_head.html:18
-msgid "Funding target has been met!"
-msgstr "Udało się zebrać pełną kwotę!"
+"Książka\n"
+" <a href=\"%(bu)s\">%(bt)s</a> została opublikowana."
-#: templates/funding/tags/offer_detail_head.html:19
-msgid "The book will be published by:"
-msgstr "Książka zostanie opublikowana do"
-
-#: templates/funding/tags/offer_detail_head.html:22
+#: templates/funding/tags/offer_status_more.html:15
#, python-format
-msgid "You can follow the work on the <a href=\"%(url)s\">Editorial Platform</a>."
-msgstr "Możesz śledzić prace na <a href=\"%(url)s\">Platformie Redakcyjnej</a>."
-
-#: templates/funding/tags/offer_detail_head.html:28
-msgid "Funding target has not been met."
-msgstr "Nie udało się zebrać pełnej kwoty."
+msgid ""
+"The book\n"
+" will be published by %(due)s."
+msgstr "Książka zostanie opublikowana do %(due)s."
-#: templates/funding/tags/offer_detail_head.html:31
+#: templates/funding/tags/offer_status_more.html:18
#, python-format
msgid ""
-"Collected funds have been transfered to the\n"
-" <a href=\"%(url)s\">Wolne Lektury Fund</a>."
-msgstr ""
-"Zebrane środki zostały przekazane na\n"
-" <a href=\"%(url)s\">Fundusz Wolnych Lektur</a>."
+"You can follow\n"
+" the work on the <a href=\"%(r)s\">Editorial Platform</a>."
+msgstr "Możesz śledzić prace na <a href=\"%(r)s\">Platformie Redakcyjnej</a>."
-#: templates/funding/widgets/amount.html:12
+#: templates/funding/widgets/amount.html:13
msgid "Other amount"
msgstr "Inna kwota"
ordering = ['-end']
def __unicode__(self):
- return u"%s – %s" % (self.author, self.title)
+ return u"%s - %s" % (self.author, self.title)
def get_absolute_url(self):
return reverse('funding_offer', args=[self.slug])
def is_current(self):
return self.start <= date.today() <= self.end
+ def is_win(self):
+ return self.sum() >= self.target
+
+ def remaining(self):
+ if self.is_current():
+ return None
+ if self.is_win():
+ return self.sum() - self.target
+ else:
+ return self.sum()
+
@classmethod
def current(cls):
""" Returns current fundraiser or None. """
""" The money gathered. """
return self.funding_payed().aggregate(s=models.Sum('amount'))['s'] or 0
- def state(self):
- if self.sum() >= self.target:
- return 'win'
- elif self.start <= date.today() <= self.end:
- return 'running'
- else:
- return 'lose'
-
class Perk(models.Model):
""" A perk offer.
-a.funding{font-size:1.5em;padding:.5em 1em;display:block;color:#000;background-image:url(/static/img/green-pixel.png);background-repeat:repeat-y;background-color:rgba(13, 126, 133, .2)}a.funding .mono{font-size:.9em}.wlfund{width:100%;border-collapse:collapse}.wlfund td{padding:0 0 1em 0;text-align:center}.wlfund td:last-child{text-align:right}.wlfund td div{padding:1em;box-shadow:0 2px 0 #DDD}.wlfund .funding-plus td div{background:rgba(13, 126, 133, .2)}.wlfund .funding-minus td div{bbackground:rgba(255, 0, 0, .2);background:#fff}.funding-stale .funding{opacity:.5}button.honking{background:#018189;font-size:1.5em;padding:.5em;color:#fff;border:0}button.honking:hover{background:rgb(.537%, 69.284%, 73.581%)}
\ No newline at end of file
+.funding{background:orange}.funding a.call{font-size:1.5em;height:1.2em;width:13em;position:relative;padding:.35em .5em;margin:.5em;display:inline-block;vertical-align:top;box-shadow:.2em .2em .3em #888;text-align:center;background:#fff;color:#4E56C8}.funding a.call:hover{box-shadow:none;top:.1em;left:.1em}.funding .description{display:inline-block;padding-left:.6em}.funding strong{font-size:1.5em;padding:.2em .2em 0;display:block}.funding strong a{color:#000}.funding .progress{width:95.7em;margin:.1em .3em .4em;border-radius:2em;background-image:url(/static/img/progress-pixel.png);background-repeat:repeat-y;background-color:rgba(236, 109, 0, .5);box-shadow:.1em .1em .1em #888}.funding .progress .piece{font-size:1.3em;padding:.3em .5em}.funding .with-button .progress{width:73em}.wlfund{width:100%;border-collapse:collapse}.wlfund td{padding:0 0 1em 0;text-align:center}.wlfund td:last-child{text-align:right}.wlfund td div{padding:1em;box-shadow:0 2px 0 #DDD}.wlfund .funding-plus td div{background:rgba(13, 126, 133, .2)}.wlfund .funding-minus td div{background:#fff}button.honking{background:#018189;font-size:1.5em;padding:.5em;color:#fff;border:0;box-shadow:.2em .2em .3em #888;position:relative}button.honking:hover{box-shadow:none;top:.1em;left:.1em}
\ No newline at end of file
-a.funding {
- font-size: 1.5em;
- padding: .5em 1em;
- display: block;
- color: black;
-
- background-image: url(/static/img/green-pixel.png);
- background-repeat: repeat-y;
- background-color: fade-out(#0D7E85, .8);
+.funding {
+ background: orange;
- .mono {
- font-size: .9em;
+ a.call {
+ font-size: 1.5em;
+ height: 1.2em;
+ width: 13em;
+ position: relative;
+ padding: .35em .5em;
+ margin: .5em;
+ display: inline-block;
+ vertical-align: top;
+ box-shadow: 0.2em 0.2em 0.3em #888888;
+ text-align: center;
+ background: white;
+ color: #4E56C8;
+ }
+ a.call:hover {
+ box-shadow: none;
+ top: .1em;
+ left: .1em;
+ }
+ .description {
+ display: inline-block;
+ padding-left: .6em;
+ }
+ strong {
+ font-size: 1.5em;
+ padding: .2em .2em 0;
+ display: block;
+ a {
+ color: black;
+ }
+ }
+ .progress {
+ .piece {
+ font-size: 1.3em;
+ padding: .3em .5em;
+ }
+ width: 95.7em;
+ margin: .1em .3em .4em;
+ border-radius: 2em;
+ background-image: url(/static/img/progress-pixel.png);
+ background-repeat: repeat-y;
+ background-color: fade-out(#ec6d00, .5);
+ box-shadow: .1em .1em .1em #888;
+ }
+ .with-button .progress {
+ width: 73em;
}
}
+
+
+
.wlfund {
width: 100%;
border-collapse: collapse;
}
.funding-minus td div {
- bbackground: fade-out(red, .8);
background: white;
}
}
-.funding-stale {
- .funding {
- opacity: .5;
- }
-}
-
button.honking {
background: #018189;
padding: .5em;
color: white;
border: 0;
+ box-shadow: 0.2em 0.2em 0.3em #888888;
+ position: relative;
}
button.honking:hover {
- background: lighten(#018189, .1);
+ box-shadow: none;
+ top: .1em;
+ left: .1em;
+
}
{% load url from future %}
{% load i18n %}
{% load funding_tags %}
+{% load pagination_tags %}
{% block titleextra %}{{ object }}{% endblock %}
{% block body %}
<h1>{{ object }}</h1>
-<div class="white-box">
- {% funding object %}
- {% offer_detail_head object %}
+<div class="normal-text">{{ object.description|safe }}</div>
- {% if object.state == 'running' %}
+{% funding object %}
+<div class="white-box">
+ {% offer_status object %}
+ {% offer_status_more object %}
+ {% if object.is_current %}
<div class="normal-text">
-
- <h3>{% trans "Support" %}</h3>
+ <h3>{% trans "Support the publication" %}</h3>
<form action="" method="post">
{% csrf_token %}
<table>
{{ form.as_table }}
- <tr><td></td><td><button class="honking" type="submit">Wpłać!</button></td></tr>
+ <tr><td></td><td><button class="honking" type="submit">{% trans "Donate!" %}</button></td></tr>
</table>
</form>
-
</div>
{% endif %}
- <div class="normal-text">{{ object.description|safe }}</div>
-
- <p class="normal-text"><a href="{% url 'funding' %}">Zobacz wszystkie zbiórki.</a></p>
+ <p class="normal-text"><a href="{% url 'funding' %}">{% trans "See all fundraisers." %}</a></p>
</div>
<h2>{% trans "Supporters" %}:</h2>
<div class="white-box normal-text">
+{% with object.funding_payed.all as fundings %}
<table class="wlfund">
- {% for funding in object.funding_payed.all %}
+ {% autopaginate fundings 10 %}
+ {% for funding in fundings %}
<tr class="funding-plus">
<td><div>{{ funding.payed_at.date }}</div></td>
<td><div>
<em>{% trans "Anonymous" %}</em>
{% endif %}
</div></td>
- <td><div>+{{ funding.amount }} zł</div></td>
+ <td><div>{{ funding.amount }} zł</div></td>
<td><div>
{% for perk in funding.perks.all %}
{{ perk.name }}{% if not forloop.last %},{% endif %}
</div></td>
{% endfor %}
</table>
-
+
+ {% paginate %}
+{% endwith %}
</div>
{% endblock %}
{% load url from future %}
{% load i18n %}
{% load funding_tags %}
+{% load pagination_tags %}
-{% block titleextra %}{% trans "Support Wolne Lektury" %}{% endblock %}
+{% block titleextra %}{% trans "All fundraisers" %}{% endblock %}
+
+{% block bodyid %}funding-offer-list{% endblock %}
{% block body %}
-<h1>{% trans "Support Wolne Lektury" %}</h1>
+<h1>{% trans "All fundraisers" %}</h1>
+
+
+{% autopaginate object_list 10 %}
+{% for offer in object_list %}
+{% with is_win=offer.is_win is_current=offer.is_current %}
-{% for funding in object_list %}
- {% if funding.is_current %}
+ {% if is_current %}
<h2>{% trans "Current fundraiser:" %}</h2>
{% elif forloop.is_first %}
<h2>{% trans "Previous fundraisers:" %}</h2>
{% endif %}
- <div class="white-box funding-{% if funding.is_current %}current{% else %}stale{% endif %}">
- <p class="normal-text">{{ funding.start }} – {{ funding.end }}
- {% if not funding.is_current %}
- ({% trans "funding closed" %})
- {% endif %}
- </p>
- {% funding funding link=1 %}
- {% offer_detail_head funding %}
+
+ <div class="normal-text">
+ {% offer_status offer %}
</div>
- {% if funding.is_current and not forloop.is_last %}
+
+ {% funding offer link=1 %}
+
+
+ <div class="white-box normal-text">
+ {% offer_status_more offer %}
+ </div>
+
+ </div>
+ {% if is_current and not forloop.is_last %}
<h2>{% trans "Previous fundraisers:" %}</h2>
{% endif %}
+
+{% endwith %}
{% endfor %}
+{% paginate %}
{% endblock %}
--- /dev/null
+{% load i18n %}
+{% url 'funding_wlfund' as wlfund %}
+{% blocktrans %}Any <a href="{{wlfund}}">remaining funds</a> will be spent
+on other books waiting to be published in the library.{% endblocktrans %}
{% load i18n %}
{% load time_tags %}
{% if offer %}
-<a
- class="funding {{ add_class }}"
- style="background-size: {{ percentage|stringformat:'.2f' }}% 1px;"
- {% if link %}href="{{ offer.get_absolute_url }}"{% endif %}
- >
- {% if is_current %}
- {% trans "Support a book:" %}
- {% endif %}
- <em>{{ offer }}</em>
- <span style="float:right">
- <span style="display:inline-block;margin-right: 1.5em;">{% trans "missing" %}: <em>{{ missing }} zł</em></span>
- <span style="display:inline-block;margin-right: 1.5em;">{% trans "collected" %}: <em>{{ sum }} </em></span>
- {% if is_current %}
- <span style="display:inline-block;margin-right: 0em;">{% trans "until fundraiser end" %}:
- <strong class="countdown inline mono" data-until='{{ offer.end|date_to_utc:True|utc_for_js }}'></strong>
- </span>
+{% spaceless %}
+<div class="funding" style="">
+ {% if link and is_current %}
+ <a class="call" href="{{ offer.get_absolute_url }}">
+ {% trans "Support a book!" %}</a>
{% endif %}
- </span>
- <div style="clear:both"></div>
-</a>
+ <div class="description {% if link and is_current %}with-button{% endif %}"
+ style="display: inline-block;">
+ <strong>
+ {% if link %}<a href="{{ offer.get_absolute_url }}">{% endif %}
+ {{ offer }}
+ {% if link %}</a>{% endif %}
+ </strong>
+ <div class="progress"
+ style="text-align: center; background-size: {{ percentage|stringformat:'.2f' }}% 1px;"
+ >
+ {% if sum %}
+ <span class="piece" style="float:left">{% trans "collected" %}: <em>{{ sum }} </em></span>
+ {% endif %}
+ {% if not is_win %}
+ <span class="piece" style="float: right">{% trans "missing" %}: <em>{{ missing }} zł</em></span>
+ {% endif %}
+ {% if is_current %}
+ <span class="piece" style="display:inline-block;margin-right: 0em;">{% trans "until fundraiser end" %}:
+ <span class="countdown inline" data-until='{{ offer.end|date_to_utc:True|utc_for_js }}'></span>
+ </span>
+ {% endif %}
+
+ <div style="clear: both"></div>
+ </div>
+ </div>
+</div>
+{% endspaceless %}
{% endif %}
+++ /dev/null
-{% load url from future %}
-{% load i18n %}
-{% if state == "running" %}
- <p class="normal-text">
- {% blocktrans with due=offer.due end=offer.end %}If the target is met
- by {{ end }}, this book will be published by {{ due }}.{% endblocktrans %}
- </p>
- <p class="normal-text">
- {% url 'funding_wlfund' as url %}
- {% blocktrans %}Any excessive money will be transfered to the
- <a href="{{ url }}">Wolne Lektury Fund</a>.{% endblocktrans %}
- </p>
-{% elif state == "win" %}
- {% if offer.book %}
- <p class="normal-text">{% trans "See the published book:" %}
- <a href="{{ offer.book.get_absolute_url }}">{{ offer.book }}</a>.</p>
- {% else %}
- <p class="normal-text">{% trans "Funding target has been met!" %}</p>
- <p class="normal-text">{% trans "The book will be published by:" %} {{ offer.due }}.
- {% if offer.redakcja_url %}
- {% with url=offer.redakcja_url %}
- {% blocktrans %}You can follow the work on the <a href="{{ url }}">Editorial Platform</a>.{% endblocktrans %}
- {% endwith %}
- {% endif %}
- </p>
- {% endif %}
-{% elif state == "lose" %}
- <p class="normal-text">{% trans "Funding target has not been met." %}
- {% if offer.sum %}
- {% url 'funding_wlfund' as url %}
- {% blocktrans %}Collected funds have been transfered to the
- <a href="{{ url }}">Wolne Lektury Fund</a>.{% endblocktrans %}
- {% endif %}
- </p>
-{% endif %}
--- /dev/null
+{% load i18n %}
+
+{% if offer.is_current %}
+ {% if offer.is_win %}
+ <p class="normal-text">
+ {% blocktrans with due=offer.due end=offer.end %}The fundraiser
+ ends on {{ end }}. The book will be published by {{ due }}.{% endblocktrans %}
+ </p>
+ {% else %}
+ <p class="normal-text">
+ {% blocktrans with due=offer.due end=offer.end %}If the target is met
+ by {{ end }}, this book will be published by {{ due }}.{% endblocktrans %}
+ </p>
+ {% endif %}
+{% else %}
+ {% if offer.is_win %}
+ <p class="normal-text">
+ {% trans "Full amount was successfully raised!" %}
+ </p>
+ {% else %}
+ <p class="normal-text">
+ {% trans "The amount needed was not raised." %}
+ </p>
+ {% endif %}
+{% endif %}
--- /dev/null
+{% load i18n %}
+
+{% if offer.is_current %}
+ <p class="normal-text">
+ {% include "funding/snippets/any_remaining.html" %}
+ </p>
+{% else %}
+ <p class="date normal-text">{{ offer.start }} – {{ offer.end }}</p>
+ {% if offer.is_win %}
+ <p class="normal-text">
+ {% if offer.book %}
+ {% blocktrans with bu=offer.book.get_absolute_url bt=offer.book %}The book
+ <a href="{{ bu }}">{{ bt }}</a> has been already published.{% endblocktrans %}
+ {% else %}
+ {% blocktrans with due=offer.due %}The book
+ will be published by {{ due }}.{% endblocktrans %}
+ {% if offer.redakcja_link %}
+ {% blocktrans with r=offer.redakcja_url %}You can follow
+ the work on the <a href="{{ r }}">Editorial Platform</a>.{% endblocktrans %}
+ {% endif %}
+ {% endif %}
+ </p>
+ {% endif %}
+
+ {% if offer.remaining %}
+ <p class="normal-text">{% include "funding/snippets/any_remaining.html" %}</p>
+ {% endif %}
+{% endif %}
{% load i18n %}
{% load fnp_share %}
-{% block titleextra %}{% trans "Thank you!" %}{% endblock %}
+{% block titleextra %}{% trans "Thank you for your support!" %}{% endblock %}
{% block body %}
{% trans "Thank you for your support!" %}
-{% url 'funding_current' as c %}
-<p>{% blocktrans %}Your support will appear on the <a href="{{ c }}">
-current fundraiser page</a> shortly.{% endblocktrans %}</p>
+{% if offer.is_win %}
+ <p>{% trans "Full amount was successfully raised!" %}</p>
+ <p>{% blocktrans with due=offer.due end=offer.end %}The fundraiser
+ ends on {{ end }}. The book will be published by {{ due }}.{% endblocktrans %}</p>
+{% else %}
+ <p>{% blocktrans with b=object.title due=offer.due end=offer.end %}Your
+ donation will be spent on publishing
+ the book {{ b }} if the full amount is raised by {{ end }}.
+ The book will then be published by {{ due }}.{% endblocktrans %}</p>
+{% endif %}
-<p>{% trans "Tell your friends about the fundraiser!" %}</p>
+<p>{% include "funding/snippets/any_remaining.html" %}</p>
+
+{% url 'funding_current' as current %}
+<p><a href="{{ current }}">{% trans "Go back to the current fundraiser." %}</a></p>
+
+
+<p>{% trans "Tell your friends!" %}</p>
<p>{% share current _("I support Wolne Lektury.") %}</p>
{% extends "base.html" %}
{% load i18n %}
-{% block titleextra %}{% trans "Wolne Lektury Fund" %}{% endblock %}
+{% block titleextra %}{% trans "Remaining funds" %}{% endblock %}
{% block body %}
-<h1>{% trans "Wolne Lektury Fund" %}</h1>
+<h1>{% trans "Remaining funds" %}</h1>
+
+<div class="left-column normal-text">
+<p>{% blocktrans with r="http://redakcja.wolnelektury.pl/" %}If
+the full amount needed for publishing a book is not raised in time,
+the funds are spent on <a href="{{r}}">other books waiting for
+publication</a>. The same thing happens with any money remaining
+from successful fundraisers.{% endblocktrans %}</p>
+<p>{% trans "Spending these remaining funds is recorded in this table." %}</p>
+</div>
<table class="normal-text wlfund">
<tr>
+ <td><div>{% trans "Date" %}:</div></td>
+ <td><div>{% trans "Title" %}:</div></td>
+ <td><div>{% trans "Amount" %}:</div></td>
<td><div>{% trans "Balance" %}:</div></td>
- <td><div> </div></td>
- <td><div>{{ amount }} zł</div></td>
- <td><div> </div></td>
</tr>
{% for tag, entry in log %}
{% if tag == 'spent' %}
<tr class="funding-minus">
<td><div>{{ entry.timestamp }}</div></td>
+ <td>{% trans "Money spent on publishing the book" %}:
+ <a href="{{ entry.book.get_absolute_url }}">
+ {{ entry.book }}</a></td>
<td><div>-{{ entry.amount }} zł</div></td>
<td><div>{{ entry.total }} zł</div></td>
- <td><div>{% trans "Book" %}: <a href="{{ entry.book.get_absolute_url }}">
- {{ entry.book }}</a></div></td>
</tr>
{% else %}
<tr class="funding-plus">
<td><div>{{ entry.end }}</div></td>
- <td><div>+{{ entry.wlfund }} zł</div></td>
- <td><div>{{ entry.total }} zł</div></td>
- <td><div>{% trans "Excessive money from fundraiser" %}:
+ <td>{% trans "Money remaining from the fundraiser for" %}:
<a href="{{ entry.get_absolute_url }}">
- {{ entry }}</a></div></td>
+ {{ entry }}</a></td>
+ <td><div>{{ entry.total }} zł</div></td>
+ <td><div>+{{ entry.wlfund }} zł</div></td>
</tr>
{% endif %}
{% endfor %}
}
-@register.inclusion_tag("funding/tags/offer_detail_head.html")
-def offer_detail_head(offer):
+@register.inclusion_tag("funding/tags/offer_status.html")
+def offer_status(offer):
return {
'offer': offer,
- 'state': offer.state(),
}
+@register.inclusion_tag("funding/tags/offer_status_more.html")
+def offer_status_more(offer):
+ return {
+ 'offer': offer,
+ }
+
+
def get_context_data(self, *args, **kwargs):
ctx = super(ThanksView, self).get_context_data(*args, **kwargs)
+ ctx['offer'] = Offer.current()
ctx['funding_no_show_current'] = True
return ctx
# -*- coding: utf-8 -*-
from django.conf import settings
from django.db.models.fields import Field, CharField
+from django.utils.translation import string_concat
from modeltranslation.utils import get_language, build_localized_fieldname
# Copy the verbose name and append a language suffix (will e.g. in the
# admin). This might be a proxy function so we have to check that here.
- if hasattr(translated_field.verbose_name, '_proxy____unicode_cast'):
- verbose_name = \
- translated_field.verbose_name._proxy____unicode_cast()
- else:
- verbose_name = translated_field.verbose_name
- self.verbose_name = '%s [%s]' % (verbose_name, language)
+ self.verbose_name = string_concat(translated_field.verbose_name,
+ ' [%s]' % (language, ))
def pre_save(self, model_instance, add):
val = super(TranslationField, self).pre_save(model_instance, add)
-@import url("screen.css");
-@import url("antiscreen.css") handheld;
-@import url("antiscreen.css") only screen and (max-device-width:480px);
+@import url(screen.css);
+@import url(antiscreen.css) handheld;
+@import url(antiscreen.css) only screen and (max-device-width:480px);
url(r'^ludzie/', include('social.urls')),
url(r'^uzytkownik/', include('allauth.urls')),
url(r'^czekaj/', include('waiter.urls')),
- url(r'^fund/', include('funding.urls')),
+ url(r'^wesprzyj/', include('funding.urls')),
# Admin panel
url(r'^admin/catalogue/book/import$', 'catalogue.views.import_book', name='import_book'),