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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
<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>
<p class="text-muted small">
{{ frappe.get_doc(doc).get_display() }}

View File

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

View File

@ -1,5 +1,5 @@
<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="col-xs-8">
<span class="indicator {{ "red" if doc.status=="Open" else "darkgrey" }}">

View File

@ -86,7 +86,7 @@ frappe.ready(function() {
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">
<a href="/{{ pathname }}/{{ doc.name }}" no-pjax>
<a href="/{{ pathname }}/{{ doc.name }}">
<div class="row">
<div class="col-sm-8 col-xs-7">
<div class="row">

View File

@ -1,9 +1,18 @@
{% extends "templates/web.html" %}
{% block title %} {{ "Shopping Cart" }} {% endblock %}
{% block header %}<h2>{{ _("My Cart") }}</h2>{% endblock %}
{% block script %}{% include "templates/includes/cart.js" %}{% endblock %}
{% block style %}{% include "templates/includes/cart.css" %}{% endblock %}
{% block script %}
<script>{% include "templates/includes/cart.js" %}</script>
{% endblock %}
{% block style %}
<style>
{% include "templates/includes/cart.css" %}
</style>
{% endblock %}
{% block header_actions %}
@ -14,7 +23,7 @@
{% endif %}
{% endblock %}
{% block content %}
{% block page_content %}
{% 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 header %}<h2>My Profile</h2>{% endblock %}
{% block content %}
{% block page_content %}
<div class="user-content" style="max-width: 500px;">
<div class="alert alert-warning" id="message" style="display: none;"></div>
<form>
@ -26,7 +28,7 @@
</form>
</div>
<script>
$(document).ready(function() {
frappe.ready(function() {
$("#fullname").val(getCookie("full_name") || "");
$("#update_user").click(function() {
frappe.call({

View File

@ -1,11 +1,17 @@
{% extends "templates/web.html" %}
{% block header %}
<h1>{{ doc.name }}</h1>
<!-- <h6 class="text-muted">{{ doc._title or doc.doctype }}</h6> -->
{% 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 %}

View File

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

View File

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