From 2a8b16aa45fb2b17f92068016ec72f93ccdef776 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 25 Apr 2013 11:01:12 +0200 Subject: [PATCH] Some layout experiments. --- apps/funding/admin.py | 2 +- apps/funding/locale/pl/LC_MESSAGES/django.mo | Bin 4063 -> 6637 bytes apps/funding/locale/pl/LC_MESSAGES/django.po | 306 +++++++++++------- apps/funding/models.py | 21 +- apps/funding/static/funding/funding.css | 2 +- apps/funding/static/funding/funding.scss | 76 +++-- .../templates/funding/offer_detail.html | 31 +- .../funding/templates/funding/offer_list.html | 40 ++- .../funding/snippets/any_remaining.html | 4 + .../templates/funding/tags/funding.html | 51 +-- .../funding/tags/offer_detail_head.html | 35 -- .../templates/funding/tags/offer_status.html | 25 ++ .../funding/tags/offer_status_more.html | 28 ++ apps/funding/templates/funding/thanks.html | 23 +- apps/funding/templates/funding/wlfund.html | 32 +- apps/funding/templatetags/funding_tags.py | 12 +- apps/funding/views.py | 1 + apps/modeltranslation/fields.py | 9 +- apps/wolnelektury_core/static/css/core.css | 6 +- .../static/img/green-pixel.png | Bin 146 -> 0 bytes .../static/img/progress-pixel.png | Bin 0 -> 146 bytes wolnelektury/urls.py | 2 +- 22 files changed, 449 insertions(+), 257 deletions(-) create mode 100755 apps/funding/templates/funding/snippets/any_remaining.html delete mode 100644 apps/funding/templates/funding/tags/offer_detail_head.html create mode 100755 apps/funding/templates/funding/tags/offer_status.html create mode 100755 apps/funding/templates/funding/tags/offer_status_more.html delete mode 100644 apps/wolnelektury_core/static/img/green-pixel.png create mode 100644 apps/wolnelektury_core/static/img/progress-pixel.png diff --git a/apps/funding/admin.py b/apps/funding/admin.py index 37adaf111..b9fc8c97c 100755 --- a/apps/funding/admin.py +++ b/apps/funding/admin.py @@ -4,7 +4,7 @@ from .models import Offer, Perk, Funding, Spent 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'] diff --git a/apps/funding/locale/pl/LC_MESSAGES/django.mo b/apps/funding/locale/pl/LC_MESSAGES/django.mo index 3c69a40bbc1a8d9a92c34806886cd2864b7534dd..866363abeeef8d3f3796bdc61aeb2633d1ba2281 100644 GIT binary patch literal 6637 zcmb7IU2Ggz8NCTDO%3HI&=yKduS1>0)Vs0Mv`t+*t>ZY68z(XDrWO$t-JQ9%@6PPp zWq!KMsxJ+VDg;u600|RSMf3?Is8IXBLxe!FMIQ=CRUZpd#X}!JsO1G7kjgoCX4dN@ z4KT{xGe7t5JKy=f`#FE!eZvm~t~s%iT>n}E*(KL-2`@KeBxKu+;;`TbSkJ$SwZ+yi_Y_!;0082lIDUBE@)j$K0R112MD2RwvL-Uoah zxDLDwgvsKow-o3Du@w;jF+^m*4*{P6a^4H&^S6O8Sv(IU&p#}me_THQ6iEAj38cNh z1Cp<|fSl)TAlH2d$a(%=e*b6r{of_-1exS@7m(v`1#ilgW=Y6lle*xi2@jj6KZ~1J2 zx0ZMp@NT>x0doIyK+f+2$$P8B1W3D{26CQnmG8d`QlW zef=Ite%}Ogop*q6pE!iJ4~_50XLTLJ&HdE_@L@FilNTryN8DZULtXIVK6x=ua824j zg2wzacs+oJNi_PG7yV7`)X=CMUep{fa>0ulphN0BsbFy5LnudkBquRu?%U zALD2bqQM<5uK>g}8oA>|uJ)plqoZgOXv`Pnd=_m#T6Hl$Jc33Y^MZ8T#e6YW-h*Bt z(Ws>vw4G@5H??>ejk(=jGhrxKvdE8>NpzfunYPWMRLn#+%5jSqQ7)&HT#NO}^q!IZ z-H^RUlRZab-BuzqvU_UTrIR&7 zldNf9nnSW|i{lv< zS8o4UE0Ia&c{)i}@H&^yK7Ux8z~agaxCt)mT{UT4%wuGyW8+jV+c45{K?iBZjm@tN zaSSJ{)`_(CVZw@yD}!jEau!RI$jGMU(#}lN)??)yk)KEvmsCkmH9&Gqey>Fx)){id zc`7wFBIkA4z@8G-)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3!xSfjPM$`eNsNQHoDLkR!h6u1vo8} z-nPLZ;2ST675Qb5Vn~^uQZ>Z&CaZhf$@^k;aT}~@6~S&l-4`d+(wct#H5+I;?;~_Z zz`H9VWs7!xDB7yG&EX3W`kgDobQT_V?$l2;vwpbWHtp-LVYF|A#0@HOmo^9MlJgpwxI*4E0(=1o^fzkUCpc5hq82|b>|qM*}Mtwf}<5JuOv zrS-HL-rGF9tFAkGN@uk4lfgpr_8kYJyfwB1C6u#k{#LnXY0kIK{y-zOE2ejq1rEV0 zAAUh2R(h=S+gvvND+aTyXNPstgcS1KlqZDm8{Oh\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 \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" @@ -18,48 +18,42 @@ msgstr "" "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.
Leave empty if you prefer to remain anonymous.
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.
Zostaw puste, jeśli wolisz pozostać anonimową/anonimowym.
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.
We'll use it to contact you about your perks and fundraiser status updates.
Leave empty if you prefer not to be contacted by us." +msgstr "Nie będzie publikowany.
Użyjemy go do kontaktowania się z Tobą w sprawie prezentów i informacji o zmianach statusu zbiórki.
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" @@ -81,185 +75,263 @@ msgstr "data publikacji" 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 other books waiting for\n" +"publication. 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ę innych utworów oczekujących napublikację w serwisie. 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 remaining funds will be spent\n" +"on other books waiting to be published in the library." +msgstr "Wszelkie pozostałe środki 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" -" Wolne Lektury Fund." +"The book\n" +" %(bt)s has been already published." msgstr "" -"Wszelkie pozostałe środki zostaną przekazane na\n" -" Fundusz Wolnych Lektur." - -#: 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" +" %(bt)s 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 Editorial Platform." -msgstr "Możesz śledzić prace na Platformie Redakcyjnej." - -#: 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" -" Wolne Lektury Fund." -msgstr "" -"Zebrane środki zostały przekazane na\n" -" Fundusz Wolnych Lektur." +"You can follow\n" +" the work on the Editorial Platform." +msgstr "Możesz śledzić prace na Platformie Redakcyjnej." -#: templates/funding/widgets/amount.html:12 +#: templates/funding/widgets/amount.html:13 msgid "Other amount" msgstr "Inna kwota" diff --git a/apps/funding/models.py b/apps/funding/models.py index 8d6fa62c0..de90226f3 100644 --- a/apps/funding/models.py +++ b/apps/funding/models.py @@ -31,7 +31,7 @@ class Offer(models.Model): 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]) @@ -39,6 +39,17 @@ class Offer(models.Model): 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. """ @@ -76,14 +87,6 @@ class Offer(models.Model): """ 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. diff --git a/apps/funding/static/funding/funding.css b/apps/funding/static/funding/funding.css index aa99d1d27..9b458a2db 100755 --- a/apps/funding/static/funding/funding.css +++ b/apps/funding/static/funding/funding.css @@ -1 +1 @@ -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 diff --git a/apps/funding/static/funding/funding.scss b/apps/funding/static/funding/funding.scss index 7a158d24e..44109ee9c 100755 --- a/apps/funding/static/funding/funding.scss +++ b/apps/funding/static/funding/funding.scss @@ -1,18 +1,58 @@ -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; @@ -36,18 +76,11 @@ a.funding { } .funding-minus td div { - bbackground: fade-out(red, .8); background: white; } } -.funding-stale { - .funding { - opacity: .5; - } -} - button.honking { background: #018189; @@ -55,7 +88,12 @@ button.honking { 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; + } diff --git a/apps/funding/templates/funding/offer_detail.html b/apps/funding/templates/funding/offer_detail.html index 638431fc7..f3484ed16 100755 --- a/apps/funding/templates/funding/offer_detail.html +++ b/apps/funding/templates/funding/offer_detail.html @@ -2,6 +2,7 @@ {% load url from future %} {% load i18n %} {% load funding_tags %} +{% load pagination_tags %} {% block titleextra %}{{ object }}{% endblock %} @@ -10,30 +11,28 @@ {% block body %}

