diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 53747bfc82..9a817f13f7 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -677,6 +677,8 @@ 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 + list_context["show_search"] = True return list_context @frappe.whitelist() diff --git a/erpnext/config/docs.py b/erpnext/config/docs.py index 82cb1fbfaa..07d14b650e 100644 --- a/erpnext/config/docs.py +++ b/erpnext/config/docs.py @@ -19,6 +19,7 @@ docs_version = "6.x.x" splash_light_background = True def get_context(context): + context.brand_html = "ERPNext" context.app.splash_light_background = True context.top_bar_items = [ {"label": "User Manual", "url": context.docs_base_url + "/user/manual", "right": 1}, diff --git a/erpnext/hr/doctype/job_opening/job_opening.py b/erpnext/hr/doctype/job_opening/job_opening.py index 7c42a76c54..90993c7776 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,5 @@ class JobOpening(WebsiteGenerator): def get_list_context(context): context.title = _("Jobs") context.introduction = _('Current Job Openings') + context.show_sidebar=True + context.show_search=True diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index c6a996c6f9..2cca7e2dc9 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -172,11 +172,14 @@ def get_project_list(doctype, txt, filters, limit_start, limit_page_length=20): def get_list_context(context=None): return { + "show_sidebar": True, + "show_search": 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/css/website.css b/erpnext/public/css/website.css index 77ce04b11c..a36a5db9d3 100644 --- a/erpnext/public/css/website.css +++ b/erpnext/public/css/website.css @@ -10,9 +10,13 @@ text-align: center; } .product-image-wrapper { - max-width: 300px; - margin: auto; + max-width: 600px; + width: 187px; + margin: 31.5px; border-radius: 4px; + border: 1px solid #EBEFF2; + padding-left: 0px; + padding-right: 0px; } @media (max-width: 767px) { .product-image { @@ -28,8 +32,7 @@ background-size: cover; background-repeat: no-repeat; background-position: center top; - border-radius: 0.5em; - border: 1px solid #EBEFF2; + border-bottom: 1px dashed #EBEFF2; } .product-image.missing-image { width: 100%; @@ -38,10 +41,8 @@ background-size: cover; background-repeat: no-repeat; background-position: center top; - border-radius: 0.5em; - border: 1px solid #EBEFF2; - border: 1px dashed #d1d8dd; position: relative; + border-bottom: 1px dashed #EBEFF2; } .product-image.missing-image .octicon { font-size: 32px; @@ -50,9 +51,24 @@ .product-text { padding: 15px 0px; } +.product-label { + padding-bottom: 4px; + text-transform: uppercase; + font-size: 12px; +} @media (max-width: 767px) { .product-search { width: 100%; margin-bottom: 13px; } } +.borderless td, +.borderless th { + border-bottom: 1px solid #EBEFF2; + padding-left: 0px !important; + line-height: 1.8em !important; +} +.item-desc { + border-top: 2px solid #EBEFF2; + padding-top: 10px; +} diff --git a/erpnext/public/js/shopping_cart.js b/erpnext/public/js/shopping_cart.js index b667177157..a3f7d3f0c6 100644 --- a/erpnext/public/js/shopping_cart.js +++ b/erpnext/public/js/shopping_cart.js @@ -44,14 +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/public/less/website.less b/erpnext/public/less/website.less index 96dd0966ab..ffc338a567 100644 --- a/erpnext/public/less/website.less +++ b/erpnext/public/less/website.less @@ -15,9 +15,13 @@ } .product-image-wrapper { - max-width: 300px; - margin: auto; + max-width: 600px; + width: 187px; + margin: 31.5px; border-radius: 4px; + border: 1px solid @light-border-color; + padding-left: 0px; + padding-right: 0px; } @media (max-width: 767px) { @@ -35,14 +39,13 @@ background-size: cover; background-repeat: no-repeat; background-position: center top; - border-radius: 0.5em; - border: 1px solid @light-border-color; + border-bottom: 1px dashed @light-border-color; } .product-image.missing-image { .product-image-square; - border: 1px dashed @border-color; position: relative; + border-bottom: 1px dashed @light-border-color; } .product-image.missing-image .octicon { @@ -54,9 +57,26 @@ padding: 15px 0px; } +.product-label{ + padding-bottom: 4px; + text-transform: uppercase; + font-size: 12px; +} + @media (max-width: 767px) { .product-search { width: 100%; margin-bottom: 13px; } } + +.borderless td, .borderless th { + border-bottom: 1px solid @light-border-color; + padding-left:0px !important; + line-height: 1.8em !important; +} + +.item-desc { + border-top: 2px solid @light-border-color; + padding-top:10px; +} diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 4111eb4056..878eb9b864 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -310,6 +310,8 @@ 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["show_search"] = True list_context["title"] = _("My Orders") list_context["parents"] = [{"title": _("My Account"), "name": "me"}] return list_context diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py index 7669bff2fd..43b88d65f8 100644 --- a/erpnext/setup/doctype/item_group/item_group.py +++ b/erpnext/setup/doctype/item_group/item_group.py @@ -53,11 +53,12 @@ class ItemGroup(NestedSet, WebsiteGenerator): frappe.throw(frappe._("An item exists with same name ({0}), please change the item group name or rename the item").format(self.name)) def get_context(self, context): + context.show_search=True start = int(frappe.form_dict.start or 0) if start < 0: start = 0 context.update({ - "items": get_product_list_for_group(product_group = self.name, start=start, limit=24), + "items": get_product_list_for_group(product_group = self.name, start=start, limit=24, search=frappe.form_dict.get("q")), "parent_groups": get_parent_item_groups(self.name), "title": self.name }) @@ -68,7 +69,7 @@ class ItemGroup(NestedSet, WebsiteGenerator): return context @frappe.whitelist(allow_guest=True) -def get_product_list_for_group(product_group=None, start=0, limit=10): +def get_product_list_for_group(product_group=None, start=0, limit=10, search=None): child_groups = ", ".join(['"' + i[0] + '"' for i in get_child_groups(product_group)]) # base query @@ -83,10 +84,16 @@ def get_product_list_for_group(product_group=None, start=0, limit=10): and (item_group in ({child_groups}) or name in (select parent from `tabWebsite Item Group` where item_group in ({child_groups}))) """.format(child_groups=child_groups) + # search term condition + if search: + query += """ and (web_long_description like %(search)s + or item_name like %(search)s + or name like %(search)s)""" + search = "%" + cstr(search) + "%" query += """order by weightage desc, modified desc limit %s, %s""" % (start, limit) - data = frappe.db.sql(query, {"product_group": product_group, "today": nowdate()}, as_dict=1) + data = frappe.db.sql(query, {"product_group": product_group,"search": search, "today": nowdate()}, as_dict=1) return [get_item_for_list_in_html(r) for r in data] diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 6712ee85af..79a4ea6146 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -330,6 +330,8 @@ 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 + list_context["show_search"] = True return list_context def get_invoiced_qty_map(delivery_note): diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 649f97be2d..113d862419 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -214,6 +214,7 @@ class Item(WebsiteGenerator): self.thumbnail = file_doc.thumbnail_url def get_context(self, context): + context.show_search=True if self.variant_of: # redirect to template page! template_item = frappe.get_doc("Item", self.variant_of) diff --git a/erpnext/support/doctype/issue/issue.py b/erpnext/support/doctype/issue/issue.py index b6ee0b6ae6..fcc1edf71e 100644 --- a/erpnext/support/doctype/issue/issue.py +++ b/erpnext/support/doctype/issue/issue.py @@ -57,7 +57,9 @@ 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, + "show_search": True } def get_issue_list(doctype, txt, filters, limit_start, limit_page_length=20): diff --git a/erpnext/templates/generators/item.html b/erpnext/templates/generators/item.html index 34d345fd2f..dabbf48082 100644 --- a/erpnext/templates/generators/item.html +++ b/erpnext/templates/generators/item.html @@ -2,33 +2,25 @@ {% block title %} {{ title }} {% endblock %} -{% block header %}

{{ title }}

{% endblock %} - -{% block header_actions %} -{% include 'templates/includes/product_search_box.html' %} -{% endblock %} - {% block breadcrumbs %} {% include "templates/includes/breadcrumbs.html" %} {% endblock %} {% block page_content %} {% from "erpnext/templates/includes/macros.html" import product_image %} -
+
-
+
{% if slideshow %} {% include "templates/includes/slideshow.html" %} {% else %} {{ product_image(website_image, "product-full-image") }} {% endif %}
-
- -
- {{ web_long_description or description or _("No description given") }} -
+
+

{{ item_name }}

+

{{ _("Item Code") }}: {{ variant and variant.name or name }}


@@ -77,15 +69,24 @@
- {% if website_specifications -%} -
+
-

{{ _("Specifications") }}

+

{{ _("DESCRIPTION") }}

+
+ {{ web_long_description or description or _("No description given") }} +
+
+
+ + {% if website_specifications -%} +
+
+

{{ _("SPECIFICATIONS") }}

- +
{% for d in website_specifications -%} - + {%- endfor %} diff --git a/erpnext/templates/generators/item_group.html b/erpnext/templates/generators/item_group.html index 7e68bc7701..195b3c500c 100644 --- a/erpnext/templates/generators/item_group.html +++ b/erpnext/templates/generators/item_group.html @@ -1,11 +1,18 @@ {% extends "templates/web.html" %} -{% block header_actions %} +{#{% block header_actions %} {% include 'templates/includes/product_search_box.html' %} -{% endblock %} - +{% endblock %}#} +{% block header %}

{{ _("Products") }}

{% endblock %} {% block breadcrumbs %} - {% include "templates/includes/breadcrumbs.html" %} + {% endblock %} {% block page_content %} @@ -38,16 +45,4 @@ {% endif %} -{% endblock %} - -{% block style %} - -{% endblock %} +{% endblock %} \ No newline at end of file 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/footer/footer_extension.html b/erpnext/templates/includes/footer/footer_extension.html index e24b862a83..e32e13ddf8 100644 --- a/erpnext/templates/includes/footer/footer_extension.html +++ b/erpnext/templates/includes/footer/footer_extension.html @@ -1,19 +1,11 @@ {% if not hide_footer_signup %} -

+ +
{{ d.label }}{{ d.label }} {{ d.description }}