Merge pull request #526 from anandpdoshi/hotfix

Fixed /about page and ability to show section break border without a label
This commit is contained in:
Pratik Vyas 2014-05-13 17:32:57 +05:30
commit 866f2266d3
3 changed files with 27 additions and 19 deletions

View file

@ -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) {
$('<div class="col-md-12 small text-muted">' + df.description + '</div>')
.css("padding-left", "40px")

View file

@ -2,27 +2,27 @@
{% block content %}
<div class="about-content">
{{ doc.company_introduction or """<p>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 """<p>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</p>""" }}
{% if obj.get({"doctype":"Company History"}) %}
{% if doc.get({"doctype":"Company History"}) %}
<h3>{{ doc.company_history_heading or "Company History" }}</h3>
{% for d in obj.get({"doctype":"Company History"}) %}
{% for d in doc.get({"doctype":"Company History"}) %}
<div class="row">
<span class="col-md-2"><h4 style="margin:0px;">{{ d.year }}</h4></span>
<span class="col-md-10"><p>{{ d.highlight }}</p></span>
</div>
{% endfor %}
{% endif %}
{% if obj.get({"doctype":"About Us Team Member"}) %}
{% if doc.get({"doctype":"About Us Team Member"}) %}
<h3>{{ doc.team_members_heading or "Team Members" }}</h3>
{% for d in obj.get({"doctype":"About Us Team Member"}) %}
{% for d in doc.get({"doctype":"About Us Team Member"}) %}
<div class="row" itemscope itemtype="http://schema.org/Person">
<span class="col-md-2">
<div class="avatar avatar-large">

View file

@ -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") }