217d5b8827d17ad2eebaeec23347c1e44b55e30f
[wolnelektury.git] / apps / funding / templates / funding / offer_detail.html
1 {% extends "base.html" %}
2 {% load url from future %}
3 {% load i18n static %}
4 {% load funding_tags %}
5 {% load pagination_tags %}
6 {% load fnp_share %}
7 {% load thumbnail %}
8 {% load build_absolute_uri from fnp_common %}
9
10
11 {% block titleextra %}{{ object }}{% endblock %}
12
13 {% block ogimage %}{{ object.cover.url|build_absolute_uri:request }}{% endblock %}
14
15 {% block metadescription %}Wesprzyj kolejną publikację Wolnych Lektur!{% endblock %}
16
17
18 {% block body %}
19
20 <h1>{{ object }}</h1>
21
22 {% funding object show_title=False %}
23 <div class="white-box">
24     <div class="funding-details-intro">
25         {% if object.cover %}
26             <img src="
27                 {% thumbnail object.cover "139x193" as thumb %}
28                     {{ thumb.url }}
29                 {% empty %}
30                     {{ object.cover.url }}
31                 {% endthumbnail %}
32             " alt="Cover" class="funding-cover" />
33         {% endif %}
34         <div class="normal-text">
35         <h3>{% trans "Help free the book!" %}</h3>
36         {{ object.description|safe }}
37         {% offer_status object %}
38         <a href='//nowoczesnapolska.org.pl/pomoz-nam/wesprzyj-nas/' target="_blank" style='float:right;border:1px solid #ddd;padding: 1em;margin:0 0 1em 1em;background:#eee;'><img src='//nowoczesnapolska.org.pl/wp-content/themes/koed/annoy/procent.png' alt='1%' style='float:left;margin-right: 1em;margin-top:.2em;'>Możesz też przekazać<br/>1% podatku na rozwój biblioteki. &rarr;</a>
39         {% offer_status_more object %}
40         <p><a href="{% url 'infopage' 'wesprzyj' %}">{% trans "Learn more" %}</a>.</p>
41         </div>
42         
43         <div style="clear:both;"></div>
44     </div>
45
46     {% if object.is_current %}
47         <div class="normal-text">
48             <h3>{% trans "Support the publication" %}</h3>
49             <form action="" method="post">
50                 <table>
51                 {{ form.as_table }}
52                 <tr><td></td><td>
53                     <button type="submit" style="border: none; background: none; cursor: pointer">
54                     <img alt="{% trans 'Donate!' %}" src="{% static 'img/payu.png' %}" />
55                     </button>
56                     </td></tr>
57                 </table>
58             </form>
59         </div>
60
61         {% url 'funding_current' object.slug as current %}
62         <p class="normal-text">{% trans "Tell your friends!" %}</p>
63         <p class="share">{% share current _("Support Wolne Lektury!") "big" %}</p>
64     {% endif %}
65
66     <p class="normal-text"><a href="{% url 'funding' %}">{% trans "See all fundraisers." %}</a></p>
67
68 </div>
69
70
71 <h2>{% trans "Supporters" %}:</h2>
72
73 <div class="white-box normal-text">
74 {% with object.funding_payed.all as fundings %}
75     
76     <table class="wlfund">
77     {% autopaginate fundings 10 %}
78     {% for funding in fundings %}
79         <tr class="funding-plus">
80             <td class="oneline">{{ funding.payed_at.date }}</td>
81             <td>
82                 {% if funding.name %}
83                     {{ funding.name }}
84                 {% else %}
85                     <em>{% trans "Anonymous" %}</em>
86                 {% endif %}
87             </td>
88             <td>{{ funding.amount }}&nbsp;zł</td>
89             <td>&nbsp;
90                 {% for perk in funding.perks.all %}
91                     {{ perk.name }}{% if not forloop.last %},{% endif %}
92                 {% endfor %}
93             </td>
94     {% endfor %}
95     </table>
96     
97     {% paginate %}
98 {% endwith %}
99 </div>
100
101 {% endblock %}