Anand Doshi | da858cc | 2015-02-24 17:50:44 +0530 | [diff] [blame] | 1 | {% 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 Doshi | 886def0 | 2015-07-22 14:43:17 +0530 | [diff] [blame] | 3 | {% if website_image -%} style="background-image: url('{{ frappe.utils.quoted(website_image) | abs_url }}');" {%- endif %}> |
Anand Doshi | da858cc | 2015-02-24 17:50:44 +0530 | [diff] [blame] | 4 | {% 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 Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame^] | 9 | <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 Doshi | da858cc | 2015-02-24 17:50:44 +0530 | [diff] [blame] | 30 | {% endmacro %} |