[fix] Item image urls can now have paranthesis

This commit is contained in:
Anand Doshi 2015-07-13 14:24:56 +05:30
parent f3b0b95b15
commit c530161de0
3 changed files with 6 additions and 3 deletions

View File

@ -0,0 +1 @@
- Display images in website's Item and Item List pages when the filename has paranthesis in its name

View File

@ -0,0 +1,3 @@
Leave change log files in this folder for user release notes.
(this file is just a place holder, don't delete it)

View File

@ -1,6 +1,6 @@
{% macro product_image_square(website_image, css_class="") %}
<div class="product-image product-image-square {% if not website_image -%} missing-image {%- endif %} {{ css_class }}"
{% if website_image -%} style="background-image: url({{ website_image }});" {%- endif %}>
{% if website_image -%} style="background-image: url('{{ frappe.utils.quoted(website_image) }}');" {%- endif %}>
{% if not website_image -%}<i class="centered octicon octicon-device-camera"></i>{%- endif %}
</div>
{% endmacro %}
@ -8,10 +8,9 @@
{% macro product_image(website_image, css_class="") %}
<div class="product-image {% if not website_image -%} missing-image {%- endif %} {{ css_class }}">
{% if website_image -%}
<img src="{{ website_image }}" class="img-responsive">
<img src="{{ frappe.utils.quoted(website_image) }}" class="img-responsive">
{%- else -%}
<i class="centered octicon octicon-device-camera"></i>
{%- endif %}
</div>
{% endmacro %}