Easy size win for all pages
This commit is contained in:
Родитель
e1ae63c0ae
Коммит
2aba03b9b3
|
@ -135,12 +135,14 @@ def product_as_dict(request, product, purchased=None, receipt_type=None,
|
|||
if product.all_previews:
|
||||
previews = []
|
||||
for p in product.all_previews:
|
||||
previews.append({
|
||||
preview = {
|
||||
'fullUrl': jinja2.escape(p.image_url),
|
||||
'type': jinja2.escape(p.filetype),
|
||||
'caption': jinja2.escape(p.caption),
|
||||
'thumbUrl': jinja2.escape(p.thumbnail_url),
|
||||
})
|
||||
}
|
||||
if p.caption:
|
||||
preview.update(caption=jinja2.escape(p.caption))
|
||||
previews.append(preview)
|
||||
ret.update({'previews': previews})
|
||||
|
||||
if product.is_premium() and product.premium:
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
{{ product.average_rating|float|stars }}
|
||||
{% if product.total_reviews %}
|
||||
<span class="cnt">
|
||||
{% trans num=product.total_reviews, cnt=product.total_reviews|numberfmt %}
|
||||
{%- trans num=product.total_reviews, cnt=product.total_reviews|numberfmt -%}
|
||||
{{ cnt }} Rating
|
||||
{% pluralize %}
|
||||
{%- pluralize -%}
|
||||
{{ cnt }} Ratings
|
||||
{% endtrans %}
|
||||
{%- endtrans -%}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if tag != "a" %}</a>{% endif %}
|
||||
|
|
|
@ -102,10 +102,10 @@
|
|||
<nav class="footer-links c" role="navigation">
|
||||
<p>
|
||||
{% if logged %}
|
||||
{% for link in tools_links %}
|
||||
{% for link in tools_links -%}
|
||||
<a href="{{ link.href }}" class="sync" rel="external"
|
||||
{{ ' target="%s"' % link.target if (request.MOBILE and link.target) }}>{{ link.text }}</a>
|
||||
{% endfor %}
|
||||
{{- ' target="%s"' % link.target if (request.MOBILE and link.target) }}>{{ link.text }}</a>
|
||||
{%- endfor %}
|
||||
{% if request.can_view_consumer %}
|
||||
{# TODO: Coming soon with payments. #}
|
||||
{#<a href="{{ url('account.purchases') }}">{{ _('Account History') }}</a>#}
|
||||
|
|
Загрузка…
Ссылка в новой задаче