mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
[website] [minor] moving to framework
This commit is contained in:
0
portal/templates/pages/__init__.py
Normal file
0
portal/templates/pages/__init__.py
Normal file
27
portal/templates/pages/account.html
Normal file
27
portal/templates/pages/account.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% extends base_template %}
|
||||
|
||||
{% set title="My Account" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-12">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="index">Home</a></li>
|
||||
<li class="active">My Account</li>
|
||||
</ul>
|
||||
<!-- <h3>My Account</h3> -->
|
||||
<ul class="nav nav-stacked pull-left">
|
||||
<li><a href="profile"><i class="icon-user icon-fixed-width"></i>
|
||||
Change my name, password</a></li>
|
||||
<li><a href="addresses"><i class="icon-map-marker icon-fixed-width"></i>
|
||||
My Addresses</a></li>
|
||||
<li><a href="orders"><i class="icon-list icon-fixed-width"></i> My Orders</a></li>
|
||||
<li><a href="tickets"><i class="icon-tags icon-fixed-width"></i> My Tickets</a></li>
|
||||
<li style="border-top: 1px solid #ddd"></li>
|
||||
<li><a href="invoices"><i class="icon-file-text icon-fixed-width"></i> Invoices</a></li>
|
||||
<li><a href="shipments"><i class="icon-truck icon-fixed-width"></i> Shipments</a></li>
|
||||
<li style="border-top: 1px solid #ddd"></li>
|
||||
<li><a href="server.py?cmd=web_logout"><i class="icon-signout icon-fixed-width"></i>
|
||||
Logout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
57
portal/templates/pages/cart.html
Normal file
57
portal/templates/pages/cart.html
Normal file
@@ -0,0 +1,57 @@
|
||||
{% extends base_template %}
|
||||
|
||||
{% block javascript %}
|
||||
{% include "app/website/templates/js/cart.js" %}
|
||||
{% endblock %}
|
||||
|
||||
{% set title="Shopping Cart" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-12">
|
||||
<h2><i class="icon-shopping-cart"></i> {{ title }}</h2>
|
||||
<div class="progress progress-striped active">
|
||||
<div class="progress-bar progress-bar-info" style="width: 100%;"></div>
|
||||
</div>
|
||||
<div id="cart-container" class="hide">
|
||||
<button class="btn btn-success pull-right btn-place-order" type="button">Place Order</button>
|
||||
<div class="clearfix"></div>
|
||||
<div id="cart-error" class="alert alert-danger" style="display: none;"></div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-sm-9">
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-md-offset-3"><h4>Item Details</h4></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3 text-right"><h4>Qty, Amount</h4></div>
|
||||
</div><hr>
|
||||
<div id="cart-items">
|
||||
</div>
|
||||
<div id="cart-taxes">
|
||||
</div>
|
||||
<div id="cart-totals">
|
||||
</div>
|
||||
<hr>
|
||||
<div id="cart-addresses">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h4>Shipping Address</h4>
|
||||
<div id="cart-shipping-address" class="panel-group"
|
||||
data-fieldname="shipping_address_name"></div>
|
||||
<button class="btn btn-default" type="button" id="cart-add-shipping-address">
|
||||
<span class="icon icon-plus"></span> New Shipping Address</button>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h4>Billing Address</h4>
|
||||
<div id="cart-billing-address" class="panel-group"
|
||||
data-fieldname="customer_address"></div>
|
||||
<button class="btn btn-default" type="button" id="cart-add-billing-address">
|
||||
<span class="icon icon-plus"></span> New Billing Address</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<button class="btn btn-success pull-right btn-place-order" type="button">Place Order</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
1
portal/templates/pages/invoice.html
Normal file
1
portal/templates/pages/invoice.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "app/portal/templates/sale.html" %}
|
||||
14
portal/templates/pages/invoice.py
Normal file
14
portal/templates/pages/invoice.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
def get_context():
|
||||
from portal.website_transactions import get_transaction_context
|
||||
context = get_transaction_context("Sales Invoice", webnotes.form_dict.name)
|
||||
context.update({
|
||||
"parent_link": "invoices",
|
||||
"parent_title": "Invoices"
|
||||
})
|
||||
return context
|
||||
1
portal/templates/pages/invoices.html
Normal file
1
portal/templates/pages/invoices.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "app/portal/templates/sales_transactions.html" %}
|
||||
22
portal/templates/pages/invoices.py
Normal file
22
portal/templates/pages/invoices.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
def get_context():
|
||||
from portal.website_transactions import get_currency_context
|
||||
context = get_currency_context()
|
||||
context.update({
|
||||
"title": "Invoices",
|
||||
"method": "portal.templates.pages.invoices.get_invoices",
|
||||
"icon": "icon-file-text",
|
||||
"empty_list_message": "No Invoices Found",
|
||||
"page": "invoice"
|
||||
})
|
||||
return context
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_invoices(start=0):
|
||||
from portal.website_transactions import get_transaction_list
|
||||
return get_transaction_list("Sales Invoice", start)
|
||||
1
portal/templates/pages/order.html
Normal file
1
portal/templates/pages/order.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "app/portal/templates/sale.html" %}
|
||||
14
portal/templates/pages/order.py
Normal file
14
portal/templates/pages/order.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
def get_context():
|
||||
from portal.website_transactions import get_transaction_context
|
||||
context = get_transaction_context("Sales Order", webnotes.form_dict.name)
|
||||
context.update({
|
||||
"parent_link": "orders",
|
||||
"parent_title": "My Orders"
|
||||
})
|
||||
return context
|
||||
1
portal/templates/pages/orders.html
Normal file
1
portal/templates/pages/orders.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "app/portal/templates/sales_transactions.html" %}
|
||||
23
portal/templates/pages/orders.py
Normal file
23
portal/templates/pages/orders.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
def get_context():
|
||||
from portal.website_transactions import get_currency_context
|
||||
context = get_currency_context()
|
||||
context.update({
|
||||
"title": "My Orders",
|
||||
"method": "portal.templates.pages.orders.get_orders",
|
||||
"icon": "icon-list",
|
||||
"empty_list_message": "No Orders Yet",
|
||||
"page": "order",
|
||||
})
|
||||
return context
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_orders(start=0):
|
||||
from portal.website_transactions import get_transaction_list
|
||||
return get_transaction_list("Sales Order", start)
|
||||
|
||||
61
portal/templates/pages/profile.html
Normal file
61
portal/templates/pages/profile.html
Normal file
@@ -0,0 +1,61 @@
|
||||
{% extends base_template %}
|
||||
|
||||
{% set title="My Profile" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-12">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="index">Home</a></li>
|
||||
<li><a href="account">My Account</a></li>
|
||||
<li class="active"><i class="icon-user icon-fixed-width"></i> My Profile</li>
|
||||
</ul>
|
||||
<div class="alert" id="message" style="display: none;"></div>
|
||||
<form>
|
||||
<fieldset>
|
||||
<label>Full Name</label>
|
||||
<input class="form-control" type="text" id="fullname" placeholder="Your Name">
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label>Password</label>
|
||||
<input class="form-control" type="password" id="password" placeholder="Password">
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label>Company Name</label>
|
||||
<input class="form-control" type="text" id="company_name" placeholder="Company Name" value="{{ company_name }}">
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label>Mobile No</label>
|
||||
<input class="form-control" type="text" id="mobile_no" placeholder="Mobile No" value="{{ mobile_no }}">
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label>Phone</label>
|
||||
<input class="form-control" type="text" id="phone" placeholder="Phone" value="{{ phone }}">
|
||||
</fieldset>
|
||||
<button id="update_profile" type="submit" class="btn btn-default">Update</button>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#fullname").val(getCookie("full_name") || "");
|
||||
$("#update_profile").click(function() {
|
||||
wn.call({
|
||||
method: "startup.webutils.update_profile",
|
||||
type: "POST",
|
||||
args: {
|
||||
fullname: $("#fullname").val(),
|
||||
password: $("#password").val(),
|
||||
company_name: $("#company_name").val(),
|
||||
mobile_no: $("#mobile_no").val(),
|
||||
phone: $("#phone").val()
|
||||
},
|
||||
btn: this,
|
||||
msg: $("#message"),
|
||||
callback: function(r) {
|
||||
if(!r.exc) $("#user-full-name").html($("#fullname").val());
|
||||
}
|
||||
});
|
||||
return false;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
1
portal/templates/pages/shipment.html
Normal file
1
portal/templates/pages/shipment.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "app/portal/templates/sale.html" %}
|
||||
14
portal/templates/pages/shipment.py
Normal file
14
portal/templates/pages/shipment.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
def get_context():
|
||||
from portal.website_transactions import get_transaction_context
|
||||
context = get_transaction_context("Delivery Note", webnotes.form_dict.name)
|
||||
context.update({
|
||||
"parent_link": "shipments",
|
||||
"parent_title": "Shipments"
|
||||
})
|
||||
return context
|
||||
1
portal/templates/pages/shipments.html
Normal file
1
portal/templates/pages/shipments.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "app/portal/templates/sales_transactions.html" %}
|
||||
22
portal/templates/pages/shipments.py
Normal file
22
portal/templates/pages/shipments.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
def get_context():
|
||||
from portal.website_transactions import get_currency_context
|
||||
context = get_currency_context()
|
||||
context.update({
|
||||
"title": "Shipments",
|
||||
"method": "portal.templates.pages.shipments.get_shipments",
|
||||
"icon": "icon-truck",
|
||||
"empty_list_message": "No Shipments Found",
|
||||
"page": "shipment"
|
||||
})
|
||||
return context
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_shipments(start=0):
|
||||
from portal.website_transactions import get_transaction_list
|
||||
return get_transaction_list("Delivery Note", start)
|
||||
Reference in New Issue
Block a user