[cleanup] [website]

This commit is contained in:
Rushabh Mehta 2016-01-01 17:23:12 +05:30
parent f41da5cfab
commit 51008f2abc
13 changed files with 46 additions and 28 deletions

View File

@ -1,3 +1,5 @@
{% extends "templates/web.html" %}
{% block title %} {{ title }} {% endblock %} {% block title %} {{ title }} {% endblock %}
{% block header %}<h2>{{ title }}</h2>{% endblock %} {% block header %}<h2>{{ title }}</h2>{% endblock %}
@ -6,7 +8,7 @@
{% include 'templates/includes/product_search_box.html' %} {% include 'templates/includes/product_search_box.html' %}
{% endblock %} {% endblock %}
{% block content %} {% block page_content %}
{% from "erpnext/templates/includes/macros.html" import product_image %} {% from "erpnext/templates/includes/macros.html" import product_image %}
<div class="item-content"> <div class="item-content">
<div class="product-page-content" itemscope itemtype="http://schema.org/Product"> <div class="product-page-content" itemscope itemtype="http://schema.org/Product">

View File

@ -1,8 +1,10 @@
{% extends "templates/web.html" %}
{% block header_actions %} {% block header_actions %}
{% include 'templates/includes/product_search_box.html' %} {% include 'templates/includes/product_search_box.html' %}
{% endblock %} {% endblock %}
{% block content %} {% block page_content %}
<div class="item-group-content"> <div class="item-group-content">
<div> <div>
{% if slideshow %}<!-- slideshow --> {% if slideshow %}<!-- slideshow -->
@ -27,17 +29,6 @@
{% endif %} {% endif %}
</div> </div>
</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 %} {% endblock %}
{% block style %} {% block style %}

View File

@ -1,8 +1,10 @@
{% extends "templates/web.html" %}
{% block title %} {{ title }} {% endblock %} {% block title %} {{ title }} {% endblock %}
{% block header %}<h2>{{ title }}</h2>{% endblock %} {% block header %}<h2>{{ title }}</h2>{% endblock %}
{% block content %} {% block page_content %}
<div class="partner-content" itemscope itemtype="http://schema.org/Organization"> <div class="partner-content" itemscope itemtype="http://schema.org/Organization">
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">

View File

@ -1,5 +1,5 @@
<div class="web-list-item"> <div class="web-list-item">
<a href="/addresses?name={{ doc.name | urlencode }}" no-pjax class="no-decoration"> <a href="/addresses?name={{ doc.name | urlencode }}" class="no-decoration">
<h4 class="strong">{{ doc.address_title }}</h4> <h4 class="strong">{{ doc.address_title }}</h4>
<p class="text-muted small"> <p class="text-muted small">
{{ frappe.get_doc(doc).get_display() }} {{ frappe.get_doc(doc).get_display() }}

View File

@ -15,6 +15,7 @@
</div> </div>
</div> </div>
<script> <script>
frappe.ready(function() {
$("#footer-subscribe-button").click(function() { $("#footer-subscribe-button").click(function() {
if($("#footer-subscribe-email").val()) { if($("#footer-subscribe-email").val()) {
@ -38,5 +39,6 @@
else else
frappe.msgprint(frappe._("Please enter email address")) frappe.msgprint(frappe._("Please enter email address"))
}); });
});
</script> </script>
{% endif %} {% endif %}

View File

@ -1,5 +1,5 @@
<div class="web-list-item"> <div class="web-list-item">
<a class="no-decoration" href="/issues?name={{ doc.name }}" no-pjax> <a class="no-decoration" href="/issues?name={{ doc.name }}">
<div class="row"> <div class="row">
<div class="col-xs-8"> <div class="col-xs-8">
<span class="indicator {{ "red" if doc.status=="Open" else "darkgrey" }}"> <span class="indicator {{ "red" if doc.status=="Open" else "darkgrey" }}">

View File

@ -86,7 +86,7 @@ frappe.ready(function() {
return; return;
} }
frappe.load_via_ajax(window.location.pathname + "?variant=" + item_code); window.location.href = window.location.pathname + "?variant=" + item_code;
}); });
}); });

View File

@ -1,5 +1,5 @@
<div class="web-list-item"> <div class="web-list-item">
<a href="/{{ pathname }}/{{ doc.name }}" no-pjax> <a href="/{{ pathname }}/{{ doc.name }}">
<div class="row"> <div class="row">
<div class="col-sm-8 col-xs-7"> <div class="col-sm-8 col-xs-7">
<div class="row"> <div class="row">