{{ object }}

-
- {% funding object %} - {% offer_detail_head object %} +
{{ object.description|safe }}
- {% if object.state == 'running' %} +{% funding object %} +
+ {% offer_status object %} + {% offer_status_more object %} + {% if object.is_current %}
- -

{% trans "Support" %}

+

{% trans "Support the publication" %}

{% csrf_token %} {{ form.as_table }} - +
-
{% endif %} -
{{ object.description|safe }}
- -

Zobacz wszystkie zbiórki.

+

{% trans "See all fundraisers." %}

@@ -41,9 +40,11 @@

{% trans "Supporters" %}:

+{% with object.funding_payed.all as fundings %} - {% for funding in object.funding_payed.all %} + {% autopaginate fundings 10 %} + {% for funding in fundings %} - + {% endfor %}
{{ funding.payed_at.date }}
@@ -53,7 +54,7 @@ {% trans "Anonymous" %} {% endif %}
+{{ funding.amount }} zł
{{ funding.amount }} zł
{% for perk in funding.perks.all %} {{ perk.name }}{% if not forloop.last %},{% endif %} @@ -61,7 +62,9 @@
- + + {% paginate %} +{% endwith %}
{% endblock %} diff --git a/apps/funding/templates/funding/offer_list.html b/apps/funding/templates/funding/offer_list.html index 26f6a47bb..f9b9d54fc 100755 --- a/apps/funding/templates/funding/offer_list.html +++ b/apps/funding/templates/funding/offer_list.html @@ -2,30 +2,44 @@ {% 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 %} -

