From 586674cb0bbc0aea9a584342a2a46f8a69fd2b3f Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 11 Feb 2014 20:26:32 +0530 Subject: [PATCH] Cleanup of Website Group after nested URLs --- webnotes/core/doctype/profile/profile.py | 6 +- webnotes/hooks.txt | 9 +- webnotes/templates/emails/standard.html | 4 +- .../templates/generators/website_group.html | 11 +- .../templates/generators/website_group.py | 226 +++++++++++++----- webnotes/templates/includes/inline_post.html | 2 +- webnotes/templates/includes/post_editor.html | 2 +- .../templates/includes/profile_display.html | 2 +- webnotes/templates/pages/login.py | 10 + .../templates/website_group/edit_post.html | 2 +- webnotes/templates/website_group/events.html | 29 --- webnotes/templates/website_group/events.py | 125 ---------- webnotes/templates/website_group/forum.html | 24 +- webnotes/templates/website_group/forum.py | 137 +++-------- webnotes/templates/website_group/post.html | 3 +- webnotes/templates/website_group/post.py | 121 +++++++++- webnotes/templates/website_group/settings.py | 49 ++-- webnotes/templates/website_group/tasks.html | 32 --- webnotes/templates/website_group/tasks.py | 126 ---------- webnotes/website/doctype/post/post.py | 102 -------- .../website/doctype/user_vote/user_vote.py | 7 +- .../doctype/website_group/website_group.py | 13 +- .../website_settings/website_settings.py | 2 +- .../website_sitemap_permission.txt | 3 +- webnotes/website/js/website.js | 2 +- webnotes/website/js/website_group.js | 68 +++--- .../website/page/website_home/website_home.js | 5 + webnotes/webutils.py | 9 - 28 files changed, 446 insertions(+), 685 deletions(-) create mode 100644 webnotes/templates/pages/login.py delete mode 100644 webnotes/templates/website_group/events.html delete mode 100644 webnotes/templates/website_group/events.py delete mode 100644 webnotes/templates/website_group/tasks.html delete mode 100644 webnotes/templates/website_group/tasks.py diff --git a/webnotes/core/doctype/profile/profile.py b/webnotes/core/doctype/profile/profile.py index 3fac8626fc..5b9479ba8c 100644 --- a/webnotes/core/doctype/profile/profile.py +++ b/webnotes/core/doctype/profile/profile.py @@ -385,12 +385,8 @@ def facebook_login(data): "new_password": webnotes.generate_hash(data["email"]), "fb_username": data["username"], "fb_userid": data["id"], - "fb_location": data.get("location", {}).get("name"), - "fb_hometown": data.get("hometown", {}).get("name"), - "fb_age_range": data.get("age_range") and "{min}-{max}".format(**data.get("age_range")), + "location": data.get("location", {}).get("name"), "birth_date": data.get("birthday"), - "fb_bio": data.get("bio"), - "fb_education": data.get("education") and data.get("education")[-1].get("type"), "user_type": "Website User" }) profile.ignore_permissions = True diff --git a/webnotes/hooks.txt b/webnotes/hooks.txt index 1a57c2e015..e6bfc4d834 100644 --- a/webnotes/hooks.txt +++ b/webnotes/hooks.txt @@ -20,10 +20,6 @@ web_include_css = style_settings.css website_clear_cache = webnotes.templates.generators.website_group.clear_cache -website_group_handler:Forum = webnotes.templates.website_group.forum -website_group_handler:Events = webnotes.templates.website_group.events -website_group_handler:Tasks = webnotes.templates.website_group.tasks - get_desktop_icons = webnotes.manage.get_desktop_icons notification_config = webnotes.core.notifications.get_notification_config @@ -42,3 +38,8 @@ has_permission:Event = webnotes.core.doctype.event.event.has_permission permission_query_conditions:ToDo = webnotes.core.doctype.todo.todo.get_permission_query_conditions has_permission:ToDo = webnotes.core.doctype.todo.todo.has_permission + +# bean + +bean_event:User Vote:after_insert = webnotes.templates.generators.website_group.clear_cache_on_bean_event +bean_event:Website Sitemap Permission:on_update = webnotes.templates.generators.website_group.clear_cache_on_bean_event \ No newline at end of file diff --git a/webnotes/templates/emails/standard.html b/webnotes/templates/emails/standard.html index f3126e4d45..3a3381b454 100644 --- a/webnotes/templates/emails/standard.html +++ b/webnotes/templates/emails/standard.html @@ -38,7 +38,7 @@ body { .btn-primary{ text-decoration:none; - color: #FFF; + color: #FFF !important; background-color: #348eda; border:solid #348eda; border-width:10px 20px; @@ -53,7 +53,7 @@ body { .btn-secondary { text-decoration:none; - color: #FFF; + color: #FFF !important; background-color: #aaa; border:solid #aaa; border-width:10px 20px; diff --git a/webnotes/templates/generators/website_group.html b/webnotes/templates/generators/website_group.html index 0a88766ace..682b0eaeda 100644 --- a/webnotes/templates/generators/website_group.html +++ b/webnotes/templates/generators/website_group.html @@ -12,9 +12,10 @@ {% block content %}