Fixes.
[wolnelektury.git] / src / funding / templates / funding / offer_list.html
1 {% extends "base/base.html" %}
2 {% load i18n %}
3 {% load ssi_include from ssify %}
4 {% load pagination_tags %}
5
6 {% block titleextra %}{% trans "All fundraisers" %}{% endblock %}
7
8 {% block bodyid %}funding-offer-list{% endblock %}
9
10 {% block body %}
11   <h1>{% trans "All fundraisers" %}</h1>
12
13   {% autopaginate object_list 10 %}
14   {% if page_obj.number == 1 %}
15     <h2>{% trans "Current fundraiser:" %}</h2>
16   {% endif %}
17
18   {% for offer in object_list %}
19     {% with is_win=offer.is_win is_current=offer.is_current %}
20       {% if not is_current  and forloop.first and page_obj.number == 1 %}
21         <p class="normal-text">{% trans "No fundraiser is currently running." %}</p>
22         <h2>{% trans "Previous fundraisers:" %}</h2>
23       {% endif %}
24
25       {% ssi_include 'funding_list_bar' pk=offer.pk %}
26
27       <div class="white-box normal-text">
28         {% if is_current %}
29           <h3>{% trans "Help free the book!" %}</h3>
30           {{ offer.description|safe }}
31         {% endif %}
32         {% ssi_include 'funding_status' pk=offer.pk %}
33         {% ssi_include 'funding_status_more' pk=offer.pk %}
34       </div>
35
36       {% if is_current and not forloop.last %}
37         <h2>{% trans "Previous fundraisers:" %}</h2>
38       {% endif %}
39     {% endwith %}
40   {% endfor %}
41   {% paginate %}
42 {% endblock %}