Merge pull request #5249 from nabinhait/fixed_asset

Fixed asset
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 1901abe..f95b67a 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -47,7 +47,7 @@
 ###Good practices: 
 
 * You should rebase your branch with the branch you plan to make a Pull Request to as often as you can. 
-* Your commit messages should be Pull Requestecise and explain exactly what the commit does. Same goes for the Pull Request title.
+* Your commit messages should be precise and explain exactly what the commit does. Same goes for the Pull Request title.
 * When making a PR make sure that all your code is committed properly by checking the diffs.
 * If you're working on different things at the same time, make sure you make separate branches for each.
 * Don't create new DocTypes unless absolutely necessary. If you find that there is a another DocType with a similar functionality, then please try and extend that functionality.
@@ -58,4 +58,4 @@
 ###Glossary
 
 * remote - A remote is a connection to a Github repo. You should have two remotes, one that points to your repo and one to ours. 
-* rebase - When you rebase a branch, you pull commits from your remote branch and move your commits on top of it. This allows you to update your branch with the latest changes without losing  your changes.
\ No newline at end of file
+* rebase - When you rebase a branch, you pull commits from your remote branch and move your commits on top of it. This allows you to update your branch with the latest changes without losing  your changes.
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index a72b3ba..c241288 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -668,6 +668,8 @@
 	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/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js
