From c530161de09c7be402ff4a44c776ac6054c8088f Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 13 Jul 2015 14:24:56 +0530 Subject: [PATCH] [fix] Item image urls can now have paranthesis --- erpnext/change_log/current/paranthesis_in_images.md | 1 + erpnext/change_log/current/readme.md | 3 +++ erpnext/templates/includes/macros.html | 5 ++--- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 erpnext/change_log/current/paranthesis_in_images.md create mode 100644 erpnext/change_log/current/readme.md diff --git a/erpnext/change_log/current/paranthesis_in_images.md b/erpnext/change_log/current/paranthesis_in_images.md new file mode 100644 index 0000000000..4859e962f5 --- /dev/null +++ b/erpnext/change_log/current/paranthesis_in_images.md @@ -0,0 +1 @@ +- Display images in website's Item and Item List pages when the filename has paranthesis in its name diff --git a/erpnext/change_log/current/readme.md b/erpnext/change_log/current/readme.md new file mode 100644 index 0000000000..e93bb75396 --- /dev/null +++ b/erpnext/change_log/current/readme.md @@ -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) diff --git a/erpnext/templates/includes/macros.html b/erpnext/templates/includes/macros.html index aa44a1731b..0967e97138 100644 --- a/erpnext/templates/includes/macros.html +++ b/erpnext/templates/includes/macros.html @@ -1,6 +1,6 @@ {% macro product_image_square(website_image, css_class="") %}
+ {% if website_image -%} style="background-image: url('{{ frappe.utils.quoted(website_image) }}');" {%- endif %}> {% if not website_image -%}{%- endif %}
{% endmacro %} @@ -8,10 +8,9 @@ {% macro product_image(website_image, css_class="") %}
{% if website_image -%} - + {%- else -%} {%- endif %}
{% endmacro %} -