reformat templates
[wolnelektury.git] / src / funding / templates / funding / offer_list.html
1 {% extends "base/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   {% autopaginate object_list 10 %}
15   {% if page_obj.number == 1 %}
16     <h2>{% trans "Current fundraiser:" %}</h2>
17   {% endif %}
18
19   {% for offer in object_list %}
20     {% with is_win=offer.is_win is_current=offer.is_current %}
21       {% if not is_current  and forloop.first and page_obj.number == 1 %}
22         <p class="normal-text">{% trans "No fundraiser is currently running." %}</p>
23         <h2>{% trans "Previous fundraisers:" %}</h2>
24       {% endif %}
25
26       {% ssi_include 'funding_list_bar' pk=offer.pk %}
27
28       <div class="white-box normal-text">
29         {% if is_current %}
30           <h3>{% trans "Help free the book!" %}</h3>
31           {{ offer.description|safe }}
32         {% endif %}
33         {% ssi_include 'funding_status' pk=offer.pk %}
34         {% ssi_include 'funding_status_more' pk=offer.pk %}
35       </div>
36
37       {% if is_current and not forloop.last %}
38         <h2>{% trans "Previous fundraisers:" %}</h2>
39       {% endif %}
40     {% endwith %}
41   {% endfor %}
42   {% paginate %}
43 {% endblock %}