index 5088f2e..db8ab02 100644
--- a/erpnext/buying/doctype/supplier/supplier.js
+++ b/erpnext/buying/doctype/supplier/supplier.js
@@ -7,6 +7,8 @@
 		frappe.setup_language_field(frm);
 	},
 	refresh: function(frm) {
+		frm.dashboard.show_heatmap = true;
+		frm.dashboard.heatmap_message = __('This is based on transactions against this Supplier. See timeline below for details');
 		frm.dashboard.show_dashboard();
 
 		if(frappe.defaults.get_default("supp_master_name")!="Naming Series") {
diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py
index a3cb5d4..68bf768 100644
--- a/erpnext/config/desktop.py
+++ b/erpnext/config/desktop.py
@@ -28,14 +28,6 @@
 			"link": "List/Supplier"
 		},
 		{
-			"module_name": "Income Statement",
-			"_doctype": "Account",
-			"color": "#3498db",
-			"icon": "octicon octicon-repo",
-			"type": "link",
-			"link": "query-report/Profit and Loss Statement"
-		},
-		{
 			"_doctype": "Employee",
 			"module_name": "Employee",
 			"color": "#2ecc71",
@@ -67,6 +59,14 @@
 			"type": "link",
 			"link": "List/Lead"
 		},
+		{
+			"module_name": "Profit and Loss Statment",
+			"_doctype": "Account",
+			"color": "#3498db",
+			"icon": "octicon octicon-repo",
+			"type": "link",
+			"link": "query-report/Profit and Loss Statement"
+		},
 
 		# old
 		{
diff --git a/erpnext/config/docs.py b/erpnext/config/docs.py
index 82cb1fb..07d14b6 100644
--- a/erpnext/config/docs.py
+++ b/erpnext/config/docs.py
@@ -19,6 +19,7 @@
 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/employee/employee.js b/erpnext/hr/doctype/employee/employee.js
index cb26154..a7198e3 100755
--- a/erpnext/hr/doctype/employee/employee.js
+++ b/erpnext/hr/doctype/employee/employee.js
@@ -25,6 +25,8 @@
 	refresh: function() {
 		var me = this;
 		erpnext.toggle_naming_series();
+		this.frm.dashboard.show_heatmap = true;
+		this.frm.dashboard.heatmap_message = __('This is based on the attendance of this Employee');
 		this.frm.dashboard.show_dashboard();
 	},
 
diff --git a/erpnext/hr/doctype/job_opening/job_opening.py b/erpnext/hr/doctype/job_opening/job_opening.py
index 7c42a76..90993c7 100644
--- a/erpnext/hr/doctype/job_opening/job_opening.py
+++ b/erpnext/hr/doctype/job_opening/job_opening.py
@@ -7,6 +7,8 @@
 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 @@
 		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 @@
 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/manufacturing/doctype/production_order/production_order_list.js b/erpnext/manufacturing/doctype/production_order/production_order_list.js
index f08158c..cce56cf 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order_list.js
+++ b/erpnext/manufacturing/doctype/production_order/production_order_list.js
@@ -9,6 +9,7 @@
 			return [__(doc.status), {
 				"Draft": "red",
 				"Stopped": "red",
+				"Not Started": "red",
 				"In Process": "orange",
 				"Completed": "green",
 				"Cancelled": "darkgrey"
diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js
index e4ac864..6f0da36 100644
--- a/erpnext/projects/doctype/project/project.js
+++ b/erpnext/projects/doctype/project/project.js
@@ -3,6 +3,8 @@
 
 frappe.ui.form.on("Project", {
 	onload: function(frm) {
+		frm.hide_first = true;
+
 		var so = frappe.meta.get_docfield("Project", "sales_order");
 		so.get_route_options_for_new_doc = function(field) {
 			if(frm.is_new()) return;
@@ -40,26 +42,23 @@
 					frappe.route_options = {"project": frm.doc.name,
 						"start": frm.doc.expected_start_date, "end": frm.doc.expected_end_date};
 					frappe.set_route("Gantt", "Task");
-				}, __("View"), true);
-				frm.add_custom_button(__("Tasks"), function() {
-					frappe.route_options = {"project": frm.doc.name}
-					frappe.set_route("List", "Task");
-				}, __("View"), true);
+				});
 			}
 
-			if(frappe.model.can_read("Time Log")) {
-				frm.add_custom_button(__("Time Logs"), function() {
-					frappe.route_options = {"project": frm.doc.name}
-					frappe.set_route("List", "Time Log");
-				}, __("View"), true);
-			}
+			frm.dashboard.show_dashboard();
+			frm.dashboard.add_section(frappe.render_template('project_dashboard', {project: frm.doc}));
 
-			if(frappe.model.can_read("Expense Claim")) {
-				frm.add_custom_button(__("Expense Claims"), function() {
-					frappe.route_options = {"project": frm.doc.name}
-					frappe.set_route("List", "Expense Claim");
-				}, __("View"), true);
-			}
+			// var bars = [];
+			// bars.push({
+			// 	'title': __('Percent Complete'),
+			// 	'width': (frm.doc.percent_complete || 1)  + '%',
+			// 	'progress_class': 'progress-bar-success'
+			// })
+			//
+			// var message = __("{0}% complete", [frm.doc.percent_complete]);
+			//
+			// frm.dashboard.add_progress(__('Status'), bars, message);
+
 		}
 
 	}
diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py
index a74cbee..2cca7e2 100644
--- a/erpnext/projects/doctype/project/project.py
+++ b/erpnext/projects/doctype/project/project.py
@@ -26,6 +26,8 @@
 					"task_id": task.name
 				})
 
+		self.set_onload('links', self.meta.get_links_setup())
+
 	def __setup__(self):
 		self.onload()
 
@@ -144,6 +146,16 @@
 				user.welcome_email_sent=1
 
 
