diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index 1a75a6e023b..1ea85cc96d4 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -400,7 +400,7 @@ product.public.category.form product.public.category -
+
@@ -426,7 +426,7 @@ - Public Categories + Pos/Public Product Categories ir.actions.act_window product.public.category form @@ -445,7 +445,7 @@

- + @@ -802,7 +802,7 @@ - + diff --git a/addons/website/static/src/css/editor.css b/addons/website/static/src/css/editor.css index 79fcdb68ce0..d786830c8f5 100644 --- a/addons/website/static/src/css/editor.css +++ b/addons/website/static/src/css/editor.css @@ -81,6 +81,10 @@ outline: none !important; } +.css_editable_display { + display: block !important; +} + .css_non_editable_mode_hidden { display: none; } @@ -103,6 +107,14 @@ top: 2px; } +.oe_structure.oe_empty:empty, [data-oe-type=html]:empty, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child { + background-image: url("/website/static/src/img/edit_here.png") !important; +} + +.oe_structure.oe_empty:empty:before, [data-oe-type=html]:empty:before, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child:before, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child:before { + content: "Press The Top-Left Edit Button" !important; +} + /* ---- EDITOR BAR ---- {{{ */ table.editorbar-panel { cursor: pointer; @@ -433,8 +445,9 @@ ul.oe_menu_editor .disclose { /* ---- SNIPPET MANIPULATOR ---- {{{ */ .resize_editor_busy { - background-color: rgba(0,0,0,0.1); + background-color: rgba(0, 0, 0, 0.3); } + .oe_overlay { display: none; position: absolute; diff --git a/addons/website/static/src/css/editor.sass b/addons/website/static/src/css/editor.sass index 78af810448f..66665252379 100644 --- a/addons/website/static/src/css/editor.sass +++ b/addons/website/static/src/css/editor.sass @@ -67,6 +67,9 @@ .oe_editable:focus outline: none !important +.css_editable_display + display: block !important + .css_non_editable_mode_hidden display: none @@ -85,6 +88,12 @@ position: relative !important top: +2px +.oe_structure.oe_empty:empty, [data-oe-type=html]:empty, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child + background-image: url('/website/static/src/img/edit_here.png') !important + +.oe_structure.oe_empty:empty:before, [data-oe-type=html]:empty:before, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child:before, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child:before + content: 'Press The Top-Left Edit Button' !important + // }}} /* ---- EDITOR BAR ---- {{{ */ diff --git a/addons/website/static/src/css/website.css b/addons/website/static/src/css/website.css index ca59f4c5697..a047753ebfc 100644 --- a/addons/website/static/src/css/website.css +++ b/addons/website/static/src/css/website.css @@ -1,3 +1,4 @@ +@charset "utf-8"; /* THIS CSS FILE IS FOR WEBSITE THEMING CUSTOMIZATION ONLY * * css for editor buttons, openerp widget included in the website and other @@ -233,7 +234,7 @@ footer { } .oe_structure.oe_empty:empty, [data-oe-type=html]:empty, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child { - background-image: url("/website/static/src/img/edit_here.png"); + background-image: url("/website/static/src/img/under_construction.png"); background-repeat: no-repeat; background-position: center; height: 220px !important; @@ -244,7 +245,7 @@ footer { } .oe_structure.oe_empty:empty:before, [data-oe-type=html]:empty:before, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child:before, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child:before { - content: "Press The Top-Left Edit Button"; + content: "This page is under construction"; text-align: center; display: block; padding-top: 160px; @@ -257,6 +258,10 @@ footer { content: "Drag Building Blocks Here"; } +.css_editable_display { + display: none; +} + /* ---- HACK FOR COVERING UP CK EDITOR BOGUS P INSERTION --- */ .navbar .nav > li > p { margin-bottom: 0px; @@ -334,10 +339,15 @@ ul.nav-stacked > li > a { } /* ---- SNIPPETS --- */ -[data-snippet-id],.colmd,.hr,.blockquote { - overflow: hidden; +[data-snippet-id], .colmd, .hr, .blockquote { + overflow: hidden; } +@media (max-width: 400px) { + [data-snippet-id] { + height: auto !important; + } +} .carousel-inner { height: 100%; } @@ -345,6 +355,7 @@ ul.nav-stacked > li > a { height: 100%; background-size: 100%; } + .carousel .carousel-caption { left: auto; right: auto; diff --git a/addons/website/static/src/css/website.sass b/addons/website/static/src/css/website.sass index ab13d795465..c509bebce55 100644 --- a/addons/website/static/src/css/website.sass +++ b/addons/website/static/src/css/website.sass @@ -154,7 +154,7 @@ footer background-image: url('/website/static/src/img/drag_here.png') .oe_structure.oe_empty:empty, [data-oe-type=html]:empty, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child - background-image: url('/website/static/src/img/edit_here.png') + background-image: url('/website/static/src/img/under_construction.png') background-repeat: no-repeat background-position: center height: 220px !important @@ -163,7 +163,7 @@ footer position: static .oe_structure.oe_empty:empty:before, [data-oe-type=html]:empty:before, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child:before, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child:before - content: 'Press The Top-Left Edit Button' + content: 'This page is under construction' text-align: center display: block padding-top: 160px @@ -174,6 +174,9 @@ footer .oe_structure.oe_editable.oe_empty:empty:before, .oe_editable[data-oe-type=html]:empty:before, .oe_structure.oe_editable.oe_empty > .oe_drop_zone.oe_insert:only-child:before, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child:before content: 'Drag Building Blocks Here' +.css_editable_display + display: none + /* ---- HACK FOR COVERING UP CK EDITOR BOGUS P INSERTION --- */ .navbar .nav > li > p @@ -245,6 +248,10 @@ ul.nav-stacked > li > a [data-snippet-id],.colmd,.hr,.blockquote overflow: hidden +@media (max-width: 400px) + [data-snippet-id] + height: auto !important + .carousel-inner height: 100% .item diff --git a/addons/website/static/src/img/under_construction.png b/addons/website/static/src/img/under_construction.png new file mode 100644 index 00000000000..2d5ee85de9b Binary files /dev/null and b/addons/website/static/src/img/under_construction.png differ diff --git a/addons/website_blog/controllers/main.py b/addons/website_blog/controllers/main.py index 00835d133ab..fc48266cc5e 100644 --- a/addons/website_blog/controllers/main.py +++ b/addons/website_blog/controllers/main.py @@ -23,6 +23,7 @@ from openerp.addons.web import http from openerp.addons.web.http import request from openerp.addons.website.models import website from openerp.tools.translate import _ +from openerp import SUPERUSER_ID import werkzeug @@ -218,16 +219,23 @@ class WebsiteBlog(http.Controller): } return request.website.render("website_blog.blog_post_complete", values) - @website.route(['/blogpost//comment'], type='http', auth="public") - def blog_post_comment(self, blog_post_id, **post): + @website.route(['/blogpost/comment'], type='http', auth="public", methods=['POST']) + def blog_post_comment(self, blog_post_id=0, **post): cr, uid, context = request.cr, request.uid, request.context if post.get('comment'): - request.registry['blog.post'].message_post( - cr, uid, blog_post_id, - body=post.get('comment'), - type='comment', - subtype='mt_comment', - context=dict(context, mail_create_nosubcribe=True)) + user = request.registry['res.users'].browse(cr, SUPERUSER_ID, uid, context=context) + group_ids = user.groups_id + group_id = request.registry["ir.model.data"].get_object_reference(cr, uid, 'website_mail', 'group_comment')[1] + if group_id in [group.id for group in group_ids]: + blog_post = request.registry['blog.post'] + blog_post.check_access_rights(cr, uid, 'read') + blog_post.message_post( + cr, SUPERUSER_ID, int(blog_post_id), + body=post.get('comment'), + type='comment', + subtype='mt_comment', + author_id=user.partner_id.id, + context=dict(context, mail_create_nosubcribe=True)) return werkzeug.utils.redirect(request.httprequest.referrer + "#comments") @website.route('/blogpost/new', type='http', auth="public", multilang=True) diff --git a/addons/website_blog/views/website_blog_templates.xml b/addons/website_blog/views/website_blog_templates.xml index 4fe512381a4..a3afdcbfd83 100644 --- a/addons/website_blog/views/website_blog_templates.xml +++ b/addons/website_blog/views/website_blog_templates.xml @@ -218,10 +218,10 @@