ffe326e9c23407b78ee82fbcdd80fcdec8a410fd
[wolnelektury.git] / apps / funding / templates / funding / tags / funding.html
1 {% load i18n %}
2 {% load time_tags %}
3 {% if offer %}
4 {% spaceless %}
5 <div class="funding {{ add_class }}" data-offer-id="{{offer.id}}" style="">
6     {% if closeable %}<a href="#" class="close">X</a>{% endif %}
7     {% if link and is_current %}
8         <div style="float:left; padding-right: .6em;">
9             <a class="call honking" href="{% url 'funding_current' offer.slug %}">
10                 {% trans "Support!" %}</a>
11             <div style="text-align: center; margin: auto;">
12                 <a href="{% url 'infopage' 'wesprzyj' %}">{% trans "Learn more" %}</a>
13             </div>
14         </div>
15     {% endif %}
16     <div class="description {% if link and is_current %}with-button{% endif %}"
17         style="display: inline-block;">
18     {% if link %}<a href="{% if is_current %}{% url 'funding_current' offer.slug %}{% else %}{{ offer.get_absolute_url }}{% endif %}">{% endif %}
19     {% if show_title %}
20         {% if is_current and show_title_calling %}<strong style="margin-right: .6em;">{% trans "Help free the book!" %}</strong>{% endif %}
21         <span class="funding-title{% if not is_current %}-strong{% endif %}">{{ offer }}</span>
22     {% endif %}
23
24     <div class="progress"
25         style="text-align: center; background-size: {{ percentage|stringformat:'.2f' }}% 1px;"
26     >
27         {% if sum %}
28             <span class="piece" style="float:left">{% trans "collected" %}: {{ sum }} zł</span>
29         {% endif %}
30         {% if not is_win %}
31             <span class="piece" style="float: right">{% trans "needed" %}: {{ offer.target }} zł</span>
32         {% endif %}
33         {% if is_current %}
34             <span class="piece" style="display:inline-block;margin-right: 0em;">{% trans "until fundraiser end" %}:
35                 <span class="countdown inline" data-until='{{ offer.end|date_to_utc:True|utc_for_js }}'></span>
36             </span>
37         {% endif %}
38
39         <div style="clear: both"></div>
40     </div>
41     {% if link %}</a>{% endif %}
42     </div>
43     <div style="clear: both"></div>
44 </div>
45 {% if closeable %}
46     <div class="funding-handle">{% trans "Help free the book!" %}</div>
47 {% endif %}
48 {% endspaceless %}
49 {% endif %}