+@frappe.whitelist()
+def get_dashboard_data(name):
+	'''load dashboard related data'''
+	frappe.has_permission(doc=frappe.get_doc('Project', name), throw=True)
+
+	from frappe.desk.notifications import get_open_count
+	return {
+		'count': get_open_count('Project', name),
+	}
+
 def get_project_list(doctype, txt, filters, limit_start, limit_page_length=20):
 	return frappe.db.sql('''select distinct project.*
 		from tabProject project, `tabProject User` project_user
@@ -160,11 +172,14 @@
 
 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/projects/doctype/project/project_dashboard.html b/erpnext/projects/doctype/project/project_dashboard.html
new file mode 100644
index 0000000..efd6861
--- /dev/null
+++ b/erpnext/projects/doctype/project/project_dashboard.html
@@ -0,0 +1,10 @@
+<h5 style="margin-top: 0px;">Tasks</h5>
+{% if(project.tasks.length) { %}
+	{% project.tasks.forEach(function(d) { %}
+	<p><span class="indicator {{
+		{"Open": "red", "Closed": "green", "Cancelled": "darkgrey"}[d.status] || "orange" }}"><a style="font-weight: normal"
+		href="#Form/Task/{{ d.task_id }}">{{ d.title }}</a></span></p>
+	{% }); %}
+{% } else { %}
+	<p class="text-muted small">No Tasks Defined</p>
+{% } %}
\ No newline at end of file
diff --git a/erpnext/projects/doctype/project/project_links.py b/erpnext/projects/doctype/project/project_links.py
new file mode 100644
index 0000000..6c16378
--- /dev/null
+++ b/erpnext/projects/doctype/project/project_links.py
@@ -0,0 +1,23 @@
+from frappe import _
+
+links = {
+	'fieldname': 'project',
+	'transactions': [
+		{
+			'label': _('Project'),
+			'items': ['Task', 'Time Log', 'Expense Claim', 'Issue']
+		},
+		{
+			'label': _('Material'),
+			'items': ['Material Request', 'BOM', 'Stock Entry']
+		},
+		{
+			'label': _('Sales'),
+			'items': ['Sales Order', 'Delivery Note', 'Sales Invoice']
+		},
+		{
+			'label': _('Purchase'),
+			'items': ['Purchase Order', 'Purchase Receipt', 'Purchase Invoice']
+		},
+	]
+}
diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js
index a0bbe26..605ed8d 100644
--- a/erpnext/projects/doctype/task/task.js
+++ b/erpnext/projects/doctype/task/task.js
@@ -34,12 +34,12 @@
 					frm.add_custom_button(__("Close"), function() {
 						frm.set_value("status", "Closed");
 						frm.save();
-					}, __("Status"));
+					});
 				} else {
 					frm.add_custom_button(__("Reopen"), function() {
 						frm.set_value("status", "Open");
 						frm.save();
-					}, __("Status"));
+					});
 				}
 			}
 		}
diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py
index 15c98f4..392f140 100644
--- a/erpnext/projects/doctype/task/task.py
+++ b/erpnext/projects/doctype/task/task.py
@@ -101,6 +101,11 @@
 					task.exp_end_date = add_days(task.exp_start_date, task_duration)
 					task.flags.ignore_recursion_check = True
 					task.save()
+					
+	def has_webform_permission(doc):
+		project_user = frappe.db.get_value("Project User", {"parent": doc.project, "user":frappe.session.user} , "user")
+		if project_user:
+			return True				
 
 @frappe.whitelist()
 def get_events(start, end, filters=None):
@@ -134,7 +139,7 @@
 			order by name
 			limit %(start)s, %(page_len)s """ % {'key': searchfield,
 			'txt': "%%%s%%" % frappe.db.escape(txt), 'mcond':get_match_cond(doctype),
-			'start': start, 'page_len': page_len})
+			'start': start, 'page_len': page_len})			
 
 
 @frappe.whitelist()
@@ -150,3 +155,6 @@
 		where exp_end_date is not null
 		and exp_end_date < CURDATE()
 		and `status` not in ('Closed', 'Cancelled')""")
+		
+
+		
diff --git a/erpnext/projects/doctype/time_log/time_log.py b/erpnext/projects/doctype/time_log/time_log.py
index 1d523d9..e2641eb 100644
--- a/erpnext/projects/doctype/time_log/time_log.py
+++ b/erpnext/projects/doctype/time_log/time_log.py
@@ -247,6 +247,11 @@
 
 		elif self.project:
 			frappe.get_doc("Project", self.project).update_project()
+			
+	def has_webform_permission(doc):
+		project_user = frappe.db.get_value("Project User", {"parent": doc.project, "user":frappe.session.user} , "user")
+		if project_user:
+			return True		
 
 
 @frappe.whitelist()
diff --git a/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.py b/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.py
index 74436a3..028fd77 100644
--- a/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.py
+++ b/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.py
@@ -18,6 +18,7 @@
 		_("Task Subject") + "::180", _("Project") + ":Link/Project:120", _("Status") + "::70"]
 
 	user_map = get_user_map()
+	employee_map = get_employee_map()
 	task_map = get_task_map()
 
 	conditions = build_conditions(filters)
@@ -30,12 +31,16 @@
 	data = []
 	total_hours = total_employee_hours = count = 0
 	for tl in time_logs:
+		if tl.employee:
+			employee=employee_map[tl.employee]
+		else:
+			employee=user_map[tl.owner]	
 		if tl.owner not in users:
 			users.append(tl.owner)
 			data.append(["", "", "", "Total", total_employee_hours, "", "", "", "", ""])
 			total_employee_hours = 0
 
-		data.append([tl.name, user_map[tl.owner], tl.from_time, tl.to_time, tl.hours,
+		data.append([tl.name, employee, tl.from_time, tl.to_time, tl.hours,
 				tl.activity_type, tl.task, task_map.get(tl.task), tl.project, tl.status])
 
 		count += 1
@@ -59,6 +64,16 @@
 		user_map.setdefault(p.name, []).append(p.fullname)
 
 	return user_map
+	
+def get_employee_map():
+	employees = frappe.db.sql("""select name,
+		employee_name as fullname
+		from tabEmployee""", as_dict=1)
+	employee_map = {}
+	for p in employees:
+		employee_map.setdefault(p.name, []).append(p.fullname)
+
+	return employee_map	
 
 def get_task_map():
 	tasks = frappe.db.sql("""select name, subject from tabTask""", as_dict=1)
diff --git a/erpnext/public/css/website.css b/erpnext/public/css/website.css
index 77ce04b..a36a5db 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 b667177..a3f7d3f 100644
--- a/erpnext/public/js/shopping_cart.js
+++ b/erpnext/public/js/shopping_cart.js
@@ -44,14 +44,12 @@
 		var cart_count = getCookie("cart_count");
 		
 		if($(".cart-icon").length == 0) {
-			$('<div class="cart-icon" style="float:right;padding-top:10px;">\
-				<a href="/cart" class="text-muted small">\
-					<div class="btn btn-primary cart"> Cart\
-						<span id="cart-count" class="label" style="padding-left:5px;margin-left:5px;\
-								margin-right:-5px;background-color: #2905E2;">\
-						</span>\
-					</div>\
-				</a></div>').appendTo($('.hidden-xs'))
+			$('<div class="cart-icon small" style="float:right;padding:3px;border-radius:10px;\
+    			border: 1px solid #7575ff;">\
+				<a href="/cart" style="color:#7575ff; text-decoration: none">\
+					Cart\
+					<span style="color:#7575ff;" class="badge" id="cart-count">5</span>\
+				</a></div>').appendTo($('.shopping-cart'))
 		}
 		
 		var $cart = $('.cart-icon');
diff --git a/erpnext/public/less/website.less b/erpnext/public/less/website.less
index 96dd096..ffc338a 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/customer/customer.js b/erpnext/selling/doctype/customer/customer.js
index d30924e..5645280 100644
--- a/erpnext/selling/doctype/customer/customer.js
+++ b/erpnext/selling/doctype/customer/customer.js
@@ -7,6 +7,8 @@
 		frappe.setup_language_field(frm);
 	},
 	refresh: function(frm) {
+		frm.dashboard.show_heatmap = true;
+		frm.dashboard.heatmap_message = __('This is based on transactions against this Customer. See timeline below for details');
 		frm.dashboard.show_dashboard();
 
 		if(frappe.defaults.get_default("cust_master_name")!="Naming Series") {
diff --git a/erpnext/selling/doctype/customer/customer_links.py b/erpnext/selling/doctype/customer/customer_links.py
index 3ae139b..32bedde 100644
--- a/erpnext/selling/doctype/customer/customer_links.py
+++ b/erpnext/selling/doctype/customer/customer_links.py
@@ -12,6 +12,10 @@
 			'items': ['Sales Order', 'Delivery Note', 'Sales Invoice']
 		},
 		{
+			'label': _('Support'),
+			'items': ['Issue']
+		},
+		{
 			'label': _('Projects'),
 			'items': ['Project']
 		}
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index 4111eb4..878eb9b 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -310,6 +310,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["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 7669bff..43b88d6 100644
--- a/erpnext/setup/doctype/item_group/item_group.py
+++ b/erpnext/setup/doctype/item_group/item_group.py
@@ -53,11 +53,12 @@
 			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 @@
 		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 @@
 			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 6712ee8..79a4ea6 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -330,6 +330,8 @@
 	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.js b/erpnext/stock/doctype/item/item.js
index 4a4de4c..092bb31 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -76,6 +76,9 @@
 
 		erpnext.item.toggle_attributes(frm);
 
+		frm.dashboard.show_heatmap = frm.doc.is_stock_item;
+		frm.dashboard.heatmap_message = __('This is based on stock movement. See {0} for details',
+			['<a href="#query-report/Stock Ledger">' + __('Stock Ledger') + '</a>']);
 		frm.dashboard.show_dashboard();
 	},
 
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index 82134f8..f013f3a 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -213,6 +213,7 @@
 				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/stock/doctype/item/item_dashboard.html b/erpnext/stock/doctype/item/item_dashboard.html
index cef209a..3ce6b57 100644
--- a/erpnext/stock/doctype/item/item_dashboard.html
+++ b/erpnext/stock/doctype/item/item_dashboard.html
@@ -1,6 +1,6 @@
-<div style="padding-left: 15px; padding-right: 15px;">
-	<h5>Stock Levels</h5>
-	<ul class="list-group">
+<div>
+	<h5 style="margin-top: 0px;">Stock Levels</h5>
+	<ul class="list-group" style="margin: 0px;">
 	{% for(var i=0; i < data.length; i++) { var d = data[i]; %}
 		<li class="list-group-item" style="background-color: inherit;">
 			<div class="row">
diff --git a/erpnext/support/doctype/issue/issue.py b/erpnext/support/doctype/issue/issue.py
index b6ee0b6..fcc1edf 100644
--- a/erpnext/support/doctype/issue/issue.py
+++ b/erpnext/support/doctype/issue/issue.py
@@ -57,7 +57,9 @@
 	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 34d345f..dabbf48 100644
--- a/erpnext/templates/generators/item.html
+++ b/erpnext/templates/generators/item.html
@@ -2,33 +2,25 @@
 
 {% block title %} {{ title }} {% endblock %}
 
-{% block header %}<h2>{{ title }}</h2>{% 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 %}
-<div class="item-content">
+<div class="item-content" style="margin-top:20px;">
 	<div class="product-page-content" itemscope itemtype="http://schema.org/Product">
 		<div class="row">
-			<div class="col-sm-5">
+			<div class="col-sm-6">
 				{% if slideshow %}
 					{% include "templates/includes/slideshow.html" %}
 				{% else %}
 					{{ product_image(website_image, "product-full-image") }}
 				{% endif %}
 			</div>
-			<div class="col-sm-7">
-				<!-- <h3 itemprop="name" style="margin-top: 0px;">{{ item_name }}</h3> -->
-				<div itemprop="description">
-				{{ web_long_description or description or _("No description given") }}
-				</div>
+			<div class="col-sm-6" style="padding-left:20px;">
+				 <h2 itemprop="name" style="margin-top: 0px;">{{ item_name }}</h2>
+				
 				<p class="text-muted">
 					{{ _("Item Code") }}: <span itemprop="productID">{{ variant and variant.name or name }}</span></p>
 				<br>
@@ -77,15 +69,24 @@
 				</div>
 			</div>
 		</div>
-		{% if website_specifications -%}
-		<div class="row item-website-specification" style="margin-top: 20px">
+		<div class="row item-website-description" style="margin-top:30px; margin-bottom:20px">
 			<div class="col-md-12">
-				<h4>{{ _("Specifications") }}</h4>
+		<h4>{{ _("DESCRIPTION") }}</h4>
+		<div itemprop="description" class="item-desc">
+		{{ web_long_description or description or _("No description given") }}
+		</div>
+		</div>
+		</div>
+		
+		{% if website_specifications -%}
+		<div class="row item-website-specification" style="margin-top: 40px">
+			<div class="col-md-12">
+				<h4>{{ _("SPECIFICATIONS") }}</h4>
 
-				<table class="table table-bordered" style="width: 100%">
+				<table class="table borderless" style="width: 100%">
 				{% for d in website_specifications -%}
 					<tr>
-						<td style="width: 30%;">{{ d.label }}</td>
+						<td class="product-label text-muted" style="width: 30%;">{{ d.label }}</td>
 						<td>{{ d.description }}</td>
 					</tr>
 				{%- endfor %}
diff --git a/erpnext/templates/generators/item_group.html b/erpnext/templates/generators/item_group.html
index 7e68bc7..195b3c5 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 %}<h1>{{ _("Products") }}</h1>{% endblock %}
 {% block breadcrumbs %}
-    {% include "templates/includes/breadcrumbs.html" %}
+ <div class="page-breadcrumbs" data-html-block="breadcrumbs">
+ 	<ul class="breadcrumb">
+ 		<li>
+ 			<span class="icon icon-angle-left"></span>
+ 			<a href="/me">My Account</a>
+ 		</li>
+ 	</ul>
+ </div>
 {% endblock %}
 
 {% block page_content %}
@@ -38,16 +45,4 @@
 		{% endif %}
 	</div>
 </div>
-{% endblock %}
-
-{% block style %}
-<style>
-	.product-image.missing-image {
-		border: 1px dashed {{ theme.border_color or "#d1d8dd" }};
-	}
-
-	.product-image.missing-image .octicon {
-		color: {{ theme.border_color or "#d1d8dd" }};
-	}
-</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 bbc5fee..ad7f942 100644
--- a/erpnext/templates/generators/job_opening.html
+++ b/erpnext/templates/generators/job_opening.html
@@ -10,8 +10,9 @@
 
 {% block page_content %}
 
+{%- if description -%}
 <div>{{ description }}</div>
-
+{% endif %}
 <p>
 	<a class='btn btn-primary'
 	href='/job_application?job_title={{ doc.name }}'>
diff --git a/erpnext/templates/includes/footer/footer_extension.html b/erpnext/templates/includes/footer/footer_extension.html
index e24b862..e32e13d 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 %}
-<div class="container">
-	<div class="row">
-		<div class="col-sm-6 col-sm-offset-3 text-center" style="margin-top: 15px;">
+
 				<input class="form-control" type="text" id="footer-subscribe-email"
-                    style="display: inline-block; max-width: 50%; margin-right: 10px;"
+                    style="display: inline-block; max-width: 50%;margin-right:15px;"
 					placeholder="{{ _('Your email address') }}...">
-				<button class="btn btn-default btn-sm" type="button"
-					id="footer-subscribe-button">{{ _("Get Updates") }}</button>
-		</div>
-	</div>
-    <div class="text-center text-muted small" style="padding: 30px;">
-        <a href="https://erpnext.com?source=website_footer" target="_blank" class="text-extra-muted">
-            Powered by ERPNext</a>
-    </div>
-</div>
+				<button class="btn btn-default btn-sm btn-subscribe" type="button"
+					id="footer-subscribe-button" style="float:right; border-radius:8px; border:1px solid #7575ff; 					color:#7575ff; background-color:white;">{{ _("Get Updates") }}</button>
+
 <script>
 frappe.ready(function() {
 	$("#footer-subscribe-button").click(function() {
diff --git a/erpnext/templates/includes/footer/footer_powered.html b/erpnext/templates/includes/footer/footer_powered.html
index c44c342..e9d5f56 100644
--- a/erpnext/templates/includes/footer/footer_powered.html
+++ b/erpnext/templates/includes/footer/footer_powered.html
@@ -1 +1,2 @@
-<!-- blank -->
+<a href="https://erpnext.com?source=website_footer" target="_blank" class="text-muted">
+		Powered by ERPNext</a>
diff --git a/erpnext/templates/includes/projects.css b/erpnext/templates/includes/projects.css
index 8c83e17..e4aa81b 100644
--- a/erpnext/templates/includes/projects.css
+++ b/erpnext/templates/includes/projects.css
@@ -4,12 +4,6 @@
 	text-decoration: underline;
 }
 
-.page-container {
-	font-weight: normal;
-    margin: 50px auto;
-    max-width: 700px;
-}
-
 .project-item:hover {
   background-color: #f7f7f7;
 }
diff --git a/erpnext/templates/includes/projects/project_row.html b/erpnext/templates/includes/projects/project_row.html
index fcd0e22..55b02e2 100644
--- a/erpnext/templates/includes/projects/project_row.html
+++ b/erpnext/templates/includes/projects/project_row.html
@@ -2,11 +2,11 @@
 <div class="web-list-item">
 	<a class="no-decoration" href="/projects?project={{ doc.name }}">
 		<div class="row">
-			<div class="col-xs-4">
+			<div class="col-xs-6">
 
 				{{ doc.name }}
 			</div>
-			<div class="col-xs-4">
+			<div class="col-xs-3">
 				{% if doc.percent_complete %}
 					<div class="progress" style="margin-bottom: 0!important; margin-top: 10px!important; height:5px;">
 					  <div class="progress-bar progress-bar-{{ "warning" if doc.percent_complete|round < 100 else "success"}}" role="progressbar"
@@ -19,7 +19,7 @@
 						{{ doc.status }}</span>
 				{% endif %}
 			</div>
-			<div class="col-xs-4 text-right small text-muted">
+			<div class="col-xs-3 text-right small text-muted">
 				{{ frappe.utils.pretty_date(doc.modified) }}
 			</div>
 		</div>
diff --git a/erpnext/templates/includes/transaction_row.html b/erpnext/templates/includes/transaction_row.html
index 7c03579..a52bb60 100644
--- a/erpnext/templates/includes/transaction_row.html
+++ b/erpnext/templates/includes/transaction_row.html
@@ -1,23 +1,16 @@
 <div class="web-list-item">
 <a href="/{{ pathname }}/{{ doc.name }}">
 <div class="row">
-	<div class="col-sm-8 col-xs-7">
-		<div class="row">
-			<div class="col-sm-9">
-                <div>{{ doc.name }}</div>
+	<div class="col-sm-6">
+
+                <span class="indicator {{ doc.indicator_color or "darkgrey" }}">{{ doc.name }}</span>
                 <div class="small text-muted">{{ doc.items_preview }}</div>
-            </div>
-			<div class="col-sm-3">
-                <span class="indicator {{ doc.indicator_color or "darkgrey" }}">
-                    {{ doc.indicator_title or doc.status or "Submitted" }}
-                </span>
-			</div>
-		</div>
+
 	</div>
-	<div class="col-sm-2 col-xs-5 text-right">
+	<div class="col-sm-3 col-xs-5">
 		{{ doc.get_formatted("grand_total") }}
 	</div>
-	<div class="col-sm-2 small text-muted text-right" title="{{ frappe.utils.format_datetime(doc.creation, "medium") }}">
+	<div class="col-sm-3 small text-muted text-right" title="{{ frappe.utils.format_datetime(doc.creation, "medium") }}">
 		{{ frappe.utils.pretty_date(doc.creation) }}</div>
 </div>
 </a>
diff --git a/erpnext/templates/pages/order.py b/erpnext/templates/pages/order.py
index bf1514a..d390ebf 100644
--- a/erpnext/templates/pages/order.py
+++ b/erpnext/templates/pages/order.py
@@ -8,6 +8,7 @@
 
 def get_context(context):
 	context.no_cache = 1
+	context.show_sidebar = True
 	context.doc = frappe.get_doc(frappe.form_dict.doctype, frappe.form_dict.name)
 	if hasattr(context.doc, "set_indicator"):
 		context.doc.set_indicator()
diff --git a/erpnext/templates/pages/projects.html b/erpnext/templates/pages/projects.html
index 6ecdfb6..1cac25e 100644
--- a/erpnext/templates/pages/projects.html
+++ b/erpnext/templates/pages/projects.html
@@ -3,11 +3,15 @@
 {% block title %}{{ doc.project_name }}{% endblock %}
 
 {%- from "templates/includes/projects/macros.html" import back_link -%}
-
-{% block header_actions %}
-{% include 'templates/includes/projects/project_search_box.html' %}
-{% endblock %}
-
+{% block header %}<h1>{{ doc.project_name }}</h1>{% endblock %}
+{% block header_actions %}{% if doc.percent_complete %}
+		<div class="progress progress-hg">
+		  <div class="progress-bar progress-bar-{{ "warning" if doc.percent_complete|round < 100 else "success" }} active" role="progressbar"
+		  	aria-valuenow="{{ doc.percent_complete|round|int }}"
+		  	aria-valuemin="0" aria-valuemax="100" style="width:{{ doc.percent_complete|round|int }}%;">
+		  </div>
+		</div>
+	{% endif %}{% endblock %}
 {% block breadcrumbs %}
    <div class="page-breadcrumbs" data-html-block="breadcrumbs">
    	<ul class="breadcrumb">
@@ -29,24 +33,6 @@
 
 {% block page_content %}
 
-<div class="row">
-<div class="col-xs-6">
-<h2 class= "title">
-	{{ doc.project_name }}
-</h2>
-</div>
-<div class="col-xs-6">
-	{% if doc.percent_complete %}
-		<div class="progress progress-hg">
-		  <div class="progress-bar progress-bar-{{ "warning" if doc.percent_complete|round < 100 else "success" }} active" role="progressbar"
-		  	aria-valuenow="{{ doc.percent_complete|round|int }}"
-		  	aria-valuemin="0" aria-valuemax="100" style="width:{{ doc.percent_complete|round|int }}%;">
-		  </div>
-		</div>
-	{% endif %}
-</div>
-</div>
-<hr class="small">
 
 <div class="clearfix">
   <h4 style="float: left;">{{ _("Tasks") }}</h4>
diff --git a/erpnext/templates/pages/projects.py b/erpnext/templates/pages/projects.py
index 86f064c..f10b2fb 100644
--- a/erpnext/templates/pages/projects.py
+++ b/erpnext/templates/pages/projects.py
@@ -6,8 +6,13 @@
 import json
 
 def get_context(context):
+	project_user = frappe.db.get_value("Project User", {"parent": frappe.form_dict.project, "user": frappe.session.user} , "user")
+	if not project_user or frappe.session.user == 'Guest': 
+		raise frappe.PermissionError
+		
 	context.no_cache = 1
-
+	context.show_search = True
+	context.show_sidebar = True
 	project = frappe.get_doc('Project', frappe.form_dict.project)
 
 	project.has_permission('read')