Redesigned templates. Now all templates must be inside templates/pages templates/generators
This commit is contained in:
parent
3c68488873
commit
df200f305b
@ -1 +0,0 @@
|
||||
{% extends "portal/templates/sales_transactions.html" %}
|
@ -1,3 +0,0 @@
|
||||
{% extends "website/templates/base.html" %}
|
||||
|
||||
{% block footer %}{% include "portal/templates/includes/footer.html" %}{% endblock %}
|
@ -1,4 +1,4 @@
|
||||
{% extends "portal/templates/sale.html" %}
|
||||
{% extends "templates/sale.html" %}
|
||||
|
||||
{% block status -%}
|
||||
{% if doc.status %}{{ doc.status }}{% endif %}
|
||||
|
@ -8,7 +8,7 @@ from webnotes import _
|
||||
no_cache = True
|
||||
|
||||
def get_context():
|
||||
from erpnext.portal.utils import get_transaction_context
|
||||
from erpnext.templates.utils import get_transaction_context
|
||||
context = get_transaction_context("Sales Order", webnotes.form_dict.name)
|
||||
modify_status(context.get("doc"))
|
||||
context.update({
|
||||
|
@ -1 +1 @@
|
||||
{% extends "portal/templates/sales_transactions.html" %}
|
||||
{% extends "templates/sales_transactions.html" %}
|
@ -7,7 +7,7 @@ import webnotes
|
||||
no_cache = True
|
||||
|
||||
def get_context():
|
||||
from erpnext.portal.utils import get_currency_context
|
||||
from erpnext.templates.utils import get_currency_context
|
||||
context = get_currency_context()
|
||||
context.update({
|
||||
"title": "My Orders",
|
||||
@ -20,7 +20,7 @@ def get_context():
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_orders(start=0):
|
||||
from erpnext.portal.utils import get_transaction_list
|
||||
from erpnext.templates.utils import get_transaction_list
|
||||
from erpnext.selling.doctype.sales_order.templates.pages.order import modify_status
|
||||
orders = get_transaction_list("Sales Order", start, ["per_billed", "per_delivered"])
|
||||
for d in orders:
|
||||
|
@ -107,11 +107,7 @@ def get_group_item_count(item_group):
|
||||
where item_group in (%s))) """ % (child_groups, child_groups))[0][0]
|
||||
|
||||
def get_item_for_list_in_html(context):
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
scrub_item_for_list(context)
|
||||
jenv = Environment(loader = FileSystemLoader(get_base_path()))
|
||||
template = jenv.get_template("app/stock/doctype/item/templates/includes/product_in_grid.html")
|
||||
return template.render(context)
|
||||
return webnotes.get_template("templates/includes/product_in_grid.html").render(context)
|
||||
|
||||
def scrub_item_for_list(r):
|
||||
if not r.website_description:
|
||||
|
@ -1 +0,0 @@
|
||||
{% extends "portal/templates/sale.html" %}
|
@ -1 +0,0 @@
|
||||
{% extends "portal/templates/sales_transactions.html" %}
|
@ -2,12 +2,12 @@
|
||||
|
||||
{% block javascript %}
|
||||
<script>
|
||||
{% include "stock/doctype/item/templates/includes/product_page.js" %}
|
||||
{% include "templates/includes/product_page.js" %}
|
||||
|
||||
$(function() {
|
||||
if(window.logged_in && getCookie("system_user")==="yes") {
|
||||
wn.has_permission("Item", "{{ name }}", "write", function(r) {
|
||||
wn.require("js/wn/website/editable.js");
|
||||
wn.require("assets/webnotes/js/wn/website/editable.js");
|
||||
wn.make_editable($('[itemprop="description"]'), "Item", "{{ name }}", "web_long_description");
|
||||
});
|
||||
}
|
||||
@ -17,25 +17,25 @@
|
||||
|
||||
{% block css %}
|
||||
<style>
|
||||
{% include "stock/doctype/item/templates/includes/product_page.css" %}
|
||||
{% include "templates/includes/product_page.css" %}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'stock/doctype/item/templates/includes/product_search_box.html' %}
|
||||
{% include 'stock/doctype/item/templates/includes/product_breadcrumbs.html' %}
|
||||
{% include 'templates/includes/product_search_box.html' %}
|
||||
{% include 'templates/includes/product_breadcrumbs.html' %}
|
||||
<div class="container content product-page-content" itemscope itemtype="http://schema.org/Product">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{% if slideshow %}
|
||||
{% include "website/doctype/website_slideshow/templates/includes/slideshow.html" %}
|
||||
{% include "templates/includes/slideshow.html" %}
|
||||
{% else %}
|
||||
{% if website_image %}
|
||||
<image itemprop="image" class="item-main-image"
|
||||
src="{{ website_image }}" />
|
||||
{% else %}
|
||||
<div class="img-area">
|
||||
{% include 'stock/doctype/item/templates/includes/product_missing_image.html' %}
|
||||
{% include 'templates/includes/product_missing_image.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
@ -1,11 +1,11 @@
|
||||
{% extends base_template %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'stock/doctype/item/templates/includes/product_search_box.html' %}
|
||||
{% include 'stock/doctype/item/templates/includes/product_breadcrumbs.html' %}
|
||||
{% include 'templates/includes/product_search_box.html' %}
|
||||
{% include 'templates/includes/product_breadcrumbs.html' %}
|
||||
<div class="container content">
|
||||
{% if slideshow %}<!-- slideshow -->
|
||||
{% include "website/doctype/website_slideshow/templates/includes/slideshow.html" %}
|
||||
{% include "templates/includes/slideshow.html" %}
|
||||
{% endif %}
|
||||
{% if description %}<!-- description -->
|
||||
<div itemprop="description">{{ description or ""}}</div>
|
||||
@ -42,7 +42,7 @@
|
||||
$(function() {
|
||||
if(window.logged_in && getCookie("system_user")==="yes") {
|
||||
wn.has_permission("Item Group", "{{ name }}", "write", function(r) {
|
||||
wn.require("js/wn/website/editable.js");
|
||||
wn.require("assets/webnotes/js/wn/website/editable.js");
|
||||
wn.make_editable($('[itemprop="description"]'), "Item Group", "{{ name }}", "description");
|
||||
});
|
||||
}
|
@ -1,8 +1,3 @@
|
||||
{% extends "website/templates/includes/footer.html" %}
|
||||
|
||||
{% block powered %}<a href="http://erpnext.org" style="color: #aaa;">ERPNext Powered</a>{% endblock %}
|
||||
|
||||
{% block extension %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="input-group col-sm-6 col-sm-offset-3" style="margin-top: 7px;">
|
||||
@ -39,4 +34,3 @@
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
1
erpnext/templates/includes/footer_powered.html
Normal file
1
erpnext/templates/includes/footer_powered.html
Normal file
@ -0,0 +1 @@
|
||||
<a href="http://erpnext.org" style="color: #aaa;">ERPNext Powered</a>
|
@ -1,7 +1,7 @@
|
||||
{% extends base_template %}
|
||||
|
||||
{% block javascript %}
|
||||
<script>{% include "portal/templates/includes/cart.js" %}</script>
|
||||
<script>{% include "templates/includes/cart.js" %}</script>
|
||||
{% endblock %}
|
||||
|
||||
{% set title="Shopping Cart" %}
|
@ -1,4 +1,4 @@
|
||||
{% extends "portal/templates/sale.html" %}
|
||||
{% extends "templates/sale.html" %}
|
||||
|
||||
{% block status -%}
|
||||
{% if doc.status %}{{ doc.status }}{% endif %}
|
@ -9,7 +9,7 @@ from webnotes.utils import flt, fmt_money
|
||||
no_cache = True
|
||||
|
||||
def get_context():
|
||||
from erpnext.portal.utils import get_transaction_context
|
||||
from erpnext.templates.utils import get_transaction_context
|
||||
context = get_transaction_context("Sales Invoice", webnotes.form_dict.name)
|
||||
modify_status(context.get("doc"))
|
||||
context.update({
|
1
erpnext/templates/pages/invoices.html
Normal file
1
erpnext/templates/pages/invoices.html
Normal file
@ -0,0 +1 @@
|
||||
{% extends "templates/sales_transactions.html" %}
|
@ -7,7 +7,7 @@ import webnotes
|
||||
no_cache = True
|
||||
|
||||
def get_context():
|
||||
from erpnext.portal.utils import get_currency_context
|
||||
from erpnext.templates.utils import get_currency_context
|
||||
context = get_currency_context()
|
||||
context.update({
|
||||
"title": "Invoices",
|
||||
@ -20,7 +20,7 @@ def get_context():
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_invoices(start=0):
|
||||
from erpnext.portal.utils import get_transaction_list
|
||||
from erpnext.templates.utils import get_transaction_list
|
||||
from erpnext.accounts.doctype.sales_invoice.templates.pages.invoice import modify_status
|
||||
invoices = get_transaction_list("Sales Invoice", start, ["outstanding_amount"])
|
||||
for d in invoices:
|
@ -34,7 +34,7 @@ $(document).ready(function() {
|
||||
$("#fullname").val(getCookie("full_name") || "");
|
||||
$("#update_profile").click(function() {
|
||||
wn.call({
|
||||
method: "portal.templates.pages.profile.update_profile",
|
||||
method: "erpnext.templates.pages.profile.update_profile",
|
||||
type: "POST",
|
||||
args: {
|
||||
fullname: $("#fullname").val(),
|
1
erpnext/templates/pages/shipment.html
Normal file
1
erpnext/templates/pages/shipment.html
Normal file
@ -0,0 +1 @@
|
||||
{% extends "templates/sale.html" %}
|
@ -7,7 +7,7 @@ import webnotes
|
||||
no_cache = True
|
||||
|
||||
def get_context():
|
||||
from erpnext.portal.utils import get_transaction_context
|
||||
from erpnext.templates.utils import get_transaction_context
|
||||
context = get_transaction_context("Delivery Note", webnotes.form_dict.name)
|
||||
context.update({
|
||||
"parent_link": "shipments",
|
1
erpnext/templates/pages/shipments.html
Normal file
1
erpnext/templates/pages/shipments.html
Normal file
@ -0,0 +1 @@
|
||||
{% extends "templates/sales_transactions.html" %}
|
@ -7,11 +7,11 @@ import webnotes
|
||||
no_cache = True
|
||||
|
||||
def get_context():
|
||||
from erpnext.portal.utils import get_currency_context
|
||||
from erpnext.templates.utils import get_currency_context
|
||||
context = get_currency_context()
|
||||
context.update({
|
||||
"title": "Shipments",
|
||||
"method": "portal.templates.pages.shipments.get_shipments",
|
||||
"method": "erpnext.templates.pages.shipments.get_shipments",
|
||||
"icon": "icon-truck",
|
||||
"empty_list_message": "No Shipments Found",
|
||||
"page": "shipment"
|
||||
@ -20,5 +20,5 @@ def get_context():
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_shipments(start=0):
|
||||
from erpnext.portal.utils import get_transaction_list
|
||||
from erpnext.templates.utils import get_transaction_list
|
||||
return get_transaction_list("Delivery Note", start)
|
@ -1,4 +1,4 @@
|
||||
{% extends "portal/templates/includes/transactions.html" %}
|
||||
{% extends "templates/includes/transactions.html" %}
|
||||
|
||||
{% block javascript -%}
|
||||
{{ super() }}
|
@ -1,4 +1,4 @@
|
||||
{% extends "portal/templates/includes/transactions.html" %}
|
||||
{% extends "templates/includes/transactions.html" %}
|
||||
|
||||
{% block javascript -%}
|
||||
<script>
|
@ -9,7 +9,7 @@ class CustomDocType(DocType):
|
||||
if webnotes.form_dict.lead_email and validate_email_add(webnotes.form_dict.lead_email):
|
||||
import requests
|
||||
response = requests.post(conf.demo_notify_url, data={
|
||||
"cmd":"portal.utils.send_message",
|
||||
"cmd":"erpnext.templates.utils.send_message",
|
||||
"subject":"Logged into Demo",
|
||||
"sender": webnotes.form_dict.lead_email,
|
||||
"message": "via demo.erpnext.com"
|
||||
|
Loading…
x
Reference in New Issue
Block a user