From 0c4ef64b324393d71961bfb71b83f1d6477d9a38 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 4 Mar 2014 11:15:08 +0530 Subject: [PATCH] Fixed booboo: Moved website moduleview to framework --- erpnext/config/setup.py | 21 ++------- erpnext/config/website.py | 93 --------------------------------------- 2 files changed, 4 insertions(+), 110 deletions(-) delete mode 100644 erpnext/config/website.py diff --git a/erpnext/config/setup.py b/erpnext/config/setup.py index faaec0d966..e5393906cf 100644 --- a/erpnext/config/setup.py +++ b/erpnext/config/setup.py @@ -1,5 +1,5 @@ from frappe import _ -from frappe.widgets.moduleview import get_config +from frappe.widgets.moduleview import add_setup_section data = [ { @@ -110,21 +110,8 @@ def get_data(): ("selling", _("Selling"), "icon-tag"), ("buying", _("Buying"), "icon-shopping-cart"), ("hr", _("Human Resources"), "icon-group"), - ("support", _("Support"), "icon-phone"), - ("website", _("Website"), "icon-globe")): + ("support", _("Support"), "icon-phone")): - try: - config = get_config("erpnext", module) - except ImportError: - continue - - for section in config: - if section.get("label")==_("Setup"): - out.append({ - "label": label, - "icon": icon, - "items": section["items"] - }) - break - + add_setup_section(out, "erpnext", module, label, icon) + return out \ No newline at end of file diff --git a/erpnext/config/website.py b/erpnext/config/website.py deleted file mode 100644 index 062747405d..0000000000 --- a/erpnext/config/website.py +++ /dev/null @@ -1,93 +0,0 @@ -from frappe import _ - -data = [ - { - "label": _("Documents"), - "icon": "icon-star", - "items": [ - { - "type": "doctype", - "name": "Web Page", - "description": _("Content web page."), - }, - { - "type": "doctype", - "name": "Blog Post", - "description": _("Single Post (article)."), - }, - { - "type": "doctype", - "name": "Blogger", - "description": _("Profile of a blog writer."), - }, - { - "type": "doctype", - "name": "Website Group", - "description": _("Web Site Forum Page."), - }, - { - "type": "doctype", - "name": "Post", - "description": _("List of Web Site Forum's Posts."), - }, - { - "type": "doctype", - "name": "Website Slideshow", - "description": _("Embed image slideshows in website pages."), - }, - ] - }, - { - "label": _("Setup"), - "icon": "icon-cog", - "items": [ - { - "type": "doctype", - "name": "Website Settings", - "description": _("Setup of top navigation bar, footer and logo."), - }, - { - "type": "page", - "name":"sitemap-browser", - "label": _("Sitemap Browser"), - "description": _("View or manage Website Route tree."), - "icon": "icon-sitemap" - }, - { - "type": "doctype", - "name": "Style Settings", - "description": _("Setup of fonts and background."), - }, - { - "type": "doctype", - "name": "Website Script", - "description": _("Javascript to append to the head section of the page."), - }, - { - "type": "doctype", - "name": "Blog Settings", - "description": _("Write titles and introductions to your blog."), - }, - { - "type": "doctype", - "name": "Blog Category", - "description": _("Categorize blog posts."), - }, - { - "type": "doctype", - "name": "About Us Settings", - "description": _("Settings for About Us Page."), - }, - { - "type": "doctype", - "name": "Contact Us Settings", - "description": _("Settings for Contact Us Page."), - }, - { - "type": "doctype", - "name": "Website Page Permission", - "description": _("Define read, write, admin permissions for a Website Page."), - }, - ] - }, -] \ No newline at end of file