[IMP] Website Blogs
bzr revid: fp@openerp.com-20130929084853-whow6sq3ns007fqx
This commit is contained in:
parent
d239c43f3a
commit
1a869abd0d
|
@ -19,4 +19,7 @@ OpenERP Website CMS
|
|||
'website_view.xml',
|
||||
'security/ir.model.access.csv',
|
||||
],
|
||||
'demo': [
|
||||
'website_demo.xml',
|
||||
]
|
||||
}
|
||||
|
|
|
@ -828,7 +828,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</templates>
|
||||
|
|
|
@ -122,9 +122,12 @@
|
|||
<li><i class="icon-envelope"></i> <span t-field="res_company.email"></span></li>
|
||||
</ul>
|
||||
<h2>
|
||||
<a href="http://twitter.com/openerp"><i class="icon-twitter-sign"></i></a>
|
||||
<a href="http://facebook.com/OpenERP"><i class="icon-facebook-sign"></i></a>
|
||||
<a href="https://plus.google.com/+openerp/posts"><i class="icon-google-plus-sign"></i></a>
|
||||
<a t-att-href="website.social_facebook" t-if="website.social_facebook"><i class="icon-facebook-sign"/></a>
|
||||
<a t-att-href="website.social_twitter" t-if="website.social_twitter"><i class="icon-twitter-sign"/></a>
|
||||
<a t-att-href="website.social_linkedin" t-if="website.social_linkedin"><i class="icon-linkedin-sign"/></a>
|
||||
<a t-att-href="website.social_youtube" t-if="website.social_youtube"><i class="icon-youtube-sign"/></a>
|
||||
<a t-att-href="website.social_googleplus" t-if="website.social_googleplus"><i class="icon-google-plus-sign"/></a>
|
||||
<a t-att-href="website.social_github" t-if="website.social_github"><i class="icon-github-sign"/></a>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="col-md-5 col-lg-offset-1" name="about_us">
|
||||
|
|
|
@ -79,6 +79,12 @@ class website(osv.osv):
|
|||
'company_id': fields.many2one('res.company', string="Company"),
|
||||
'language_ids': fields.many2many('res.lang', 'website_lang_rel', 'website_id', 'lang_id', 'Languages'),
|
||||
'default_lang_id': fields.many2one('res.lang', string="Default language"),
|
||||
'social_twitter': fields.char('Twitter Account'),
|
||||
'social_facebook': fields.char('Facebook Account'),
|
||||
'social_github': fields.char('GitHub Account'),
|
||||
'social_linkedin': fields.char('LinkedIn Account'),
|
||||
'social_youtube': fields.char('Youtube Account'),
|
||||
'social_googleplus': fields.char('Google+ Account'),
|
||||
}
|
||||
|
||||
public_user = None
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record id="default_website" model="website">
|
||||
<field name="name">www.dundermufflin.com</field>
|
||||
<field name="name">www.openerp.com</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="language_ids" eval="[(6, 0, [ ref('base.lang_en')])]"/>
|
||||
<field name="default_lang_id" ref="base.lang_en"/>
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="default_website" model="website">
|
||||
<field name="social_twitter">https://twitter.com/openerp</field>
|
||||
<field name="social_facebook">https://www.facebook.com/OpenERP</field>
|
||||
<field name="social_googleplus">https://plus.google.com/+openerp</field>
|
||||
<field name="social_linkedin">http://www.linkedin.com/company/openerp</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -43,18 +43,23 @@
|
|||
<field name="name" class="oe_inline"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group col="4">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="default_lang_id" widget="selection"/>
|
||||
</group>
|
||||
<group string="Website languages">
|
||||
<field name="language_ids" nolabel="1" mode="tree,form">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="translatable"/>
|
||||
</tree>
|
||||
</field>
|
||||
<group>
|
||||
<group string="Social Icons">
|
||||
<p class="oe_grey" colspan="2">
|
||||
Keep these fields empty to not show the related social icon.
|
||||
</p>
|
||||
<field name="social_twitter" placeholder="https://twitter.com/openerp"/>
|
||||
<field name="social_facebook" placeholder="https://facebook.com/openerp"/>
|
||||
<field name="social_googleplus" placeholder="https://plus.google.com/+openerp"/>
|
||||
<field name="social_linkedin" placeholder="http://www.linkedin.com/company/openerp"/>
|
||||
<field name="social_youtube" placeholder="http://www.youtube.com/channel/HCU842OHPPNrQ"/>
|
||||
<field name="social_github" placeholder="https://youraccount.github.io"/>
|
||||
</group>
|
||||
<group string="Others Info">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="default_lang_id" widget="selection"/>
|
||||
<field name="language_ids" widget="many2many_tags"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
|
|
@ -21,3 +21,13 @@ p.post-meta {
|
|||
position: relative;
|
||||
top: -5px;
|
||||
}
|
||||
|
||||
.js_website_blog div#right_column section {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.js_website_blog div#right_column section:hover {
|
||||
opacity: 1;
|
||||
-moz-transition: all 0.2s ease-out;
|
||||
-webkit-transition: all 0.2s ease-out;
|
||||
transition: all 0.2s ease-out;
|
||||
}
|
||||
|
|
|
@ -19,3 +19,13 @@ p.post-meta
|
|||
position: relative
|
||||
top: -5px
|
||||
|
||||
.js_website_blog
|
||||
div#right_column
|
||||
section
|
||||
opacity: 0.6
|
||||
section:hover
|
||||
opacity: 1
|
||||
-moz-transition: all 0.2s ease-out
|
||||
-webkit-transition: all 0.2s ease-out
|
||||
transition: all 0.2s ease-out
|
||||
|
||||
|
|
|
@ -101,24 +101,23 @@
|
|||
<div id="wrap">
|
||||
<div class="container mt16 js_website_blog">
|
||||
<div class="row">
|
||||
<div class="col-sm-3 hidden-xs" id="left_column">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8 col-sm-9 col-lg-offset-1" t-if="not blog_post and blog_posts">
|
||||
<t t-if="category">
|
||||
<a t-if="editable" t-attf-href="/blog/#{category.id}/new" class="btn btn-default">New Blog Post</a>
|
||||
</t>
|
||||
<div class="col-lg-8 col-sm-9" t-if="not blog_post">
|
||||
<t t-foreach="blog_posts" t-as="blog_post" data-publish="">
|
||||
<t t-call="website_blog.view_blog_post_short"/>
|
||||
</t>
|
||||
<div class="text-center" t-call="website.pager"/>
|
||||
</div>
|
||||
<div class="col-md-9 col-lg-8 col-lg-offset-1" t-if="blog_post">
|
||||
<div class="col-md-9 col-lg-8" t-if="blog_post">
|
||||
<t t-call="website_blog.view_blog_post">
|
||||
<t t-set="blog_post" t-value="blog_post"/>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3 hidden-xs col-lg-offset-1 mb32" id="right_column">
|
||||
<t t-if="category and editable">
|
||||
<a t-attf-href="/blog/#{category.id}/new" class="btn btn-primary pull-right">New Blog Post</a>
|
||||
</t>
|
||||
<div class="clearfix mb48"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -127,7 +126,8 @@
|
|||
|
||||
<!-- Option: archives -->
|
||||
<template id="blog_history" inherit_id="website_blog.index" inherit_option_id="website_blog.index" name="Archives">
|
||||
<xpath expr="//div[@id='left_column']" position="inside">
|
||||
<xpath expr="//div[@id='right_column']" position="inside">
|
||||
<section>
|
||||
<h4>Archives</h4>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li t-foreach="nav_list" t-as="year" class="js_nav_year">
|
||||
|
@ -142,49 +142,59 @@
|
|||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="blog_aboutus" inherit_option_id="website_blog.index" name="About">
|
||||
<xpath expr="//div[@id='left_column']" position="inside">
|
||||
<template id="blog_aboutus" inherit_option_id="website_blog.index" name="About" priority="4">
|
||||
<xpath expr="//div[@id='right_column']" position="inside">
|
||||
<section class="mb16">
|
||||
<h4>About us</h4>
|
||||
<p>
|
||||
Write here a small text for <b>new visitors</b> finding your website
|
||||
through your <b>blog entries</b>, referenced in Google.
|
||||
</p>
|
||||
<div>
|
||||
<button src="/contactus" class="btn btn-primary mb32">Contact us</button>
|
||||
<button src="/contactus" class="btn btn-primary">Contact us</button>
|
||||
</div>
|
||||
</section>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="blog_followus" inherit_option_id="website_blog.index" name="Follow us">
|
||||
<xpath expr="//div[@id='left_column']" position="inside">
|
||||
<template id="blog_followus" inherit_option_id="website_blog.index" name="Follow us" priority="2">
|
||||
<xpath expr="//div[@id='right_column']" position="inside">
|
||||
<section class="mb16">
|
||||
<h4>Follow us</h4>
|
||||
<p class="text-muted">
|
||||
Why should visitor follow you?
|
||||
Participate on our social stream.
|
||||
</p>
|
||||
<t t-call="website_mail.follow"><t t-set="object" t-value="category"/></t>
|
||||
<div class="mb16">
|
||||
<a href="http://facebook.com/openerp"><span class="icon-facebook"/></a>
|
||||
<a href="http://twitter.com/openerp"><span class="icon-twitter"/></a>
|
||||
<a href="http://www.linkedin.com/groups/OpenERP-165657"><span class="icon-linkedin"/></a>
|
||||
</div>
|
||||
<h2>
|
||||
<a t-att-href="website.social_facebook" t-if="website.social_facebook"><i class="icon-facebook-sign"/></a>
|
||||
<a t-att-href="website.social_twitter" t-if="website.social_twitter"><i class="icon-twitter-sign"/></a>
|
||||
<a t-att-href="website.social_linkedin" t-if="website.social_linkedin"><i class="icon-linkedin-sign"/></a>
|
||||
<a t-att-href="website.social_youtube" t-if="website.social_youtube"><i class="icon-youtube-sign"/></a>
|
||||
<a t-att-href="website.social_googleplus" t-if="website.social_googleplus"><i class="icon-google-plus-sign"/></a>
|
||||
<a t-att-href="website.social_github" t-if="website.social_github"><i class="icon-github-sign"/></a>
|
||||
</h2>
|
||||
</section>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="blog_categories" inherit_option_id="website_blog.index" name="Blogs">
|
||||
<xpath expr="//div[@id='left_column']" position="inside">
|
||||
<h4>Blogs</h4>
|
||||
<ul class="nav nav-pills nav-stacked mb32">
|
||||
<template id="blog_categories" inherit_option_id="website_blog.index" name="Other Blogs" priority="6">
|
||||
<xpath expr="//div[@id='right_column']" position="inside">
|
||||
<section class="mb16">
|
||||
<h4>Other Blogs</h4>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<t t-foreach="categories" t-as="nav_category">
|
||||
<li t-att-class="'active' if category and category.id == nav_category.id else ''">
|
||||
<li>
|
||||
<a t-attf-href="/blog/#{nav_category.id}">
|
||||
<span t-field="nav_category.name"/>
|
||||
</a>
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
</section>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
|
Loading…
Reference in New Issue