View File

@ -1,9 +1,18 @@
{% extends "templates/web.html" %}
{% block title %} {{ "Shopping Cart" }} {% endblock %} {% block title %} {{ "Shopping Cart" }} {% endblock %}
{% block header %}<h2>{{ _("My Cart") }}</h2>{% endblock %} {% block header %}<h2>{{ _("My Cart") }}</h2>{% endblock %}
{% block script %}{% include "templates/includes/cart.js" %}{% endblock %} {% block script %}
{% block style %}{% include "templates/includes/cart.css" %}{% endblock %} <script>{% include "templates/includes/cart.js" %}</script>
{% endblock %}
{% block style %}
<style>
{% include "templates/includes/cart.css" %}
</style>
{% endblock %}
{% block header_actions %} {% block header_actions %}
@ -14,7 +23,7 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block content %} {% block page_content %}
{% from "templates/includes/macros.html" import item_name_and_description %} {% from "templates/includes/macros.html" import item_name_and_description %}

View File

@ -1,8 +1,10 @@
{% extends "templates/web.html" %}
{% block title %} {{ "My Profile" }} {% endblock %} {% block title %} {{ "My Profile" }} {% endblock %}
{% block header %}<h2>My Profile</h2>{% endblock %} {% block header %}<h2>My Profile</h2>{% endblock %}
{% block content %} {% block page_content %}
<div class="user-content" style="max-width: 500px;"> <div class="user-content" style="max-width: 500px;">
<div class="alert alert-warning" id="message" style="display: none;"></div> <div class="alert alert-warning" id="message" style="display: none;"></div>
<form> <form>
@ -26,7 +28,7 @@
</form> </form>
</div> </div>
<script> <script>
$(document).ready(function() { frappe.ready(function() {
$("#fullname").val(getCookie("full_name") || ""); $("#fullname").val(getCookie("full_name") || "");
$("#update_user").click(function() { $("#update_user").click(function() {
frappe.call({ frappe.call({

View File

@ -1,11 +1,17 @@
{% extends "templates/web.html" %}
{% block header %} {% block header %}
<h1>{{ doc.name }}</h1> <h1>{{ doc.name }}</h1>
<!-- <h6 class="text-muted">{{ doc._title or doc.doctype }}</h6> --> <!-- <h6 class="text-muted">{{ doc._title or doc.doctype }}</h6> -->
{% endblock %} {% endblock %}
{% block style %}{% include "templates/includes/order/order.css" %}{% endblock %} {% block style %}
<style>
{% include "templates/includes/order/order.css" %}
</style>
{% endblock %}
{% block content %} {% block page_content %}
{% from "erpnext/templates/includes/order/order_macros.html" import item_name_and_description %} {% from "erpnext/templates/includes/order/order_macros.html" import item_name_and_description %}

View File

@ -1,8 +1,10 @@
{% extends "templates/web.html" %}
{% block title %} {{ title }} {% endblock %} {% block title %} {{ title }} {% endblock %}
{% block header %}<h2>{{ title }}</h2>{% endblock %} {% block header %}<h2>{{ title }}</h2>{% endblock %}
{% block content %} {% block page_content %}
<div class="partners-content"> <div class="partners-content">
{% for partner_info in partners %} {% for partner_info in partners %}
<div class="row"> <div class="row">

View File

@ -1,3 +1,5 @@
{% extends "templates/web.html" %}
{% block title %} {{ "Product Search" }} {% endblock %} {% block title %} {{ "Product Search" }} {% endblock %}
{% block header %}<h2>Product Search</h2>{% endblock %} {% block header %}<h2>Product Search</h2>{% endblock %}
@ -6,11 +8,11 @@
{% include 'templates/includes/product_search_box.html' %} {% include 'templates/includes/product_search_box.html' %}
{% endblock %} {% endblock %}
{% block content %} {% block page_content %}
<script>{% include "templates/includes/product_list.js" %}</script> <script>{% include "templates/includes/product_list.js" %}</script>
<script> <script>
$(document).ready(function() { frappe.ready(function() {
var txt = get_url_arg("q"); var txt = get_url_arg("q");
$(".search-results").html("Search results for: " + txt); $(".search-results").html("Search results for: " + txt);
window.search = txt; window.search = txt;