Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 1 | {% block title %} {{ title }} {% endblock %} |
| 2 | |
| 3 | {% block header %}<h2>{{ title }}</h2>{% endblock %} |
| 4 | |
| 5 | {% block content %} |
| 6 | <div class="item-content"> |
| 7 | {% include 'templates/includes/product_search_box.html' %} |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 8 | <div class="product-page-content" itemscope itemtype="http://schema.org/Product"> |
| 9 | <div class="row"> |
| 10 | <div class="col-md-6"> |
| 11 | {% if slideshow %} |
| 12 | {% include "templates/includes/slideshow.html" %} |
| 13 | {% else %} |
| 14 | {% if website_image %} |
| 15 | <image itemprop="image" class="item-main-image" |
| 16 | src="{{ website_image }}" /> |
| 17 | {% else %} |
| 18 | <div class="img-area"> |
| 19 | {% include 'templates/includes/product_missing_image.html' %} |
| 20 | </div> |
| 21 | {% endif %} |
| 22 | {% endif %} |
| 23 | </div> |
| 24 | <div class="col-md-6"> |
Rushabh Mehta | 3f51705 | 2014-04-21 22:10:15 +0530 | [diff] [blame^] | 25 | <!-- <h3 itemprop="name" style="margin-top: 0px;">{{ item_name }}</h3> --> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 26 | <div itemprop="description"> |
Rushabh Mehta | 3f51705 | 2014-04-21 22:10:15 +0530 | [diff] [blame^] | 27 | {{ web_long_description or description or _("No description given") }} |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 28 | </div> |
Rushabh Mehta | 3f51705 | 2014-04-21 22:10:15 +0530 | [diff] [blame^] | 29 | <p class="text-muted"> |
| 30 | {{ _("Item Code") }}: <span itemprop="productID">{{ name }}</span></p> |
| 31 | <br> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 32 | <div style="min-height: 100px; margin: 10px 0;"> |
| 33 | <div class="item-price-info" style="display: none;"> |
| 34 | <h4 class="item-price" itemprop="price"></h4> |
| 35 | <div class="item-stock" itemprop="availablity"></div> |
| 36 | <div id="item-add-to-cart"> |
| 37 | <button class="btn btn-primary"> |
Rushabh Mehta | 3f51705 | 2014-04-21 22:10:15 +0530 | [diff] [blame^] | 38 | <i class="icon-shopping-cart"></i> + {{ _("Add to Cart") }}</button> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 39 | </div> |
| 40 | <div id="item-update-cart" class="input-group col-md-4" style="display: none; |
| 41 | padding-left: 0px; padding-right: 0px;"> |
| 42 | <input class="form-control" type="text"> |
| 43 | <div class="input-group-btn"> |
| 44 | <button class="btn btn-primary"> |
| 45 | <i class="icon-ok"></i></button> |
| 46 | </div> |
| 47 | </div> |
| 48 | </div> |
| 49 | </div> |
| 50 | </div> |
| 51 | </div> |
| 52 | {% if doc.get({"doctype":"Item Website Specification"}) -%} |
| 53 | <div class="row" style="margin-top: 20px"> |
| 54 | <div class="col-md-12"> |
Rushabh Mehta | 3f51705 | 2014-04-21 22:10:15 +0530 | [diff] [blame^] | 55 | <h4>{{ _("Specifications") }}</h4> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 56 | <table class="table table-bordered" style="width: 100%"> |
| 57 | {% for d in doc.get( |
| 58 | {"doctype":"Item Website Specification"}) -%} |
| 59 | <tr> |
| 60 | <td style="width: 30%;">{{ d.label }}</td> |
| 61 | <td>{{ d.description }}</td> |
| 62 | </tr> |
| 63 | {%- endfor %} |
| 64 | </table> |
| 65 | </div> |
| 66 | </div> |
| 67 | {%- endif %} |
| 68 | </div> |
| 69 | </div> |
| 70 | <script> |
| 71 | {% include "templates/includes/product_page.js" %} |
| 72 | |
| 73 | $(function() { |
| 74 | if(window.logged_in && getCookie("system_user")==="yes") { |
| 75 | frappe.has_permission("Item", "{{ name }}", "write", function(r) { |
| 76 | frappe.require("/assets/frappe/js/frappe/website/editable.js"); |
| 77 | frappe.make_editable($('[itemprop="description"]'), "Item", "{{ name }}", "web_long_description"); |
| 78 | }); |
| 79 | } |
| 80 | }); |
| 81 | </script> |
| 82 | {% endblock %} |
| 83 | |
| 84 | {% block sidebar %}{% include "templates/includes/sidebar.html" %}{% endblock %} |