blob: 91ea3e4917284aaa6505c7c2eb634bda8fdd332a [file] [log] [blame]
Rushabh Mehta7c2312a2013-09-10 12:51:52 +05301{% extends base_template %}
Anand Doshi51146c02012-07-12 18:41:12 +05302
3{% block javascript %}
Rushabh Mehta7c2312a2013-09-10 12:51:52 +05304<script>
Rushabh Mehtadf200f32013-12-25 15:19:22 +05305 {% include "templates/includes/product_page.js" %}
Anand Doshi89844f82013-11-13 15:03:32 +05306
Rushabh Mehta46eaa552013-10-18 12:16:56 +05307 $(function() {
8 if(window.logged_in && getCookie("system_user")==="yes") {
Anand Doshi89844f82013-11-13 15:03:32 +05309 wn.has_permission("Item", "{{ name }}", "write", function(r) {
Rushabh Mehtadf200f32013-12-25 15:19:22 +053010 wn.require("assets/webnotes/js/wn/website/editable.js");
Anand Doshi89844f82013-11-13 15:03:32 +053011 wn.make_editable($('[itemprop="description"]'), "Item", "{{ name }}", "web_long_description");
12 });
Rushabh Mehta46eaa552013-10-18 12:16:56 +053013 }
Anand Doshi89844f82013-11-13 15:03:32 +053014 });
Rushabh Mehta7c2312a2013-09-10 12:51:52 +053015</script>
Anand Doshi51146c02012-07-12 18:41:12 +053016{% endblock %}
17
18{% block css %}
Rushabh Mehta7c2312a2013-09-10 12:51:52 +053019<style>
Rushabh Mehtadf200f32013-12-25 15:19:22 +053020 {% include "templates/includes/product_page.css" %}
Rushabh Mehta7c2312a2013-09-10 12:51:52 +053021</style>
Anand Doshi51146c02012-07-12 18:41:12 +053022{% endblock %}
Anand Doshi10bcf5e2012-06-26 18:54:10 +053023
Anand Doshi10bcf5e2012-06-26 18:54:10 +053024{% block content %}
Rushabh Mehtadf200f32013-12-25 15:19:22 +053025 {% include 'templates/includes/product_search_box.html' %}
26 {% include 'templates/includes/product_breadcrumbs.html' %}
Anand Doshi0c8fd342013-11-21 14:55:45 +053027 <div class="container content product-page-content" itemscope itemtype="http://schema.org/Product">
Rushabh Mehta78db3ec2013-02-21 14:25:30 +053028 <div class="row">
Rushabh Mehtacce21d12013-08-21 17:48:08 +053029 <div class="col-md-6">
Rushabh Mehtacb6cf712013-03-14 16:45:28 +053030 {% if slideshow %}
Rushabh Mehtadf200f32013-12-25 15:19:22 +053031 {% include "templates/includes/slideshow.html" %}
Rushabh Mehtacb6cf712013-03-14 16:45:28 +053032 {% else %}
33 {% if website_image %}
Rushabh Mehta5265f792013-03-18 10:31:18 +053034 <image itemprop="image" class="item-main-image"
35 src="{{ website_image }}" />
Rushabh Mehtacb6cf712013-03-14 16:45:28 +053036 {% else %}
37 <div class="img-area">
Rushabh Mehtadf200f32013-12-25 15:19:22 +053038 {% include 'templates/includes/product_missing_image.html' %}
Rushabh Mehtacb6cf712013-03-14 16:45:28 +053039 </div>
40 {% endif %}
41 {% endif %}
42 </div>
Rushabh Mehtacce21d12013-08-21 17:48:08 +053043 <div class="col-md-6">
Rushabh Mehtacb6cf712013-03-14 16:45:28 +053044 <h3 itemprop="name" style="margin-top: 0px;">{{ item_name }}</h3>
Anand Doshiab690292013-06-13 11:21:35 +053045 <p class="help">Item Code: <span itemprop="productID">{{ name }}</span></p>
Rushabh Mehtacb6cf712013-03-14 16:45:28 +053046 <h4>Product Description</h4>
Rushabh Mehta78db3ec2013-02-21 14:25:30 +053047 <div itemprop="description">
Anand Doshicefccb92013-07-15 18:28:14 +053048 {{ web_long_description or description or "[No description given]" }}
Anand Doshi10bcf5e2012-06-26 18:54:10 +053049 </div>
Anand Doshi3dceb842013-06-19 14:57:14 +053050 <div style="min-height: 100px; margin: 10px 0;">
51 <div class="item-price-info" style="display: none;">
52 <h4 class="item-price" itemprop="price"></h4>
53 <div class="item-stock" itemprop="availablity"></div>
54 <div id="item-add-to-cart">
Anand Doshic2a35272013-06-19 17:19:20 +053055 <button class="btn btn-primary">
56 <i class="icon-shopping-cart"></i> Add to Cart</button>
Anand Doshi3dceb842013-06-19 14:57:14 +053057 </div>
Rushabh Mehtacce21d12013-08-21 17:48:08 +053058 <div id="item-update-cart" class="input-group col-md-4" style="display: none;
Anand Doshi2862c9e2013-07-08 18:50:33 +053059 padding-left: 0px; padding-right: 0px;">
Rushabh Mehtacce21d12013-08-21 17:48:08 +053060 <input class="form-control" type="text">
Anand Doshi3dceb842013-06-19 14:57:14 +053061 <div class="input-group-btn">
Anand Doshic2a35272013-06-19 17:19:20 +053062 <button class="btn btn-primary">
Anand Doshicd6dcac2013-06-20 12:39:25 +053063 <i class="icon-ok"></i></button>
Anand Doshi3dceb842013-06-19 14:57:14 +053064 </div>
65 </div>
66 </div>
Anand Doshiab690292013-06-13 11:21:35 +053067 </div>
Anand Doshi220ff302013-05-14 15:33:34 +053068 </div>
69 </div>
70 {% if obj.doclist.get({"doctype":"Item Website Specification"}) -%}
71 <div class="row" style="margin-top: 20px">
Rushabh Mehtacce21d12013-08-21 17:48:08 +053072 <div class="col-md-12">
Rushabh Mehtacb6cf712013-03-14 16:45:28 +053073 <h4>Specifications</h4>
Rushabh Mehtaebee1c72013-03-14 14:33:31 +053074 <table class="table table-bordered" style="width: 100%">
75 {% for d in obj.doclist.get(
Anand Doshi220ff302013-05-14 15:33:34 +053076 {"doctype":"Item Website Specification"}) -%}
Rushabh Mehtaebee1c72013-03-14 14:33:31 +053077 <tr>
78 <td style="width: 30%;">{{ d.label }}</td>
79 <td>{{ d.description }}</td>
80 </tr>
Anand Doshi220ff302013-05-14 15:33:34 +053081 {%- endfor %}
Rushabh Mehtaebee1c72013-03-14 14:33:31 +053082 </table>
Anand Doshi10bcf5e2012-06-26 18:54:10 +053083 </div>
Anand Doshi10bcf5e2012-06-26 18:54:10 +053084 </div>
Anand Doshi220ff302013-05-14 15:33:34 +053085 {%- endif %}
Anand Doshi10bcf5e2012-06-26 18:54:10 +053086 </div>
Anand Doshi51146c02012-07-12 18:41:12 +053087{% endblock %}