{% extends "base.html" %}
{% load url from future %}
-{% load i18n %}
+{% load i18n static %}
{% load funding_tags %}
+{% load pagination_tags %}
+{% load fnp_share %}
+{% load thumbnail %}
{% block titleextra %}{{ object }}{% endblock %}
+{% block metadescription %}Wesprzyj kolejną publikację Wolnych Lektur!{% endblock %}
+
{% block body %}
<h1>{{ object }}</h1>
-<div class="white-box">
-
- {% funding object %}
- {% offer_detail_head object %}
-
- {% if object.state == 'running' %}
+{% funding object show_title=False %}
+<div class="white-box">
+ <div class="funding-details-intro">
+ {% if object.cover %}
+ <img src="
+ {% thumbnail object.cover "139x193" as thumb %}
+ {{ thumb.url }}
+ {% empty %}
+ {{ object.cover.url }}
+ {% endthumbnail %}
+ " alt="Cover" class="funding-cover" />
+ {% endif %}
<div class="normal-text">
+ <h3>{% trans "Help free the book!" %}</h3>
+ {{ object.description|safe }}
+ {% offer_status object %}
+ {% offer_status_more object %}
+ <p><a href="{% url 'infopage' 'wesprzyj' %}">{% trans "Learn more" %}</a>.</p>
+ </div>
+
+ <div style="clear:both;"></div>
+ </div>
- <h3>{% trans "Support" %}</h3>
+ {% if object.is_current %}
+ <div class="normal-text">
+ <h3>{% trans "Support the publication" %}</h3>
<form action="" method="post">
- {% csrf_token %}
<table>
{{ form.as_table }}
- <tr><td></td><td><button type="submit">Wpłać!</button></td></tr>
+ <tr><td></td><td>
+ <button type="submit" style="border: none; background: none; cursor: pointer">
+ <img alt="{% trans 'Donate!' %}" src="{% static 'img/payu.png' %}" />
+ </button>
+ </td></tr>
</table>
</form>
-
</div>
+
+ {% url 'funding_current' object.slug as current %}
+ <p class="normal-text">{% trans "Tell your friends!" %}</p>
+ <p class="share">{% share current _("Support Wolne Lektury!") "big" %}</p>
{% endif %}
- <p class="normal-text"><a href="{% url 'funding' %}">Zobacz wszystkie zbiórki.</a></p>
+ <p class="normal-text"><a href="{% url 'funding' %}">{% trans "See all fundraisers." %}</a></p>
</div>
<h2>{% trans "Supporters" %}:</h2>
<div class="white-box normal-text">
+{% with object.funding_payed.all as fundings %}
<table class="wlfund">
- {% for funding in object.funding_payed.all %}
+ {% autopaginate fundings 10 %}
+ {% for funding in fundings %}
<tr class="funding-plus">
- <td><div>{{ funding.payed_at.date }}</div></td>
- <td><div>
- {% if funding.anonymous %}
- <em>{% trans "Anonymous" %}</em>
- {% else %}
+ <td class="oneline">{{ funding.payed_at.date }}</td>
+ <td>
+ {% if funding.name %}
{{ funding.name }}
+ {% else %}
+ <em>{% trans "Anonymous" %}</em>
{% endif %}
- </div></td>
- <td><div>+{{ funding.amount }} zł</div></td>
- <td><div>
+ </td>
+ <td>{{ funding.amount }} zł</td>
+ <td>
{% for perk in funding.perks.all %}
{{ perk.name }}{% if not forloop.last %},{% endif %}
- {% endfor %}
- </div></td>
+ {% endfor %}
+ </td>
{% endfor %}
</table>
-
+
+ {% paginate %}
+{% endwith %}
</div>
{% endblock %}