From 704f24895231273bb26dda769635a4ec4d767230 Mon Sep 17 00:00:00 2001 From: Kanchan Chauhan Date: Fri, 15 Apr 2016 14:52:23 +0530 Subject: [PATCH] Changes 2 --- .../doctype/sales_invoice/sales_invoice.py | 1 + erpnext/hr/doctype/job_opening/job_opening.py | 6 ++++++ erpnext/projects/doctype/project/project.py | 2 ++ erpnext/public/js/shopping_cart.js | 13 ++++++------- .../doctype/sales_order/sales_order.py | 1 + .../doctype/delivery_note/delivery_note.py | 1 + erpnext/support/doctype/issue/issue.py | 3 ++- erpnext/templates/generators/job_opening.html | 3 ++- .../templates/includes/transaction_row.html | 19 ++++++------------- 9 files changed, 27 insertions(+), 22 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 53747bfc82..025a6b72ce 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -677,6 +677,7 @@ def get_list_context(context=None): from erpnext.controllers.website_list_for_contact import get_list_context list_context = get_list_context(context) list_context["title"] = _("My Invoices") + list_context["show_sidebar"] = True return list_context @frappe.whitelist() diff --git a/erpnext/hr/doctype/job_opening/job_opening.py b/erpnext/hr/doctype/job_opening/job_opening.py index 7c42a76c54..6b7131e192 100644 --- a/erpnext/hr/doctype/job_opening/job_opening.py +++ b/erpnext/hr/doctype/job_opening/job_opening.py @@ -7,6 +7,8 @@ from __future__ import unicode_literals import frappe from frappe.website.website_generator import WebsiteGenerator +from frappe.utils import quoted +from frappe.utils.user import get_fullname_and_avatar from frappe import _ class JobOpening(WebsiteGenerator): @@ -15,6 +17,9 @@ class JobOpening(WebsiteGenerator): condition_field = "publish", page_title_field = "job_title", ) + + def get_route(self): + return 'jobs/' + quoted(self.page_name) def get_context(self, context): context.parents = [{'name': 'jobs', 'title': _('All Jobs') }] @@ -22,3 +27,4 @@ class JobOpening(WebsiteGenerator): def get_list_context(context): context.title = _("Jobs") context.introduction = _('Current Job Openings') + context.show_sidebar=True diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index a74cbee17e..dd12f5b67c 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -160,11 +160,13 @@ def get_project_list(doctype, txt, filters, limit_start, limit_page_length=20): def get_list_context(context=None): return { + "show_sidebar": True, "title": _("My Projects"), "get_list": get_project_list, "row_template": "templates/includes/projects/project_row.html" } + @frappe.whitelist() def get_cost_center_name(project): return frappe.db.get_value("Project", project, "cost_center") diff --git a/erpnext/public/js/shopping_cart.js b/erpnext/public/js/shopping_cart.js index f57af3b84e..666e104fe6 100644 --- a/erpnext/public/js/shopping_cart.js +++ b/erpnext/public/js/shopping_cart.js @@ -44,13 +44,12 @@ $.extend(shopping_cart, { var cart_count = getCookie("cart_count"); if($(".cart-icon").length == 0) { - $('
\ - \ - Cart\ -
\ - ').appendTo($('.hidden-xs')) + $('
\ + \ + Cart\ + 5\ +
').appendTo($('.shopping-cart')) } var $cart = $('.cart-icon'); diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 4111eb4056..60bac8de33 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -310,6 +310,7 @@ class SalesOrder(SellingController): def get_list_context(context=None): from erpnext.controllers.website_list_for_contact import get_list_context list_context = get_list_context(context) + list_context["show_sidebar"] = True list_context["title"] = _("My Orders") list_context["parents"] = [{"title": _("My Account"), "name": "me"}] return list_context diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 6712ee85af..ddfa3e4068 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -330,6 +330,7 @@ def get_list_context(context=None): from erpnext.controllers.website_list_for_contact import get_list_context list_context = get_list_context(context) list_context["title"] = _("My Shipments") + list_context["show_sidebar"] = True return list_context def get_invoiced_qty_map(delivery_note): diff --git a/erpnext/support/doctype/issue/issue.py b/erpnext/support/doctype/issue/issue.py index b6ee0b6ae6..af1759d1f5 100644 --- a/erpnext/support/doctype/issue/issue.py +++ b/erpnext/support/doctype/issue/issue.py @@ -57,7 +57,8 @@ def get_list_context(context=None): return { "title": _("My Issues"), "get_list": get_issue_list, - "row_template": "templates/includes/issue_row.html" + "row_template": "templates/includes/issue_row.html", + "show_sidebar": True } def get_issue_list(doctype, txt, filters, limit_start, limit_page_length=20): diff --git a/erpnext/templates/generators/job_opening.html b/erpnext/templates/generators/job_opening.html index bbc5fee642..ad7f942fe2 100644 --- a/erpnext/templates/generators/job_opening.html +++ b/erpnext/templates/generators/job_opening.html @@ -10,8 +10,9 @@ {% block page_content %} +{%- if description -%}
{{ description }}
- +{% endif %}

diff --git a/erpnext/templates/includes/transaction_row.html b/erpnext/templates/includes/transaction_row.html index 7c03579748..a52bb60306 100644 --- a/erpnext/templates/includes/transaction_row.html +++ b/erpnext/templates/includes/transaction_row.html @@ -1,23 +1,16 @@