{% trans "Support Wolne Lektury" %}

+

{% trans "All fundraisers" %}

+ + +{% 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 %}

{% trans "Current fundraiser:" %}

{% elif forloop.is_first %}

{% trans "Previous fundraisers:" %}

{% endif %} -
-

{{ funding.start }} – {{ funding.end }} - {% if not funding.is_current %} - ({% trans "funding closed" %}) - {% endif %} -

- {% funding funding link=1 %} - {% offer_detail_head funding %} + +
+ {% offer_status offer %}
- {% if funding.is_current and not forloop.is_last %} + + {% funding offer link=1 %} + + +
+ {% offer_status_more offer %} +
+ +
+ {% if is_current and not forloop.is_last %}

{% trans "Previous fundraisers:" %}

{% endif %} + +{% endwith %} {% endfor %} +{% paginate %} {% endblock %} diff --git a/apps/funding/templates/funding/snippets/any_remaining.html b/apps/funding/templates/funding/snippets/any_remaining.html new file mode 100755 index 000000000..86db70fd3 --- /dev/null +++ b/apps/funding/templates/funding/snippets/any_remaining.html @@ -0,0 +1,4 @@ +{% load i18n %} +{% url 'funding_wlfund' as wlfund %} +{% blocktrans %}Any remaining funds will be spent +on other books waiting to be published in the library.{% endblocktrans %} diff --git a/apps/funding/templates/funding/tags/funding.html b/apps/funding/templates/funding/tags/funding.html index dd25247f7..dbcb871df 100755 --- a/apps/funding/templates/funding/tags/funding.html +++ b/apps/funding/templates/funding/tags/funding.html @@ -1,24 +1,37 @@ {% load i18n %} {% load time_tags %} {% if offer %} - - {% if is_current %} - {% trans "Support a book:" %} - {% endif %} - {{ offer }} - - {% trans "missing" %}: {{ missing }} zł - {% trans "collected" %}: {{ sum }} - {% if is_current %} - {% trans "until fundraiser end" %}: - - +{% spaceless %} +
+ {% if link and is_current %} + + {% trans "Support a book!" %} {% endif %} - -
- + +
+{% endspaceless %} {% endif %} diff --git a/apps/funding/templates/funding/tags/offer_detail_head.html b/apps/funding/templates/funding/tags/offer_detail_head.html deleted file mode 100644 index 000b9b8a3..000000000 --- a/apps/funding/templates/funding/tags/offer_detail_head.html +++ /dev/null @@ -1,35 +0,0 @@ -{% load url from future %} -{% load i18n %} -{% if state == "running" %} -

