Rushabh Mehta | 7c2312a | 2013-09-10 12:51:52 +0530 | [diff] [blame] | 1 | {% extends base_template %} |
Anand Doshi | 51146c0 | 2012-07-12 18:41:12 +0530 | [diff] [blame] | 2 | |
| 3 | {% block javascript %} |
Rushabh Mehta | 7c2312a | 2013-09-10 12:51:52 +0530 | [diff] [blame] | 4 | <script> |
Rushabh Mehta | df200f3 | 2013-12-25 15:19:22 +0530 | [diff] [blame] | 5 | {% include "templates/includes/product_page.js" %} |
Anand Doshi | 89844f8 | 2013-11-13 15:03:32 +0530 | [diff] [blame] | 6 | |
Rushabh Mehta | 46eaa55 | 2013-10-18 12:16:56 +0530 | [diff] [blame] | 7 | $(function() { |
| 8 | if(window.logged_in && getCookie("system_user")==="yes") { |
Anand Doshi | 89844f8 | 2013-11-13 15:03:32 +0530 | [diff] [blame] | 9 | wn.has_permission("Item", "{{ name }}", "write", function(r) { |
Rushabh Mehta | df200f3 | 2013-12-25 15:19:22 +0530 | [diff] [blame] | 10 | wn.require("assets/webnotes/js/wn/website/editable.js"); |
Anand Doshi | 89844f8 | 2013-11-13 15:03:32 +0530 | [diff] [blame] | 11 | wn.make_editable($('[itemprop="description"]'), "Item", "{{ name }}", "web_long_description"); |
| 12 | }); |
Rushabh Mehta | 46eaa55 | 2013-10-18 12:16:56 +0530 | [diff] [blame] | 13 | } |
Anand Doshi | 89844f8 | 2013-11-13 15:03:32 +0530 | [diff] [blame] | 14 | }); |
Rushabh Mehta | 7c2312a | 2013-09-10 12:51:52 +0530 | [diff] [blame] | 15 | </script> |
Anand Doshi | 51146c0 | 2012-07-12 18:41:12 +0530 | [diff] [blame] | 16 | {% endblock %} |
| 17 | |
| 18 | {% block css %} |
Rushabh Mehta | 7c2312a | 2013-09-10 12:51:52 +0530 | [diff] [blame] | 19 | <style> |
Rushabh Mehta | df200f3 | 2013-12-25 15:19:22 +0530 | [diff] [blame] | 20 | {% include "templates/includes/product_page.css" %} |
Rushabh Mehta | 7c2312a | 2013-09-10 12:51:52 +0530 | [diff] [blame] | 21 | </style> |
Anand Doshi | 51146c0 | 2012-07-12 18:41:12 +0530 | [diff] [blame] | 22 | {% endblock %} |
Anand Doshi | 10bcf5e | 2012-06-26 18:54:10 +0530 | [diff] [blame] | 23 | |
Anand Doshi | 10bcf5e | 2012-06-26 18:54:10 +0530 | [diff] [blame] | 24 | {% block content %} |
Rushabh Mehta | df200f3 | 2013-12-25 15:19:22 +0530 | [diff] [blame] | 25 | {% include 'templates/includes/product_search_box.html' %} |
| 26 | {% include 'templates/includes/product_breadcrumbs.html' %} |
Anand Doshi | 0c8fd34 | 2013-11-21 14:55:45 +0530 | [diff] [blame] | 27 | <div class="container content product-page-content" itemscope itemtype="http://schema.org/Product"> |
Rushabh Mehta | 78db3ec | 2013-02-21 14:25:30 +0530 | [diff] [blame] | 28 | <div class="row"> |
Rushabh Mehta | cce21d1 | 2013-08-21 17:48:08 +0530 | [diff] [blame] | 29 | <div class="col-md-6"> |
Rushabh Mehta | cb6cf71 | 2013-03-14 16:45:28 +0530 | [diff] [blame] | 30 | {% if slideshow %} |
Rushabh Mehta | df200f3 | 2013-12-25 15:19:22 +0530 | [diff] [blame] | 31 | {% include "templates/includes/slideshow.html" %} |
Rushabh Mehta | cb6cf71 | 2013-03-14 16:45:28 +0530 | [diff] [blame] | 32 | {% else %} |
| 33 | {% if website_image %} |
Rushabh Mehta | 5265f79 | 2013-03-18 10:31:18 +0530 | [diff] [blame] | 34 | <image itemprop="image" class="item-main-image" |
| 35 | src="{{ website_image }}" /> |
Rushabh Mehta | cb6cf71 | 2013-03-14 16:45:28 +0530 | [diff] [blame] | 36 | {% else %} |
| 37 | <div class="img-area"> |
Rushabh Mehta | df200f3 | 2013-12-25 15:19:22 +0530 | [diff] [blame] | 38 | {% include 'templates/includes/product_missing_image.html' %} |
Rushabh Mehta | cb6cf71 | 2013-03-14 16:45:28 +0530 | [diff] [blame] | 39 | </div> |
| 40 | {% endif %} |
| 41 | {% endif %} |
| 42 | </div> |
Rushabh Mehta | cce21d1 | 2013-08-21 17:48:08 +0530 | [diff] [blame] | 43 | <div class="col-md-6"> |
Rushabh Mehta | cb6cf71 | 2013-03-14 16:45:28 +0530 | [diff] [blame] | 44 | <h3 itemprop="name" style="margin-top: 0px;">{{ item_name }}</h3> |
Anand Doshi | ab69029 | 2013-06-13 11:21:35 +0530 | [diff] [blame] | 45 | <p class="help">Item Code: <span itemprop="productID">{{ name }}</span></p> |
Rushabh Mehta | cb6cf71 | 2013-03-14 16:45:28 +0530 | [diff] [blame] | 46 | <h4>Product Description</h4> |
Rushabh Mehta | 78db3ec | 2013-02-21 14:25:30 +0530 | [diff] [blame] | 47 | <div itemprop="description"> |
Anand Doshi | cefccb9 | 2013-07-15 18:28:14 +0530 | [diff] [blame] | 48 | {{ web_long_description or description or "[No description given]" }} |
Anand Doshi | 10bcf5e | 2012-06-26 18:54:10 +0530 | [diff] [blame] | 49 | </div> |
Anand Doshi | 3dceb84 | 2013-06-19 14:57:14 +0530 | [diff] [blame] | 50 | <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 Doshi | c2a3527 | 2013-06-19 17:19:20 +0530 | [diff] [blame] | 55 | <button class="btn btn-primary"> |
| 56 | <i class="icon-shopping-cart"></i> Add to Cart</button> |
Anand Doshi | 3dceb84 | 2013-06-19 14:57:14 +0530 | [diff] [blame] | 57 | </div> |
Rushabh Mehta | cce21d1 | 2013-08-21 17:48:08 +0530 | [diff] [blame] | 58 | <div id="item-update-cart" class="input-group col-md-4" style="display: none; |
Anand Doshi | 2862c9e | 2013-07-08 18:50:33 +0530 | [diff] [blame] | 59 | padding-left: 0px; padding-right: 0px;"> |
Rushabh Mehta | cce21d1 | 2013-08-21 17:48:08 +0530 | [diff] [blame] | 60 | <input class="form-control" type="text"> |
Anand Doshi | 3dceb84 | 2013-06-19 14:57:14 +0530 | [diff] [blame] | 61 | <div class="input-group-btn"> |
Anand Doshi | c2a3527 | 2013-06-19 17:19:20 +0530 | [diff] [blame] | 62 | <button class="btn btn-primary"> |
Anand Doshi | cd6dcac | 2013-06-20 12:39:25 +0530 | [diff] [blame] | 63 | <i class="icon-ok"></i></button> |
Anand Doshi | 3dceb84 | 2013-06-19 14:57:14 +0530 | [diff] [blame] | 64 | </div> |
| 65 | </div> |
| 66 | </div> |
Anand Doshi | ab69029 | 2013-06-13 11:21:35 +0530 | [diff] [blame] | 67 | </div> |
Anand Doshi | 220ff30 | 2013-05-14 15:33:34 +0530 | [diff] [blame] | 68 | </div> |
| 69 | </div> |
| 70 | {% if obj.doclist.get({"doctype":"Item Website Specification"}) -%} |
| 71 | <div class="row" style="margin-top: 20px"> |
Rushabh Mehta | cce21d1 | 2013-08-21 17:48:08 +0530 | [diff] [blame] | 72 | <div class="col-md-12"> |
Rushabh Mehta | cb6cf71 | 2013-03-14 16:45:28 +0530 | [diff] [blame] | 73 | <h4>Specifications</h4> |
Rushabh Mehta | ebee1c7 | 2013-03-14 14:33:31 +0530 | [diff] [blame] | 74 | <table class="table table-bordered" style="width: 100%"> |
| 75 | {% for d in obj.doclist.get( |
Anand Doshi | 220ff30 | 2013-05-14 15:33:34 +0530 | [diff] [blame] | 76 | {"doctype":"Item Website Specification"}) -%} |
Rushabh Mehta | ebee1c7 | 2013-03-14 14:33:31 +0530 | [diff] [blame] | 77 | <tr> |
| 78 | <td style="width: 30%;">{{ d.label }}</td> |
| 79 | <td>{{ d.description }}</td> |
| 80 | </tr> |
Anand Doshi | 220ff30 | 2013-05-14 15:33:34 +0530 | [diff] [blame] | 81 | {%- endfor %} |
Rushabh Mehta | ebee1c7 | 2013-03-14 14:33:31 +0530 | [diff] [blame] | 82 | </table> |
Anand Doshi | 10bcf5e | 2012-06-26 18:54:10 +0530 | [diff] [blame] | 83 | </div> |
Anand Doshi | 10bcf5e | 2012-06-26 18:54:10 +0530 | [diff] [blame] | 84 | </div> |
Anand Doshi | 220ff30 | 2013-05-14 15:33:34 +0530 | [diff] [blame] | 85 | {%- endif %} |
Anand Doshi | 10bcf5e | 2012-06-26 18:54:10 +0530 | [diff] [blame] | 86 | </div> |
Anand Doshi | 51146c0 | 2012-07-12 18:41:12 +0530 | [diff] [blame] | 87 | {% endblock %} |