diff --git a/frappe/website/doctype/about_us_settings/about_us_settings.js b/frappe/website/doctype/about_us_settings/about_us_settings.js
index 409536ba17..15662a25a2 100644
--- a/frappe/website/doctype/about_us_settings/about_us_settings.js
+++ b/frappe/website/doctype/about_us_settings/about_us_settings.js
@@ -2,7 +2,9 @@
// For license information, please see license.txt
frappe.ui.form.on('About Us Settings', {
- refresh: function(frm) {
-
+ refresh: function (frm) {
+ frm.set_intro(
+ __(`Link for About Us Page is "/about".`),
+ );
}
});
diff --git a/frappe/website/doctype/about_us_settings/about_us_settings.json b/frappe/website/doctype/about_us_settings/about_us_settings.json
index d8d66aaa35..1e75f9d472 100644
--- a/frappe/website/doctype/about_us_settings/about_us_settings.json
+++ b/frappe/website/doctype/about_us_settings/about_us_settings.json
@@ -1,309 +1,104 @@
{
- "allow_copy": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "beta": 0,
- "creation": "2013-03-19 12:02:15",
- "custom": 0,
- "description": "Settings for the About Us Page",
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Other",
- "editable_grid": 0,
+ "actions": [],
+ "creation": "2013-03-19 12:02:15",
+ "description": "Settings for the About Us Page",
+ "doctype": "DocType",
+ "document_type": "Other",
+ "engine": "InnoDB",
+ "field_order": [
+ "page_title",
+ "company_introduction",
+ "sb0",
+ "company_history_heading",
+ "company_history",
+ "sb1",
+ "team_members_heading",
+ "team_members_subtitle",
+ "team_members",
+ "footer"
+ ],
"fields": [
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "help",
- "fieldtype": "HTML",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Help",
- "length": 0,
- "no_copy": 0,
- "options": "
Link for About Us Page is \"/about\"
",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "description": "Introduce your company to the website visitor.",
+ "fieldname": "company_introduction",
+ "fieldtype": "Text Editor",
+ "in_list_view": 1,
+ "label": "Company Introduction"
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "Introduce your company to the website visitor.",
- "fieldname": "company_introduction",
- "fieldtype": "Text Editor",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Company Introduction",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "sb0",
+ "fieldtype": "Section Break",
+ "label": "Org History"
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "sb0",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Org History",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "description": "\"Company History\"",
+ "fieldname": "company_history_heading",
+ "fieldtype": "Data",
+ "in_list_view": 1,
+ "label": "Org History Heading"
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "\"Company History\"",
- "fieldname": "company_history_heading",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Org History Heading",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "company_history",
+ "fieldtype": "Table",
+ "label": "Org History",
+ "options": "Company History"
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "company_history",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Org History",
- "length": 0,
- "no_copy": 0,
- "options": "Company History",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "sb1",
+ "fieldtype": "Section Break",
+ "label": "Team Members"
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "sb1",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Team Members",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "description": "\"Team Members\" or \"Management\"",
+ "fieldname": "team_members_heading",
+ "fieldtype": "Data",
+ "label": "Team Members Heading"
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "\"Team Members\" or \"Management\"",
- "fieldname": "team_members_heading",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Team Members Heading",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "team_members",
+ "fieldtype": "Table",
+ "label": "Team Members",
+ "options": "About Us Team Member"
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "team_members",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Team Members",
- "length": 0,
- "no_copy": 0,
- "options": "About Us Team Member",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "description": "More content for the bottom of the page.",
+ "fieldname": "footer",
+ "fieldtype": "Text Editor",
+ "label": "Footer"
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "More content for the bottom of the page.",
- "fieldname": "footer",
- "fieldtype": "Text Editor",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Footer",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
+ "fieldname": "page_title",
+ "fieldtype": "Data",
+ "label": "Page Title"
+ },
+ {
+ "fieldname": "team_members_subtitle",
+ "fieldtype": "Small Text",
+ "label": "Team Members Subtitle"
}
- ],
- "hide_heading": 0,
- "hide_toolbar": 0,
- "icon": "fa fa-group",
- "idx": 1,
- "image_view": 0,
- "in_create": 0,
-
- "is_submittable": 0,
- "issingle": 1,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2016-12-29 14:40:41.692119",
- "modified_by": "Administrator",
- "module": "Website",
- "name": "About Us Settings",
- "owner": "Administrator",
+ ],
+ "icon": "fa fa-group",
+ "idx": 1,
+ "index_web_pages_for_search": 1,
+ "issingle": 1,
+ "links": [],
+ "modified": "2020-10-12 13:26:20.277859",
+ "modified_by": "Administrator",
+ "module": "Website",
+ "name": "About Us Settings",
+ "owner": "Administrator",
"permissions": [
{
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
- "delete": 0,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "is_custom": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 0,
- "role": "Website Manager",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
+ "create": 1,
+ "email": 1,
+ "print": 1,
+ "read": 1,
+ "role": "Website Manager",
+ "share": 1,
"write": 1
}
- ],
- "quick_entry": 0,
- "read_only": 0,
- "read_only_onload": 0,
- "track_changes": 1,
- "track_seen": 0
+ ],
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_changes": 1
}
\ No newline at end of file
diff --git a/frappe/website/doctype/about_us_settings/test_about_us_settings.py b/frappe/website/doctype/about_us_settings/test_about_us_settings.py
new file mode 100644
index 0000000000..85173a20e5
--- /dev/null
+++ b/frappe/website/doctype/about_us_settings/test_about_us_settings.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2020, Frappe Technologies and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+# import frappe
+import unittest
+
+class TestAboutUsSettings(unittest.TestCase):
+ pass
diff --git a/frappe/www/about.html b/frappe/www/about.html
index ff1cd0c339..78e52da0ea 100644
--- a/frappe/www/about.html
+++ b/frappe/www/about.html
@@ -1,52 +1,62 @@
{% extends "templates/web.html" %}
-{% set title = "About Us" %}
-{% block header %}About Us
{% endblock %}
-{% block page_sidebar %}
-{% include "templates/includes/web_sidebar.html" %}
-{% endblock %}
+{% set default_intro = """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
""" %}
+
+{% set title = doc.page_title or _("About Us") %}
{% block page_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
- list of key team members in Website > About Us Settings
""" }}
+ {{ web_block(
+ 'Hero',
+ values={
+ "title": doc.page_title or _("About Us"),
+ "subtitle": doc.company_introduction or default_intro
+ },
+ add_container=0,
+ add_top_padding=1,
+ add_bottom_padding=1,
+ ) }}
+
{% if doc.get({"doctype":"Company History"}) %}
-
-
{{ doc.company_history_heading or "Company History" }}
- {% for d in doc.get({"doctype":"Company History"}) %}
-
-
{{ d.year }}
-
{{ d.highlight }}
-
- {% endfor %}
-
+
+ {{ doc.company_history_heading or _("Company History") }}
+ {% for d in doc.get({"doctype":"Company History"}) %}
+
+
+ {{ d.year }}
+
+
+ {{ d.highlight }}
+
+
+ {% endfor %}
+
{% endif %}
{% if doc.get({"doctype":"About Us Team Member"}) %}
-
-
{{ doc.team_members_heading or "Team Members" }}
- {% for d in doc.get({"doctype":"About Us Team Member"}) %}
-
-
-
-

+
+ {{ doc.team_members_heading or _("Team Members") }}
+ {{ doc.team_members_subtitle }}
+
+ {% for d in doc.get({"doctype":"About Us Team Member"}) %}
+
+

+
{{ d.full_name }}
+
{{ d.bio }}
-
-
{{ d.full_name }}
- {{ d.bio }}
-
-
- {% endfor %}
-
+ {% endfor %}
+
+
{% endif %}
-
+
+ {{ doc.footer or "" }}
+
-{% endblock %}
+{% endblock %}
\ No newline at end of file
diff --git a/frappe/www/about.py b/frappe/www/about.py
index 0c922a6536..e7a7be23e8 100644
--- a/frappe/www/about.py
+++ b/frappe/www/about.py
@@ -9,8 +9,4 @@ sitemap = 1
def get_context(context):
context.doc = frappe.get_doc("About Us Settings", "About Us Settings")
- context.parents = [
- { "name": frappe._("Home"), "route": "/" }
- ]
-
return context