Introduce DRF and start replacing the views.
[wolnelektury.git] / src / funding / templates / funding / offer_detail.html
1 {% extends "base/base.html" %}
2 {% load url from future %}
3 {% load i18n static %}
4 {% load pagination_tags %}
5 {% load fnp_share %}
6 {% load thumbnail %}
7 {% load build_absolute_uri from fnp_common %}
8 {% load ssi_include from ssify %}
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   <h1>{{ object }}</h1>
20
21   {% ssi_include 'funding_detail_bar' pk=object.pk %}
22   <div class="white-box">
23     <div class="funding-details-intro">
24       {% if object.cover %}
25         <img src="{% thumbnail object.cover "139x193" as thumb %}{{ thumb.url }}{% empty %}{{ object.cover.url }}{% endthumbnail %}"
26              alt="Cover" class="funding-cover" />
27       {% endif %}
28       <div class="normal-text">
29         <h3>{% trans "Help free the book!" %}</h3>
30         {{ object.description|safe }}
31         {% ssi_include 'funding_status' pk=object.pk %}
32         <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>
33         {% ssi_include 'funding_status_more' pk=object.pk %}
34         <p><a href="{% url 'infopage' 'wesprzyj' %}">{% trans "Learn more" %}</a>.</p>
35       </div>
36
37       <div style="clear:both;"></div>
38     </div>
39
40     {% if object.is_current %}
41       <div class="normal-text">
42         <h3>{% trans "Support the publication" %}</h3>
43         <form action="" method="post">
44           <table>
45             {# FIXME after upgrade to django 1.9 use field_order #}
46             {% for field in form %}
47               {% if field.name != 'agree_newsletter' %}
48                 <tr>
49                   <th>{{ field.label }}</th>
50                   <td>
51                     {{ field.errors }}{{ field }}
52                     {% if field.help_text %}<br /><span class="helptext">{{ field.help_text }}</span>
53                     {% endif %}
54                   </td>
55                 </tr>
56               {% endif %}
57             {% endfor %}
58             <tr>
59               <td></td>
60               <td>
61                 <label>{{ form.agree_newsletter }} {{ form.agree_newsletter.label }}</label>
62                 <br/><span class="helptext">{{ form.data_processing }}</span>
63               </td>
64             </tr>
65             <tr>
66               <td></td>
67               <td>
68                 <button type="submit" style="border: none; background: none; cursor: pointer">
69                   <img alt="{% trans 'Donate!' %}" src="{% static 'img/payu.png' %}" />
70                 </button>
71               </td>
72             </tr>
73           </table>
74         </form>
75       </div>
76
77       {% url 'funding_current' object.slug as current %}
78       <p class="normal-text">{% trans "Tell your friends!" %}</p>
79       <p class="share">{% share current _("Support Wolne Lektury!") "big" %}</p>
80     {% endif %}
81
82     <p class="normal-text"><a href="{% url 'funding' %}">{% trans "See all fundraisers." %}</a></p>
83   </div>
84
85   <h2>{% trans "Supporters" %}:</h2>
86
87   <div class="white-box normal-text">
88     {% ssi_include 'funding_fundings' pk=object.pk page=page %}
89   </div>
90 {% endblock %}