brotherton-erpnext/erpnext/templates/generators/item.html

108 lines
3.6 KiB
HTML
Raw Normal View History

2016-01-01 11:53:12 +00:00
{% extends "templates/web.html" %}
{% block title %} {{ title }} {% endblock %}
{% block header %}<h2>{{ title }}</h2>{% endblock %}
{% block header_actions %}
{% include 'templates/includes/product_search_box.html' %}
{% endblock %}
2016-01-04 12:20:40 +00:00
{% block breadcrumbs %}
{% include "templates/includes/breadcrumbs.html" %}
{% endblock %}
2016-01-01 11:53:12 +00:00
{% block page_content %}
2015-02-24 12:20:44 +00:00
{% from "erpnext/templates/includes/macros.html" import product_image %}
<div class="item-content">
<div class="product-page-content" itemscope itemtype="http://schema.org/Product">
<div class="row">
2015-02-24 12:20:44 +00:00
<div class="col-sm-5">
{% if slideshow %}
{% include "templates/includes/slideshow.html" %}
{% else %}
2015-02-24 12:20:44 +00:00
{{ product_image(website_image, "product-full-image") }}
{% endif %}
</div>
2015-02-24 12:20:44 +00:00
<div class="col-sm-7">
2014-04-21 16:40:15 +00:00
<!-- <h3 itemprop="name" style="margin-top: 0px;">{{ item_name }}</h3> -->
<div itemprop="description">
2014-04-21 16:40:15 +00:00
{{ web_long_description or description or _("No description given") }}
</div>
2014-04-21 16:40:15 +00:00
<p class="text-muted">
{{ _("Item Code") }}: <span itemprop="productID">{{ variant and variant.name or name }}</span></p>
2014-04-21 16:40:15 +00:00
<br>
2015-10-20 13:04:21 +00:00
<div class="item-attribute-selectors">
{% if has_variants %}
{% for d in attributes %}
{% if attribute_values[d.attribute] -%}
<div class="item-view-attribute {% if (attribute_values[d.attribute] | len)==1 -%} hidden {%- endif %}"
2015-10-20 13:04:21 +00:00
style="margin-bottom: 10px;">
<h6 class="text-muted">{{ _(d.attribute) }}</h6>
<select class="form-control"
style="max-width: 140px"
data-attribute="{{ d.attribute }}">
{% for value in attribute_values[d.attribute] %}
<option value="{{ value }}"
{% if selected_attributes and selected_attributes[d.attribute]==value -%}
selected
{%- elif disabled_attributes and value in disabled_attributes.get(d.attribute, []) -%}
disabled
{%- endif %}>
2015-10-20 13:04:21 +00:00
{{ _(value) }}
</option>
{% endfor %}
</select>
</div>
{%- endif %}
2015-10-20 13:04:21 +00:00
{% endfor %}
{% endif %}
</div>
<br>
<div style="min-height: 100px; margin: 10px 0;">
<h4 class="item-price" itemprop="price"></h4>
<div class="item-stock" itemprop="availablity"></div>
<div class="item-cart hide">
<div id="item-add-to-cart">
<button class="btn btn-primary btn-sm">
{{ _("Add to Cart") }}</button>
</div>
<div id="item-update-cart"
style="display: none;
padding-left: 0px; padding-right: 0px;
padding-top: 10px;">
<a href="/cart">{{ _("Goto Cart") }}</a>
</div>
</div>
</div>
</div>
</div>
{% if website_specifications -%}
<div class="row item-website-specification" style="margin-top: 20px">
<div class="col-md-12">
2014-04-21 16:40:15 +00:00
<h4>{{ _("Specifications") }}</h4>
<table class="table table-bordered" style="width: 100%">
{% for d in website_specifications -%}
<tr>
<td style="width: 30%;">{{ d.label }}</td>
<td>{{ d.description }}</td>
</tr>
{%- endfor %}
</table>
</div>
</div>
{%- endif %}
</div>
</div>
<script>
{% include "templates/includes/product_page.js" %}
2015-10-05 10:57:52 +00:00
{% if variant_info %}
window.variant_info = {{ variant_info }};
{% else %}
window.variant_info = null;
2015-10-05 10:57:52 +00:00
{% endif %}
</script>
{% endblock %}