blob: 487968ba815f421ad5b9dc636be3bc7ca877c3b4 [file] [log] [blame]
Anand Doshida858cc2015-02-24 17:50:44 +05301{% macro product_image_square(website_image, css_class="") %}
2<div class="product-image product-image-square {% if not website_image -%} missing-image {%- endif %} {{ css_class }}"
Anand Doshi886def02015-07-22 14:43:17 +05303 {% if website_image -%} style="background-image: url('{{ frappe.utils.quoted(website_image) | abs_url }}');" {%- endif %}>
Anand Doshida858cc2015-02-24 17:50:44 +05304 {% if not website_image -%}<i class="centered octicon octicon-device-camera"></i>{%- endif %}
5</div>
6{% endmacro %}
7
8{% macro product_image(website_image, css_class="") %}
Rushabh Mehta156ce602015-09-11 18:49:59 +05309 <div class="product-image {% if not website_image -%} missing-image {%- endif %} {{ css_class }}">
10 {% if website_image -%}
11 <img src="{{ frappe.utils.quoted(website_image) | abs_url }}" class="img-responsive">
12 {%- else -%}
13 <i class="centered octicon octicon-device-camera"></i>
14 {%- endif %}
15 </div>
16{% endmacro %}
17
18{% macro item_name_and_description(d) %}
19 <div class="row">
20 <div class="col-xs-4 col-sm-2 order-image-col">
21 <div class="order-image">
22 {{ product_image_square(d.image) }}
23 </div>
24 </div>
25 <div class="col-xs-8 col-sm-10">
26 {{ d.item_code }}
27 <p class="text-muted small">{{ d.description }}</p>
28 </div>
29 </div>
Anand Doshida858cc2015-02-24 17:50:44 +053030{% endmacro %}