fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ea7671f
)
fixes
author
Radek Czajka
<rczajka@rczajka.pl>
Fri, 4 Nov 2022 09:25:40 +0000
(10:25 +0100)
committer
Radek Czajka
<rczajka@rczajka.pl>
Fri, 4 Nov 2022 09:25:40 +0000
(10:25 +0100)
src/funding/models.py
patch
|
blob
|
history
src/funding/templates/funding/2022/includes/funding.html
patch
|
blob
|
history
src/funding/templates/funding/2022/offer_detail.html
patch
|
blob
|
history
src/social/templates/social/carousel_2022.html
patch
|
blob
|
history
diff --git
a/src/funding/models.py
b/src/funding/models.py
index
7d0e742
..
089b875
100644
(file)
--- a/
src/funding/models.py
+++ b/
src/funding/models.py
@@
-1,3
+1,4
@@
+
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
@@
-204,7
+205,7
@@
class Offer(models.Model):
'is_current': self.is_current(),
'is_win': offer_sum >= self.target,
'missing': self.target - offer_sum,
'is_current': self.is_current(),
'is_win': offer_sum >= self.target,
'missing': self.target - offer_sum,
- 'percentage':
100 * offer_sum / self.target
,
+ 'percentage':
min(100, 100 * offer_sum / self.target)
,
'show_title': True,
'show_title_calling': True,
'show_title': True,
'show_title_calling': True,
diff --git
a/src/funding/templates/funding/2022/includes/funding.html
b/src/funding/templates/funding/2022/includes/funding.html
index
f80a075
..
b2dc558
100644
(file)
--- a/
src/funding/templates/funding/2022/includes/funding.html
+++ b/
src/funding/templates/funding/2022/includes/funding.html
@@
-11,7
+11,7
@@
<div class="funding-bar-container">
{% endif %}
<div class="l-checkout__support__bar">
<div class="funding-bar-container">
{% endif %}
<div class="l-checkout__support__bar">
- <span class="{% if percentage < 1
2
%}little-progress{% endif %}" data-label="{% if sum %}{% trans "collected" %}: {{ sum }} zł{% endif %}" style="width: {{ percentage|stringformat:'.2f' }}%;"></span>
+ <span class="{% if percentage < 1
5
%}little-progress{% endif %}" data-label="{% if sum %}{% trans "collected" %}: {{ sum }} zł{% endif %}" style="width: {{ percentage|stringformat:'.2f' }}%;"></span>
</div>
<div class="l-checkout__support__footer">
{% if show_title %}
</div>
<div class="l-checkout__support__footer">
{% if show_title %}
diff --git
a/src/funding/templates/funding/2022/offer_detail.html
b/src/funding/templates/funding/2022/offer_detail.html
index
bb5bb9e
..
0812e83
100644
(file)
--- a/
src/funding/templates/funding/2022/offer_detail.html
+++ b/
src/funding/templates/funding/2022/offer_detail.html
@@
-12,7
+12,7
@@
{% block breadcrumbs %}
{% block breadcrumbs %}
- <a href=""><span>Zbiórki</span></a>
+ <a href="
{% url 'funding' %}
"><span>Zbiórki</span></a>
<span>{{ object }}</span>
{% endblock %}
<span>{{ object }}</span>
{% endblock %}
diff --git
a/src/social/templates/social/carousel_2022.html
b/src/social/templates/social/carousel_2022.html
index
edaa3bb
..
a7af46c
100644
(file)
--- a/
src/social/templates/social/carousel_2022.html
+++ b/
src/social/templates/social/carousel_2022.html
@@
-1,7
+1,7
@@
{% if banner %}
<a href="{{ banner.link }}">
{% if banner.picture %}
{% if banner %}
<a href="{{ banner.link }}">
{% if banner.picture %}
- <img src="{{ banner.
imag
e.url }}">
+ <img src="{{ banner.
pictur
e.url }}">
{% endif %}
</a>
{% endif %}
{% endif %}
</a>
{% endif %}