From a18a3d1e1760572ab45fd8730d766bd11ffc7682 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 13 May 2014 16:44:59 +0530 Subject: [PATCH 1/2] Fixed /about. Fixes frappe/erpnext#1629 --- frappe/templates/pages/about.html | 24 ++++++++++++------------ frappe/templates/pages/about.py | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/frappe/templates/pages/about.html b/frappe/templates/pages/about.html index a9b2940062..77ba712e17 100644 --- a/frappe/templates/pages/about.html +++ b/frappe/templates/pages/about.html @@ -2,27 +2,27 @@ {% block content %}
- {{ doc.company_introduction or """

Some Introduction about your company that you would - like your website visitor to know. - More people than you think will read your About page. - People always like to know who the are doing business with. - Be authentic and avoid using jargon like 'value added services' etc. - Be sure to update your company history and + {{ doc.company_introduction or """

Some Introduction about your company that you would + like your website visitor to know. + More people than you think will read your About page. + People always like to know who the are doing business with. + Be authentic and avoid using jargon like 'value added services' etc. + Be sure to update your company history and list of key team members in Website > About Us Settings

""" }} - - {% if obj.get({"doctype":"Company History"}) %} + + {% if doc.get({"doctype":"Company History"}) %}

{{ doc.company_history_heading or "Company History" }}

- {% for d in obj.get({"doctype":"Company History"}) %} + {% for d in doc.get({"doctype":"Company History"}) %}

{{ d.year }}

{{ d.highlight }}

{% endfor %} {% endif %} - - {% if obj.get({"doctype":"About Us Team Member"}) %} + + {% if doc.get({"doctype":"About Us Team Member"}) %}

{{ doc.team_members_heading or "Team Members" }}

- {% for d in obj.get({"doctype":"About Us Team Member"}) %} + {% for d in doc.get({"doctype":"About Us Team Member"}) %}
diff --git a/frappe/templates/pages/about.py b/frappe/templates/pages/about.py index 13554fe53b..b693a703c4 100644 --- a/frappe/templates/pages/about.py +++ b/frappe/templates/pages/about.py @@ -1,8 +1,8 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# MIT License. See license.txt from __future__ import unicode_literals import frappe def get_context(context): - return { "obj": frappe.get_doc("About Us Settings", "About Us Settings") } + return { "doc": frappe.get_doc("About Us Settings", "About Us Settings") } From 32407a8e1a1a2b5f17640ff98d9f648c095bc747 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 13 May 2014 16:45:35 +0530 Subject: [PATCH 2/2] Ability to show section border option when creating layout --- frappe/public/js/frappe/form/layout.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/frappe/public/js/frappe/form/layout.js b/frappe/public/js/frappe/form/layout.js index 472fd57ea5..ad3077bca6 100644 --- a/frappe/public/js/frappe/form/layout.js +++ b/frappe/public/js/frappe/form/layout.js @@ -122,12 +122,20 @@ frappe.ui.form.Layout = Class.extend({ if(df && df.idx===1) head.css({"margin-top": "0px"}) - if(this.sections.length > 1) - this.section.css({ - "margin-top": "15px", - "border-top": "1px solid #eee" - }); } + + if(df.label || df.show_section_border) { + if(this.sections.length > 1) { + this.section.css("border-top", "1px solid #eee"); + + if (df.label) { + this.section.css("margin-top", "15px"); + } else { + this.section.css("padding-top", "15px"); + } + } + } + if(df.description) { $('
' + df.description + '
') .css("padding-left", "40px")