{% block content %}
<div class="item-group-content">
	{% include 'templates/includes/product_search_box.html' %}
	<div>
		{% if slideshow %}<!-- slideshow -->
		{% include "templates/includes/slideshow.html" %}
		{% endif %}
		{% if description %}<!-- description -->
		<div itemprop="description">{{ description or ""}}</div>
		{% endif %}
	</div>
	<div>
		{% if items %}
		<div id="search-list" class="row">
			{% for item in items %}
				{{ item }}
			{% endfor %}
		</div>
			{% if (items|length)==100 %}
				<div class="alert alert-info info">Showing top 100 items.</div>
			{% endif %}
		{% else %}
			<div class="text-muted">No items listed.</div>
		{% endif %}
	</div>
</div>
<script>
$(function() {
	if(window.logged_in && getCookie("system_user")==="yes") {
		frappe.has_permission("Item Group", "{{ name }}", "write", function(r) {
			frappe.require("/assets/frappe/js/frappe/website/editable.js");
			frappe.make_editable($('[itemprop="description"]'), "Item Group", "{{ name }}", "description");
		});
	}
});
</script>

{% endblock %}
