[MERGE] trunk-website-al

bzr revid: ddm@openerp.com-20131004084000-91q9gwlxfa3eq6b0
This commit is contained in:
ddm
2013-10-04 10:40:00 +02:00
13 changed files with 18 additions and 112 deletions
-1
View File
@@ -14,7 +14,6 @@ OpenERP Website CMS
'data': [
'views/views.xml',
'views/themes.xml',
'views/res_config.xml',
'website_data.xml',
'website_view.xml',
'security/ir.model.access.csv',
-1
View File
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
import ir_fields
import res_config
import view
import website
-10
View File
@@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
from openerp.osv import fields, osv
class website_config_settings(osv.osv_memory):
_name = 'website.config.settings'
_inherit = 'res.config.settings'
_columns = {
}
@@ -205,7 +205,7 @@
bind_snippet_click_editor: function () {
var self = this;
var snipped_event_flag = false;
$("body").on('click', "[data-snippet-id]", function (event) {
$("body").on('click', "[data-oe-model] [data-snippet-id], [data-oe-model][data-snippet-id]", function (event) {
if (snipped_event_flag) {
return;
}
@@ -1143,7 +1143,7 @@
},
});
website.snippet.animationRegistry.vomify = website.snippet.Animation.extend({
website.snippet.animationRegistry.surprise = website.snippet.Animation.extend({
start: function() {
this._super();
var hue=0;
@@ -193,7 +193,7 @@
<div class='oe_snippet_class'>dark</div>
</div>
<div t-name="website.snippets.well" data-snippet-id='well' data-category='content' data-selector-siblings='p, h1, h2, h3, blockquote, div'>
<div t-name="website.snippets.well" data-snippet-id='well' data-category='content' data-selector-siblings='p, h1, h2, h3, blockquote'>
<div class='oe_snippet_thumbnail'>
<span class="oe_snippet_thumbnail_title">Well</span>
</div>
@@ -204,7 +204,7 @@
</div>
</div>
<div t-name="website.snippets.quote" data-snippet-id='quote' data-category='content' data-selector-siblings='p, h1, h2, h3, blockquote, div'>
<div t-name="website.snippets.quote" data-snippet-id='quote' data-category='content' data-selector-siblings='p, h1, h2, h3, blockquote'>
<div class='oe_snippet_thumbnail'>
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_quote.png"/>
<span class="oe_snippet_thumbnail_title">Quote</span>
@@ -218,7 +218,7 @@
</blockquote>
</div>
<div t-name="website.snippets.panel" data-snippet-id='panel' data-category='content' data-selector-siblings='p, h1, h2, h3, blockquote, div'>
<div t-name="website.snippets.panel" data-snippet-id='panel' data-category='content' data-selector-siblings='p, h1, h2, h3, blockquote'>
<div class='oe_snippet_thumbnail'>
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_panel.png"/>
<span class="oe_snippet_thumbnail_title">Panel</span>
@@ -236,7 +236,7 @@
</div>
</div>
<div t-name="website.snippets.surprise" data-snippet-id='vomify' data-category='content' data-selector-children='.oe_structure'>
<div t-name="website.snippets.surprise" data-snippet-id='surprise' data-category='content' data-selector-children='.oe_structure'>
<div class="oe_snippet_body" style="height: 0; position: absolute;"></div>
<div class='oe_snippet_thumbnail'>
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_surprise.png"/>
-30
View File
@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_website_config_settings" model="ir.ui.view">
<field name="name">website settings</field>
<field name="model">website.config.settings</field>
<field name="arch" type="xml">
<form string="Website" version="7.0" class="oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
or
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
</header>
</form>
</field>
</record>
<record id="action_website_config" model="ir.actions.act_window">
<field name="name">Configure Website</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">website.config.settings</field>
<field name="view_mode">form</field>
<field name="target">inline</field>
</record>
<menuitem id="menu_website_config" name="Website" parent="base.menu_config"
sequence="15" action="action_website_config"/>
</data>
</openerp>
+6 -7
View File
@@ -366,7 +366,8 @@
<template id="publish_management">
<t t-if="editable" t-ignore="true">
<div t-attf-class="dropdown js_publish_management pull-right #{object.id and object.website_published and 'css_publish' or 'css_unpublish'}" t-att-data-id="object.id" t-att-data-object="object._name">
<div class="pull-right btn-group">
<div t-attf-class="btn-group dropdown js_publish_management #{object.id and object.website_published and 'css_publish' or 'css_unpublish'}" t-att-data-id="object.id" t-att-data-object="object._name">
<a t-attf-class="btn btn-xs btn-#{object.id and object.website_published and 'success' or 'default'}" t-att-id="'dopprod-%s' % object.id" role="button" data-toggle="dropdown">Options <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu" t-att-aria-labelledby="'dopprod-%s' % object.id">
<t t-raw="0"/>
@@ -374,14 +375,12 @@
<a href="#" class="js_publish_btn css_unpublish">Unpublish</a>
<a href="#" class="js_publish_btn css_publish">Publish</a>
</li>
<t t-if="publish_edit">
<li class="divider"/>
<li>
<a t-att-href="'/admin/#model=%s&amp;id=%s' % (object._name, object.id)">Edit</a>
</li>
</t>
</ul>
</div>
<t t-if="publish_edit">
<a class="btn btn-xs btn-default" title="Edit in backend" t-att-href="'/admin/#model=%s&amp;id=%s' % (object._name, object.id)"><span t-attf-class="glyphicon glyphicon-wrench"></span></a>
</t>
</div>
</t>
</template>
-1
View File
@@ -21,5 +21,4 @@
import controllers
import website_blog
import res_config
import wizard
-1
View File
@@ -35,7 +35,6 @@ OpenERP Blog
'website_blog_data.xml',
'views/website_blog_classic.xml',
'views/website_blog_templates.xml',
'views/res_config.xml',
# 'wizard/document_page_create_menu_view.xml',
'wizard/document_page_show_diff_view.xml',
'security/ir.model.access.csv',
-32
View File
@@ -1,32 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp.osv import fields, osv
class website_config_settings(osv.osv_memory):
_inherit = 'website.config.settings'
_columns = {
'group_website_mail_reply': fields.boolean(
'Visitors can reply on blogs',
implied_group='website_blog.group_website_mail_reply'
),
}
@@ -2,11 +2,6 @@
<openerp>
<data>
<record model="res.groups" id="group_website_mail_reply">
<field name="name">Visitors can reply on blogs</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record model="ir.rule" id="website_blog_post_public">
<field name="name">Blog Post: public: published only</field>
<field name="model_id" ref="model_blog_post"/>
-18
View File
@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_website_mail_config_settings" model="ir.ui.view">
<field name="name">website_mail settings</field>
<field name="model">website.config.settings</field>
<field name="inherit_id" ref="website.view_website_config_settings"/>
<field name="arch" type="xml">
<form position="inside">
<separator string="Blog"/>
<group>
<field name="group_website_mail_reply"/>
</group>
</form>
</field>
</record>
</data>
</openerp>
@@ -99,6 +99,11 @@
</div>
</li>
</ul>
</template>
<!-- Options: Blog Post: user can reply -->
<template id="view_blog_post_author" inherit_option_id="website_blog.view_blog_post" name="Hide Authors">
<xpath expr="//ul[last()]" position="after">
<section groups="group_website_blog_reply" class="mb32">
<h4>Leave a Comment</h4>
<form id="comment" t-attf-action="/blog/#{blog_post.category_id.id}/#{blog_post.id}/post#post"
@@ -110,6 +115,7 @@
</div>
</form>
</section>
</xpath>
</template>
<!-- Options: Blog Post: hide author -->