- {% blocktrans with due=offer.due end=offer.end %}If the target is met - by {{ end }}, this book will be published by {{ due }}.{% endblocktrans %} -

-

- {% url 'funding_wlfund' as url %} - {% blocktrans %}Any excessive money will be transfered to the - Wolne Lektury Fund.{% endblocktrans %} -

-{% elif state == "win" %} - {% if offer.book %} -

{% trans "See the published book:" %} - {{ offer.book }}.

- {% else %} -

{% trans "Funding target has been met!" %}

-

{% 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 Editorial Platform.{% endblocktrans %} - {% endwith %} - {% endif %} -

- {% endif %} -{% elif state == "lose" %} -

{% trans "Funding target has not been met." %} - {% if offer.sum %} - {% url 'funding_wlfund' as url %} - {% blocktrans %}Collected funds have been transfered to the - Wolne Lektury Fund.{% endblocktrans %} - {% endif %} -

-{% endif %} diff --git a/apps/funding/templates/funding/tags/offer_status.html b/apps/funding/templates/funding/tags/offer_status.html new file mode 100755 index 000000000..998d942dc --- /dev/null +++ b/apps/funding/templates/funding/tags/offer_status.html @@ -0,0 +1,25 @@ +{% load i18n %} + +{% if offer.is_current %} + {% if offer.is_win %} +

+ {% blocktrans with due=offer.due end=offer.end %}The fundraiser + ends on {{ end }}. The book will be published by {{ due }}.{% endblocktrans %} +

+ {% else %} +

+ {% blocktrans with due=offer.due end=offer.end %}If the target is met + by {{ end }}, this book will be published by {{ due }}.{% endblocktrans %} +

+ {% endif %} +{% else %} + {% if offer.is_win %} +

+ {% trans "Full amount was successfully raised!" %} +

+ {% else %} +

+ {% trans "The amount needed was not raised." %} +

+ {% endif %} +{% endif %} diff --git a/apps/funding/templates/funding/tags/offer_status_more.html b/apps/funding/templates/funding/tags/offer_status_more.html new file mode 100755 index 000000000..6291e9fb4 --- /dev/null +++ b/apps/funding/templates/funding/tags/offer_status_more.html @@ -0,0 +1,28 @@ +{% load i18n %} + +{% if offer.is_current %} +

+ {% include "funding/snippets/any_remaining.html" %} +

+{% else %} +

{{ offer.start }} – {{ offer.end }}

+ {% if offer.is_win %} +

+ {% if offer.book %} + {% blocktrans with bu=offer.book.get_absolute_url bt=offer.book %}The book + {{ bt }} 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 Editorial Platform.{% endblocktrans %} + {% endif %} + {% endif %} +

+ {% endif %} + + {% if offer.remaining %} +

{% include "funding/snippets/any_remaining.html" %}

+ {% endif %} +{% endif %} diff --git a/apps/funding/templates/funding/thanks.html b/apps/funding/templates/funding/thanks.html index fdf0ae6df..72b7c2970 100755 --- a/apps/funding/templates/funding/thanks.html +++ b/apps/funding/templates/funding/thanks.html @@ -2,7 +2,7 @@ {% load i18n %} {% load fnp_share %} -{% block titleextra %}{% trans "Thank you!" %}{% endblock %} +{% block titleextra %}{% trans "Thank you for your support!" %}{% endblock %} {% block body %} @@ -11,12 +11,25 @@ {% trans "Thank you for your support!" %} -{% url 'funding_current' as c %} -

{% blocktrans %}Your support will appear on the -current fundraiser page shortly.{% endblocktrans %}

+{% if offer.is_win %} +

{% trans "Full amount was successfully raised!" %}

+

{% blocktrans with due=offer.due end=offer.end %}The fundraiser + ends on {{ end }}. The book will be published by {{ due }}.{% endblocktrans %}

+{% else %} +

{% 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 %}

+{% endif %} -

{% trans "Tell your friends about the fundraiser!" %}

+

{% include "funding/snippets/any_remaining.html" %}

+ +{% url 'funding_current' as current %} +

{% trans "Go back to the current fundraiser." %}

+ + +

{% trans "Tell your friends!" %}

{% share current _("I support Wolne Lektury.") %}

diff --git a/apps/funding/templates/funding/wlfund.html b/apps/funding/templates/funding/wlfund.html index da35943c3..6a405ad56 100755 --- a/apps/funding/templates/funding/wlfund.html +++ b/apps/funding/templates/funding/wlfund.html @@ -1,39 +1,49 @@ {% extends "base.html" %} {% load i18n %} -{% block titleextra %}{% trans "Wolne Lektury Fund" %}{% endblock %} +{% block titleextra %}{% trans "Remaining funds" %}{% endblock %} {% block body %} -

{% trans "Wolne Lektury Fund" %}

+

{% trans "Remaining funds" %}

+ +
+

{% 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 other books waiting for +publication. The same thing happens with any money remaining +from successful fundraisers.{% endblocktrans %}

+

{% trans "Spending these remaining funds is recorded in this table." %}

+
+ + + - - - {% for tag, entry in log %} {% if tag == 'spent' %} + - {% else %} - - - + {{ entry }} + + {% endif %} {% endfor %} diff --git a/apps/funding/templatetags/funding_tags.py b/apps/funding/templatetags/funding_tags.py index ae3b04f62..d50551a38 100755 --- a/apps/funding/templatetags/funding_tags.py +++ b/apps/funding/templatetags/funding_tags.py @@ -23,10 +23,16 @@ def funding(context, offer=None, link=False, add_class=""): } -@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, + } + + diff --git a/apps/funding/views.py b/apps/funding/views.py index 4db8267ef..66c34a28f 100644 --- a/apps/funding/views.py +++ b/apps/funding/views.py @@ -121,6 +121,7 @@ class ThanksView(TemplateView): 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 diff --git a/apps/modeltranslation/fields.py b/apps/modeltranslation/fields.py index be942f6a5..fe413ce3e 100644 --- a/apps/modeltranslation/fields.py +++ b/apps/modeltranslation/fields.py @@ -1,6 +1,7 @@ # -*- 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 @@ -44,12 +45,8 @@ class TranslationField(Field): # 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) diff --git a/apps/wolnelektury_core/static/css/core.css b/apps/wolnelektury_core/static/css/core.css index b5e4432e4..514f8af3a 100644 --- a/apps/wolnelektury_core/static/css/core.css +++ b/apps/wolnelektury_core/static/css/core.css @@ -1,3 +1,3 @@ -@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); diff --git a/apps/wolnelektury_core/static/img/green-pixel.png b/apps/wolnelektury_core/static/img/green-pixel.png deleted file mode 100644 index edb512d111a093b4b721ff77b3795b0a90db8be0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 146 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1SBVv2j2ryoCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#F0&Y~9{X9@8*)G)$r9Iy66gHf+|;}h2Ir#G#FEq$h4Rdj3?aLA?^SG diff --git a/apps/wolnelektury_core/static/img/progress-pixel.png b/apps/wolnelektury_core/static/img/progress-pixel.png new file mode 100644 index 0000000000000000000000000000000000000000..5af1bfdfe4f037b5a9c30d1260f1d0cab15c7eca GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1SBVv2j2ryoCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#E{i0)f%chzLz{p?k|nMYCC>S|xv6<249-QVi6yBi3gww484B*6z5(HleBwYw lJf1F&Asp9}E2f_2U|^oh7`drMW)V=F!PC{xWt~$(699+qBLV;b literal 0 HcmV?d00001 diff --git a/wolnelektury/urls.py b/wolnelektury/urls.py index d78a94d71..696a8e87c 100644 --- a/wolnelektury/urls.py +++ b/wolnelektury/urls.py @@ -35,7 +35,7 @@ urlpatterns += patterns('', 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'), -- 2.20.1
{% trans "Date" %}:
{% trans "Title" %}:
{% trans "Amount" %}:
{% trans "Balance" %}:
 
{{ amount }} zł
 
{{ entry.timestamp }}
{% trans "Money spent on publishing the book" %}: + + {{ entry.book }}
-{{ entry.amount }} zł
{{ entry.total }} zł
{% trans "Book" %}: - {{ entry.book }}
{{ entry.end }}
+{{ entry.wlfund }} zł
{{ entry.total }} zł
{% trans "Excessive money from fundraiser" %}: +
{% trans "Money remaining from the fundraiser for" %}: - {{ entry }}
{{ entry.total }} zł
+{{ entry.wlfund }} zł