From 9c5e1199de648d41a9948383fa6f63ad3b91564d Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 22 Apr 2016 18:50:49 +0530 Subject: [PATCH] [css] cleanup + moved products and homepage to erpnext + [fix] get_js --- frappe/config/website.py | 5 - frappe/model/utils/__init__.py | 29 +- frappe/public/css/avatar.css | 23 +- frappe/public/css/website.css | 52 ++- frappe/public/less/avatar.less | 28 +- frappe/public/less/variables.less | 1 + frappe/public/less/website.less | 37 +- frappe/templates/includes/list/list.html | 4 +- frappe/templates/includes/search_box.html | 17 +- frappe/templates/includes/web_sidebar.html | 4 +- frappe/templates/pages/list.html | 2 +- frappe/templates/web.html | 17 +- frappe/website/context.py | 2 +- .../featured_product_items/__init__.py | 0 .../featured_product_items.json | 385 ------------------ .../featured_product_items.py | 10 - .../doctype/homepage_settings/__init__.py | 0 .../homepage_settings/homepage_settings.js | 8 - .../homepage_settings/homepage_settings.json | 208 ---------- .../homepage_settings/homepage_settings.py | 10 - .../test_homepage_settings.py | 12 - .../website_settings/website_settings.json | 34 +- 22 files changed, 151 insertions(+), 737 deletions(-) delete mode 100644 frappe/website/doctype/featured_product_items/__init__.py delete mode 100644 frappe/website/doctype/featured_product_items/featured_product_items.json delete mode 100644 frappe/website/doctype/featured_product_items/featured_product_items.py delete mode 100644 frappe/website/doctype/homepage_settings/__init__.py delete mode 100644 frappe/website/doctype/homepage_settings/homepage_settings.js delete mode 100644 frappe/website/doctype/homepage_settings/homepage_settings.json delete mode 100644 frappe/website/doctype/homepage_settings/homepage_settings.py delete mode 100644 frappe/website/doctype/homepage_settings/test_homepage_settings.py diff --git a/frappe/config/website.py b/frappe/config/website.py index d39f707cc5..9c319e0297 100644 --- a/frappe/config/website.py +++ b/frappe/config/website.py @@ -58,11 +58,6 @@ def get_data(): "name": "Website Theme", "description": _("List of themes for Website."), }, - { - "type": "doctype", - "name": "Homepage Settings", - "description": _("Settings for website homepage."), - }, { "type": "doctype", "name": "Website Script", diff --git a/frappe/model/utils/__init__.py b/frappe/model/utils/__init__.py index 5c04c515c1..2b09a2f2e5 100644 --- a/frappe/model/utils/__init__.py +++ b/frappe/model/utils/__init__.py @@ -36,17 +36,24 @@ def render_include(content): '''render {% include "app/path/filename" in js file %}''' content = cstr(content) - if "{% include" in content: - paths = re.findall(r'''{% include\s['"](.*)['"]\s%}''', content) - if not paths: - frappe.throw('Invalid include path') - for path in paths: - app, app_path = path.split('/', 1) - with open(frappe.get_app_path(app, app_path), 'r') as f: - include = unicode(f.read(), 'utf-8') - if path.endswith('.html'): - include = html_to_js_template(path, include) - content = re.sub(r'''{{% include\s['"]{0}['"]\s%}}'''.format(path), include, content) + # try 5 levels of includes + for i in xrange(5): + if "{% include" in content: + paths = re.findall(r'''{% include\s['"](.*)['"]\s%}''', content) + if not paths: + frappe.throw('Invalid include path') + + for path in paths: + app, app_path = path.split('/', 1) + with open(frappe.get_app_path(app, app_path), 'r') as f: + include = unicode(f.read(), 'utf-8') + if path.endswith('.html'): + include = html_to_js_template(path, include) + + content = re.sub(r'''{{% include\s['"]{0}['"]\s%}}'''.format(path), include, content) + + else: + break return content diff --git a/frappe/public/css/avatar.css b/frappe/public/css/avatar.css index 0ced8d015e..725bef2f9a 100644 --- a/frappe/public/css/avatar.css +++ b/frappe/public/css/avatar.css @@ -4,6 +4,16 @@ width: 50px; height: 50px; } +.avatar-frame { + display: inline-block; + width: 100%; + height: 0; + padding: 50% 0px; + background-size: cover; + background-repeat: no-repeat; + background-position: center center; + border-radius: 4px; +} .avatar img { max-width: 100%; max-height: 100%; @@ -21,6 +31,9 @@ .avatar-small .standard-image { font-size: 14px; } +.avatar-small .avatar-frame { + border-radius: 3px; +} .avatar-medium { margin-right: 5px; width: 36px; @@ -54,16 +67,6 @@ height: 0; padding-bottom: 100%; } -.avatar-frame { - display: inline-block; - width: 100%; - height: 0; - padding: 50% 0px; - background-size: cover; - background-repeat: no-repeat; - background-position: center center; - border-radius: 4px; -} .standard-image { width: 100%; height: 0; diff --git a/frappe/public/css/website.css b/frappe/public/css/website.css index f844cd2d1c..6714c6657f 100644 --- a/frappe/public/css/website.css +++ b/frappe/public/css/website.css @@ -226,6 +226,16 @@ a.no-decoration:active { width: 50px; height: 50px; } +.avatar-frame { + display: inline-block; + width: 100%; + height: 0; + padding: 50% 0px; + background-size: cover; + background-repeat: no-repeat; + background-position: center center; + border-radius: 4px; +} .avatar img { max-width: 100%; max-height: 100%; @@ -243,6 +253,9 @@ a.no-decoration:active { .avatar-small .standard-image { font-size: 14px; } +.avatar-small .avatar-frame { + border-radius: 3px; +} .avatar-medium { margin-right: 5px; width: 36px; @@ -276,16 +289,6 @@ a.no-decoration:active { height: 0; padding-bottom: 100%; } -.avatar-frame { - display: inline-block; - width: 100%; - height: 0; - padding: 50% 0px; - background-size: cover; - background-repeat: no-repeat; - background-position: center center; - border-radius: 4px; -} .standard-image { width: 100%; height: 0; @@ -361,6 +364,23 @@ a.no-decoration:active { html, body { font-family: "Open Sans", "Helvetica Neue", Serif; + color: #6c7680; +} +a { + color: #6c7680; +} +a:hover, +a:focus, +a:active { + color: #36414C; +} +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: 300; } .navbar-brand { max-width: none; @@ -467,6 +487,10 @@ body { .panel-body { padding-left: 15px; } +.page-head h1, +.page-head h2 { + margin-top: 0px; +} .page-header-actions-block { text-align: right; } @@ -915,10 +939,16 @@ li .social-child-item { padding-top: 30px; padding-bottom: 20px; } -#item-search { +.item-search { + border-bottom: 1px solid #d1d8dd; +} +.item-search .item-search-input { position: relative; outline: none; border: none; + margin-right: 5px; + padding: 7px; + padding-left: 0px; } .vert-line { overflow: hidden; diff --git a/frappe/public/less/avatar.less b/frappe/public/less/avatar.less index 35f59f3ab1..363fd52767 100644 --- a/frappe/public/less/avatar.less +++ b/frappe/public/less/avatar.less @@ -7,6 +7,17 @@ height: 50px; } +.avatar-frame { + display: inline-block; + width: 100%; + height: 0; + padding: 50% 0px; + background-size: cover; + background-repeat: no-repeat; + background-position: center center; + border-radius: 4px; +} + .avatar img { max-width: 100%; max-height: 100%; @@ -26,6 +37,10 @@ .standard-image { font-size: 14px; } + + .avatar-frame { + border-radius: 3px; + } } .avatar-medium { @@ -68,17 +83,6 @@ padding-bottom: 100%; } -.avatar-frame { - display: inline-block; - width: 100%; - height: 0; - padding: 50% 0px; - background-size: cover; - background-repeat: no-repeat; - background-position: center center; - border-radius: 4px; -} - .standard-image { width: 100%; height: 0; @@ -93,4 +97,4 @@ border: 1px solid @border-color; font-weight: normal; margin-top: -1px; -} \ No newline at end of file +} diff --git a/frappe/public/less/variables.less b/frappe/public/less/variables.less index 8a54d58044..bf5b85282b 100644 --- a/frappe/public/less/variables.less +++ b/frappe/public/less/variables.less @@ -3,6 +3,7 @@ @border-color: #d1d8dd; @light-border-color: #EBEFF2; @text-color: #36414C; +@text-light: #6c7680; @text-muted: #8D99A6; @btn-bg: #F0F4F7; @panel-bg: #F7FAFC; diff --git a/frappe/public/less/website.less b/frappe/public/less/website.less index 82cd756338..4ce0a29b61 100644 --- a/frappe/public/less/website.less +++ b/frappe/public/less/website.less @@ -5,6 +5,21 @@ html, body { font-family: "Open Sans", "Helvetica Neue", Serif; + color: @text-light; +} + +a& { + color: @text-light; + + &:hover, + &:focus, + &:active { + color: @text-color; + } +} + +h1, h2, h3, h4, h5, h6 { + font-weight: 300; } .navbar-brand { @@ -133,6 +148,12 @@ html, body { padding-left: 15px; } +.page-head { + h1, h2 { + margin-top: 0px; + } +} + .page-header-actions-block { text-align: right; } @@ -523,13 +544,21 @@ li .social-child-item { padding-bottom:20px; } -#item-search { - position: relative; - outline:none; - border:none; +.item-search { + border-bottom: 1px solid @border-color; + + .item-search-input { + position: relative; + outline: none; + border: none; + margin-right: 5px; + padding: 7px; + padding-left: 0px; + } } .vert-line {overflow:hidden;} .vert-line>div+div{border-left:1px solid @light-border-color;} .vert-line>div{ padding-bottom:2000px; margin-bottom:-2000px;} + diff --git a/frappe/templates/includes/list/list.html b/frappe/templates/includes/list/list.html index 90116be07c..274d6f649b 100644 --- a/frappe/templates/includes/list/list.html +++ b/frappe/templates/includes/list/list.html @@ -9,7 +9,9 @@ {% include "templates/includes/list/filters.html" %} {%- endif %} --> - {% if introduction %}

{{ introduction }}{% endif %} + {% if introduction %}

{{ introduction }}{% endif %} + + {% if result_heading_template %}{% include result_heading_template %}{% endif %}

{% for item in result %} diff --git a/frappe/templates/includes/search_box.html b/frappe/templates/includes/search_box.html index 5aba566f79..0e65d1522b 100644 --- a/frappe/templates/includes/search_box.html +++ b/frappe/templates/includes/search_box.html @@ -1,12 +1,13 @@
-

-

- -

+

+

+ +

\ No newline at end of file + diff --git a/frappe/templates/includes/web_sidebar.html b/frappe/templates/includes/web_sidebar.html index 2594ef7374..c2f5201208 100644 --- a/frappe/templates/includes/web_sidebar.html +++ b/frappe/templates/includes/web_sidebar.html @@ -5,9 +5,9 @@
-
{{ fullname }}
+
{{ fullname }}
- diff --git a/frappe/templates/pages/list.html b/frappe/templates/pages/list.html index 7c0c06a9c4..2129326558 100644 --- a/frappe/templates/pages/list.html +++ b/frappe/templates/pages/list.html @@ -3,7 +3,7 @@ {% block title %}{{ title or (_("{0} List").format(_(doctype))) }}{% endblock %} {% block header %} - {{ title or (_("{0} List").format(_(doctype))) }} +

{{ title or (_("{0} List").format(_(doctype))) }}

{% endblock %} {% block breadcrumbs %} diff --git a/frappe/templates/web.html b/frappe/templates/web.html index 3a7ee96d18..be2bd8b640 100644 --- a/frappe/templates/web.html +++ b/frappe/templates/web.html @@ -15,24 +15,27 @@
- {% if self.breadcrumbs() %} + {% if not no_breadcrumbs and self.breadcrumbs() %} {% endif %} -

{% block header %}{% endblock %}

+ {% block header %}{% endblock %}
{% if show_search %} -
- {% block search %} - {% include 'templates/includes/search_box.html' %} - {% endblock %} -
+
+ {% block search %} + {% include 'templates/includes/search_box.html' %} + {% endblock %} +
{% endif %} + + {% if self.header_actions() %}
{% block header_actions %}{% endblock %}
+ {% endif %}
diff --git a/frappe/website/context.py b/frappe/website/context.py index d38134ff83..37e3dfd33a 100644 --- a/frappe/website/context.py +++ b/frappe/website/context.py @@ -82,6 +82,7 @@ def build_context(context): def add_sidebar_data(context): from frappe.utils.user import get_fullname_and_avatar + import frappe.templates.pages.list context.my_account_list = frappe.get_all('Portal Menu Item', fields=['title', 'route', 'reference_doctype'], filters={'enabled': 1}, order_by='idx asc') @@ -90,7 +91,6 @@ def add_sidebar_data(context): if item.reference_doctype: item.count = len(frappe.templates.pages.list.get(item.reference_doctype).get('result')) - info = get_fullname_and_avatar(frappe.session.user) context["fullname"] = info.fullname context["user_image"] = info.avatar diff --git a/frappe/website/doctype/featured_product_items/__init__.py b/frappe/website/doctype/featured_product_items/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/frappe/website/doctype/featured_product_items/featured_product_items.json b/frappe/website/doctype/featured_product_items/featured_product_items.json deleted file mode 100644 index 615e19ed20..0000000000 --- a/frappe/website/doctype/featured_product_items/featured_product_items.json +++ /dev/null @@ -1,385 +0,0 @@ -{ - "allow_copy": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "hash", - "creation": "2016-04-22 11:57:22.043823", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "Document", - "fields": [ - { - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "fieldname": "item_code", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 1, - "in_list_view": 1, - "label": "Item Code", - "length": 0, - "no_copy": 0, - "oldfieldname": "item_code", - "oldfieldtype": "Link", - "options": "Item", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": "150px", - "read_only": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 1, - "set_only_once": 0, - "unique": 0, - "width": "150px" - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "col_break1", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "item_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 1, - "label": "Item Name", - "length": 0, - "no_copy": 0, - "oldfieldname": "item_name", - "oldfieldtype": "Data", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "print_width": "150", - "read_only": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0, - "width": "150" - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "fieldname": "section_break_5", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Description", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "description", - "fieldtype": "Text Editor", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 1, - "in_list_view": 1, - "label": "Description", - "length": 0, - "no_copy": 0, - "oldfieldname": "description", - "oldfieldtype": "Small Text", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": "300px", - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0, - "width": "300px" - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "column_break_7", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "image", - "fieldtype": "Attach", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Image", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "image_view", - "fieldtype": "Image", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Image View", - "length": 0, - "no_copy": 0, - "options": "image", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "section_break_simple1", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "depends_on": "eval: doc.type != \"\"", - "fieldname": "rate", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 1, - "label": "Rate", - "length": 0, - "no_copy": 0, - "oldfieldname": "export_rate", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": "100px", - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0, - "width": "100px" - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 1, - "label": "Amount", - "length": 0, - "no_copy": 0, - "oldfieldname": "export_amount", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": "100px", - "read_only": 1, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0, - "width": "100px" - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "col_break3", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "description": "", - "fieldname": "item_group", - "fieldtype": "Link", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 1, - "in_list_view": 0, - "label": "Item Group", - "length": 0, - "no_copy": 0, - "oldfieldname": "item_group", - "oldfieldtype": "Link", - "options": "Item Group", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "report_hide": 0, - "reqd": 0, - "search_index": 1, - "set_only_once": 0, - "unique": 0 - } - ], - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "in_create": 0, - "in_dialog": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2016-04-22 12:25:29.275898", - "modified_by": "Administrator", - "module": "Website", - "name": "Featured Product Items", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_seen": 0 -} \ No newline at end of file diff --git a/frappe/website/doctype/featured_product_items/featured_product_items.py b/frappe/website/doctype/featured_product_items/featured_product_items.py deleted file mode 100644 index b5cdcf0b16..0000000000 --- a/frappe/website/doctype/featured_product_items/featured_product_items.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class FeaturedProductItems(Document): - pass diff --git a/frappe/website/doctype/homepage_settings/__init__.py b/frappe/website/doctype/homepage_settings/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/frappe/website/doctype/homepage_settings/homepage_settings.js b/frappe/website/doctype/homepage_settings/homepage_settings.js deleted file mode 100644 index b4b41e0a65..0000000000 --- a/frappe/website/doctype/homepage_settings/homepage_settings.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Homepage Settings', { - refresh: function(frm) { - - } -}); diff --git a/frappe/website/doctype/homepage_settings/homepage_settings.json b/frappe/website/doctype/homepage_settings/homepage_settings.json deleted file mode 100644 index c944c8a053..0000000000 --- a/frappe/website/doctype/homepage_settings/homepage_settings.json +++ /dev/null @@ -1,208 +0,0 @@ -{ - "allow_copy": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "", - "creation": "2016-04-22 14:29:51.244067", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "Setup", - "fields": [ - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "company", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Company", - "length": 0, - "no_copy": 0, - "options": "Company", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "description": "Company Tagline for website homepage", - "fieldname": "tag_line", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Tag Line", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "description": "Company Description for website homepage", - "fieldname": "description", - "fieldtype": "Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Description", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "products", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Products", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "description": "Products to be shown on website homepage", - "fieldname": "item", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Item", - "length": 0, - "no_copy": 0, - "options": "Featured Product Items", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0, - "width": "40px" - } - ], - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "in_create": 0, - "in_dialog": 0, - "is_submittable": 0, - "issingle": 1, - "istable": 0, - "max_attachments": 0, - "modified": "2016-04-22 14:36:51.439985", - "modified_by": "Administrator", - "module": "Website", - "name": "Homepage Settings", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 0, - "role": "System Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - }, - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 0, - "role": "Administrator", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "company", - "track_seen": 0 -} \ No newline at end of file diff --git a/frappe/website/doctype/homepage_settings/homepage_settings.py b/frappe/website/doctype/homepage_settings/homepage_settings.py deleted file mode 100644 index 4b365c1c03..0000000000 --- a/frappe/website/doctype/homepage_settings/homepage_settings.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class HomepageSettings(Document): - pass diff --git a/frappe/website/doctype/homepage_settings/test_homepage_settings.py b/frappe/website/doctype/homepage_settings/test_homepage_settings.py deleted file mode 100644 index 7b76a85482..0000000000 --- a/frappe/website/doctype/homepage_settings/test_homepage_settings.py +++ /dev/null @@ -1,12 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt -from __future__ import unicode_literals - -import frappe -import unittest - -# test_records = frappe.get_test_records('Homepage Settings') - -class TestHomepageSettings(unittest.TestCase): - pass diff --git a/frappe/website/doctype/website_settings/website_settings.json b/frappe/website/doctype/website_settings/website_settings.json index 085be598f8..3c5f029462 100644 --- a/frappe/website/doctype/website_settings/website_settings.json +++ b/frappe/website/doctype/website_settings/website_settings.json @@ -58,31 +58,6 @@ "set_only_once": 0, "unique": 0 }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "description": "If checked, the Home page will be the default Item Group for the website.", - "fieldname": "home_page_is_products", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 1, - "label": "Home Page is Products", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, { "allow_on_submit": 0, "bold": 0, @@ -984,7 +959,7 @@ "issingle": 1, "istable": 0, "max_attachments": 10, - "modified": "2016-04-12 23:17:55.682407", + "modified": "2016-04-22 09:13:08.875846", "modified_by": "Administrator", "module": "Website", "name": "Website Settings", @@ -1004,8 +979,6 @@ "print": 1, "read": 1, "report": 0, - "restrict": 0, - "restricted": 0, "role": "Website Manager", "set_user_permissions": 0, "share": 1, @@ -1026,15 +999,14 @@ "print": 0, "read": 1, "report": 0, - "restrict": 0, - "restricted": 0, "role": "All", "set_user_permissions": 0, - "share": 1, + "share": 0, "submit": 0, "write": 0 } ], + "quick_entry": 0, "read_only": 0, "read_only_onload": 0, "sort_order": "ASC",