{% extends "base.html" %}
-{% load funding_tags %}
+{% load url from future %}
+{% load i18n %}
+{% load ssi_include from ssify %}
+{% load pagination_tags %}
-{% block titleextra %}Funding{% endblock %}
+{% block titleextra %}{% trans "All fundraisers" %}{% endblock %}
+
+{% block bodyid %}funding-offer-list{% endblock %}
{% block body %}
-<h1>Funding!</h1>
-
-<ul class="plain">
-{% for funding in object_list %}
- <li class="white-box normal-text" style="margin-bottom:1em;">
- <p>{{ funding.start }} – {{ funding.end }}</p>
- {% funding funding link=1 add_class="standalone-funding" %}
- {% if funding.state == "win" %}
- {% if funding.book_url %}
- <p><a href="{{ funding.book_url }}">Zobacz opublikowaną książkę</a></p>
- {% else %}
- <p>Termin publikacji: {{ funding.term }}</p>
- {% endif %}
- {% elif funding.state == "lose" %}
- <p>Cel finansowania nie został osiągnięty. Zgromadzone środki
- zostały przekazane na Fundusz Wolnych Lektur.</p>
+<h1>{% trans "All fundraisers" %}</h1>
+
+
+{% autopaginate object_list 10 %}
+{% if page_obj.number == 1 %}
+ <h2>{% trans "Current fundraiser:" %}</h2>
+{% endif %}
+
+{% for offer in object_list %}
+{% with is_win=offer.is_win is_current=offer.is_current %}
+ {% if not is_current and forloop.first and page_obj.number == 1 %}
+ <p class="normal-text">{% trans "No fundraiser is currently running." %}</p>
+ <h2>{% trans "Previous fundraisers:" %}</h2>
+ {% endif %}
+
+ {% ssi_include 'funding_list_bar' pk=offer.pk %}
+
+ <div class="white-box normal-text">
+ {% if is_current %}
+ <h3>{% trans "Help free the book!" %}</h3>
+ {{ offer.description|safe }}
{% endif %}
- </li>
+ {% ssi_include 'funding_status' pk=offer.pk %}
+ {% ssi_include 'funding_status_more' pk=offer.pk %}
+
+ </div>
+
+ {% if is_current and not forloop.last %}
+ <h2>{% trans "Previous fundraisers:" %}</h2>
+ {% endif %}
+
+{% endwith %}
{% endfor %}
-</ul>
+{% paginate %}
{% endblock %}