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:
5e0d7de
)
Showing cover on the offer details page
author
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 16 May 2013 10:07:39 +0000
(12:07 +0200)
committer
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 3 Jun 2013 08:03:41 +0000
(10:03 +0200)
apps/funding/static/funding/funding.scss
patch
|
blob
|
history
apps/funding/templates/funding/offer_detail.html
patch
|
blob
|
history
apps/funding/templates/funding/tags/funding.html
patch
|
blob
|
history
apps/funding/templatetags/funding_tags.py
patch
|
blob
|
history
diff --git
a/apps/funding/static/funding/funding.scss
b/apps/funding/static/funding/funding.scss
index
059cc16
..
2b06dc6
100755
(executable)
--- a/
apps/funding/static/funding/funding.scss
+++ b/
apps/funding/static/funding/funding.scss
@@
-132,4
+132,9
@@
padding: .2em 1em;
border-radius: 0 0 0 1em;
font-size: 13px;
padding: .2em 1em;
border-radius: 0 0 0 1em;
font-size: 13px;
+}
+
+.funding-cover {
+ float:left;
+ margin-right: 10px;
}
\ No newline at end of file
}
\ No newline at end of file
diff --git
a/apps/funding/templates/funding/offer_detail.html
b/apps/funding/templates/funding/offer_detail.html
index
da50f13
..
898f847
100755
(executable)
--- a/
apps/funding/templates/funding/offer_detail.html
+++ b/
apps/funding/templates/funding/offer_detail.html
@@
-17,14
+17,18
@@
<div class="normal-text">{{ object.description|safe }}</div>
<div class="normal-text">{{ object.description|safe }}</div>
-{% funding object %}
+{% funding object
show_title=False
%}
<div class="white-box">
<div class="white-box">
+ {% if object.cover %}
+ <img src="{{ object.cover.url }}" class="funding-cover"/>
+ {% endif %}
<div class="normal-text">
{% offer_status object %}
{% offer_status_more object %}
<p><a href="{% url 'infopage' 'wesprzyj' %}">{% trans "Learn more" %}</a>.</p>
</div>
<div class="normal-text">
{% offer_status object %}
{% offer_status_more object %}
<p><a href="{% url 'infopage' 'wesprzyj' %}">{% trans "Learn more" %}</a>.</p>
</div>
+ <div style="clear:both;"></div>
{% if object.is_current %}
<div class="normal-text">
{% if object.is_current %}
<div class="normal-text">
diff --git
a/apps/funding/templates/funding/tags/funding.html
b/apps/funding/templates/funding/tags/funding.html
index
2ee991a
..
5bc232f
100755
(executable)
--- a/
apps/funding/templates/funding/tags/funding.html
+++ b/
apps/funding/templates/funding/tags/funding.html
@@
-17,7
+17,7
@@
style="display: inline-block;">
{% if link %}<a href="{% if is_current %}{% url 'funding_current' offer.slug %}{% else %}{{ offer.get_absolute_url }}{% endif %}">{% endif %}
{% if is_current %}<strong style="margin-right: .6em;">{% trans "Help free the book!" %}</strong>{% endif %}
style="display: inline-block;">
{% if link %}<a href="{% if is_current %}{% url 'funding_current' offer.slug %}{% else %}{{ offer.get_absolute_url }}{% endif %}">{% endif %}
{% if is_current %}<strong style="margin-right: .6em;">{% trans "Help free the book!" %}</strong>{% endif %}
- <span class="funding-title{% if not is_current %}-strong{% endif %}">{{ offer }}</span>
+ {% if show_title %}<span class="funding-title{% if not is_current %}-strong{% endif %}">{{ offer }}</span>{% endif %}
<div class="progress"
style="text-align: center; background-size: {{ percentage|stringformat:'.2f' }}% 1px;"
<div class="progress"
style="text-align: center; background-size: {{ percentage|stringformat:'.2f' }}% 1px;"
diff --git
a/apps/funding/templatetags/funding_tags.py
b/apps/funding/templatetags/funding_tags.py
index
2d6ea35
..
7ebc726
100755
(executable)
--- a/
apps/funding/templatetags/funding_tags.py
+++ b/
apps/funding/templatetags/funding_tags.py
@@
-5,7
+5,7
@@
register = template.Library()
@register.inclusion_tag("funding/tags/funding.html", takes_context=True)
@register.inclusion_tag("funding/tags/funding.html", takes_context=True)
-def funding(context, offer=None, link=False, closeable=False, add_class=""):
+def funding(context, offer=None, link=False, closeable=False,
show_title=True,
add_class=""):
if offer is None and context.get('funding_no_show_current') is None:
offer = Offer.current()
if offer is None:
if offer is None and context.get('funding_no_show_current') is None:
offer = Offer.current()
if offer is None:
@@
-21,6
+21,7
@@
def funding(context, offer=None, link=False, closeable=False, add_class=""):
'percentage': 100 * offer_sum / offer.target,
'link': link,
'closeable': closeable,
'percentage': 100 * offer_sum / offer.target,
'link': link,
'closeable': closeable,
+ 'show_title': show_title,
'add_class': add_class,
}
'add_class': add_class,
}