Website data from existing child tables, layout, images
diff --git a/erpnext/templates/includes/macros.html b/erpnext/templates/includes/macros.html
index 675b7af..db194b2 100644
--- a/erpnext/templates/includes/macros.html
+++ b/erpnext/templates/includes/macros.html
@@ -19,3 +19,26 @@
{%- endif %}
</div>
{% endmacro %}
+
+{% macro media_image(website_image, name, css_class="") %}
+{% if website_image -%}
+ <meta itemprop="image" content="{{ frappe.utils.quoted(website_image) | abs_url }}"></meta>
+{%- endif %}
+<div class="product-image product-image-square thumbsize {{ css_class }}"
+ {% if not website_image -%}{{ name }}{%- endif %}
+ {% if website_image -%}
+ style="background-image: url('{{ frappe.utils.quoted(website_image) | abs_url }}');"
+ {%- endif %}>
+</div>
+{% endmacro %}
+
+{% macro bom_image(website_image, name, css_class="") %}
+ <div class="product-image {{ css_class }}">
+ {% if not website_image -%}{{ name }}{%- endif %}
+ {% if website_image -%}
+ <a href="{{ frappe.utils.quoted(website_image) }}">
+ <img itemprop="image" src="{{ frappe.utils.quoted(website_image) | abs_url }}" class="img-responsive">
+ </a>
+ {%- endif %}
+ </div>
+{% endmacro %}