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