Funding: behave nicer with time conflicts.
[wolnelektury.git] / apps / funding / templates / funding / offer_list.html
1 {% extends "base.html" %}
2 {% load url from future %}
3 {% load i18n %}
4 {% load funding_tags %}
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     {% funding offer link=1 show_title_calling=False %}
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         {% offer_status offer %}
35         {% offer_status_more offer %}
36     </div>
37
38     {% if is_current and not forloop.last %}
39         <h2>{% trans "Previous fundraisers:" %}</h2>
40     {% endif %}
41
42 {% endwith %}
43 {% endfor %}
44 {% paginate %}
45
46 {% endblock %}