Portal breadcrumbs (#10095)

This commit is contained in:
Britlog 2017-07-28 15:24:22 +02:00 committed by Makarand Bauskar
parent 11a3d51774
commit 4c7709efbd
4 changed files with 13 additions and 10 deletions

View File

@ -62,49 +62,49 @@ website_route_rules = [
{"from_route": "/orders/<path:name>", "to_route": "order",
"defaults": {
"doctype": "Sales Order",
"parents": [{"title": _("Orders"), "name": "orders"}]
"parents": [{"label": _("Orders"), "route": "orders"}]
}
},
{"from_route": "/invoices", "to_route": "Sales Invoice"},
{"from_route": "/invoices/<path:name>", "to_route": "order",
"defaults": {
"doctype": "Sales Invoice",
"parents": [{"title": _("Invoices"), "name": "invoices"}]
"parents": [{"label": _("Invoices"), "route": "invoices"}]
}
},
{"from_route": "/supplier-quotations", "to_route": "Supplier Quotation"},
{"from_route": "/supplier-quotations/<path:name>", "to_route": "order",
"defaults": {
"doctype": "Supplier Quotation",
"parents": [{"title": _("Supplier Quotation"), "name": "quotations"}]
"parents": [{"label": _("Supplier Quotation"), "route": "quotations"}]
}
},
{"from_route": "/quotations", "to_route": "Quotation"},
{"from_route": "/quotations/<path:name>", "to_route": "order",
"defaults": {
"doctype": "Quotation",
"parents": [{"title": _("Quotations"), "name": "quotation"}]
"parents": [{"label": _("Quotations"), "route": "quotation"}]
}
},
{"from_route": "/shipments", "to_route": "Delivery Note"},
{"from_route": "/shipments/<path:name>", "to_route": "order",
"defaults": {
"doctype": "Delivery Note",
"parents": [{"title": _("Shipments"), "name": "shipments"}]
"parents": [{"label": _("Shipments"), "route": "shipments"}]
}
},
{"from_route": "/rfq", "to_route": "Request for Quotation"},
{"from_route": "/rfq/<path:name>", "to_route": "rfq",
"defaults": {
"doctype": "Request for Quotation",
"parents": [{"title": _("Request for Quotation"), "name": "rfq"}]
"parents": [{"label": _("Request for Quotation"), "route": "rfq"}]
}
},
{"from_route": "/addresses", "to_route": "Address"},
{"from_route": "/addresses/<path:name>", "to_route": "addresses",
"defaults": {
"doctype": "Address",
"parents": [{"title": _("Addresses"), "name": "addresses"}]
"parents": [{"label": _("Addresses"), "route": "addresses"}]
}
},
{"from_route": "/jobs", "to_route": "Job Opening"},

View File

@ -7,16 +7,18 @@
"allow_multiple": 1,
"allow_print": 0,
"amount": 0.0,
"breadcrumbs": "[{\"title\":\"Issues\", \"name\":\"issues\"}]",
"amount_based_on_field": 0,
"breadcrumbs": "[{\"label\":_(\"Issues\"), \"route\":\"issues\"}]",
"creation": "2016-06-24 15:50:33.186483",
"doc_type": "Issue",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"introduction_text": "",
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2016-12-07 04:26:13.917693",
"modified": "2017-07-25 22:49:10.762704",
"modified_by": "Administrator",
"module": "Support",
"name": "issues",

View File

@ -80,7 +80,7 @@
<div class="page-header-actions-block" data-html-block="header-actions">
<p>
<a href="/api/method/erpnext.accounts.doctype.payment_request.payment_request.make_payment_request?dn={{ doc.name }}&dt={{ doc.doctype }}&submit_doc=1"
class="btn btn-primary btn-sm">Pay {{ doc.get_formatted("grand_total") }} </a>
class="btn btn-primary btn-sm">{{ _("Pay") }} {{ doc.get_formatted("grand_total") }} </a>
</p>
</div>
{% endif %}

View File

@ -18,6 +18,7 @@ def get_context(context):
context.attachments = get_attachments(frappe.form_dict.doctype, frappe.form_dict.name)
context.parents = frappe.form_dict.parents
context.title = frappe.form_dict.name
context.payment_ref = frappe.db.get_value("Payment Request",
{"reference_name": frappe.form_dict.name}, "name")