diff --git a/config.json b/config.json index 396905c590..d30c6976e0 100644 --- a/config.json +++ b/config.json @@ -132,11 +132,6 @@ "template": "app/website/templates/pages/sales_transactions", "args_method": "website.helpers.transaction.shipment_list_args" }, - "messages": { - "no_cache": true, - "template": "app/website/templates/pages/messages", - "args_method": "website.helpers.transaction.message_list_args" - }, "product_search": { "template": "app/website/templates/pages/product_search" }, diff --git a/website/css/website.css b/website/css/website.css index 47a969c046..4cd7ac7735 100644 --- a/website/css/website.css +++ b/website/css/website.css @@ -198,3 +198,7 @@ fieldset[disabled] .btn-default.active { background-color: #a7a9aa; border-color: #a7a9aa; } + +.label { + padding-top: 0.3em; +} \ No newline at end of file diff --git a/website/helpers/transaction.py b/website/helpers/transaction.py index 900956b6f1..8943575c6c 100644 --- a/website/helpers/transaction.py +++ b/website/helpers/transaction.py @@ -96,27 +96,6 @@ def ticket_list_args(): "empty_list_message": "No Tickets Raised", "page": "ticket" } - -@webnotes.whitelist() -def get_messages(start=0): - search_term = "%%%s%%" % webnotes.session.user - messages = webnotes.conn.sql("""select name, subject, creation, - sender, recipients, content - from `tabCommunication` where sender like %s or recipients like %s - order by creation desc - limit %s, 20""", (search_term, search_term, cint(start)), as_dict=True) - for m in messages: - m.creation = formatdate(m.creation) - - return messages - -def message_list_args(): - return { - "title": "Messages", - "method": "website.helpers.transaction.get_messages", - "icon": "icon-comments", - "empty_list_message": "No Messages Found", - } def get_transaction_args(doctype, name): customer = webnotes.conn.get_value("Contact", {"email_id": webnotes.session.user}, @@ -136,10 +115,25 @@ def get_transaction_args(doctype, name): } def get_order_args(): - return get_transaction_args("Sales Order", webnotes.form_dict.name) + args = get_transaction_args("Sales Order", webnotes.form_dict.name) + args.update({ + "parent_link": "orders", + "parent_title": "My Orders" + }) + return args def get_invoice_args(): - return get_transaction_args("Sales Invoice", webnotes.form_dict.name) + args = get_transaction_args("Sales Invoice", webnotes.form_dict.name) + args.update({ + "parent_link": "invoices", + "parent_title": "Invoices" + }) + return args def get_shipment_args(): - return get_transaction_args("Delivery Note", webnotes.form_dict.name) + args = get_transaction_args("Delivery Note", webnotes.form_dict.name) + args.update({ + "parent_link": "shipments", + "parent_title": "Shipments" + }) + return args diff --git a/website/templates/pages/account.html b/website/templates/pages/account.html index 9d29589ec8..2a5acf67e3 100644 --- a/website/templates/pages/account.html +++ b/website/templates/pages/account.html @@ -19,7 +19,6 @@