2013-09-20 13:56:43 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<openerp>
|
|
|
|
<data>
|
|
|
|
|
|
|
|
<!-- Layout add nav and footer -->
|
|
|
|
<template id="header_footer_custom" inherit_id="website.layout">
|
2013-09-23 13:55:27 +00:00
|
|
|
<xpath expr="//header//ul[@id='top_menu']/li[@name='contactus']" position="before">
|
2013-09-20 14:27:01 +00:00
|
|
|
<li><a href="/blog/%(website_blog.blog_category_1)d/">News</a></li>
|
2013-09-20 13:56:43 +00:00
|
|
|
</xpath>
|
2013-09-23 13:55:27 +00:00
|
|
|
<xpath expr="//footer//div[@name='info']/ul" position="inside">
|
2013-09-20 14:27:01 +00:00
|
|
|
<li><a href="/blog/%(website_blog.blog_category_1)d/">News</a></li>
|
2013-09-20 13:56:43 +00:00
|
|
|
</xpath>
|
|
|
|
</template>
|
|
|
|
|
2013-09-23 14:44:22 +00:00
|
|
|
<!-- Blog Post Summary -->
|
2013-09-29 12:39:26 +00:00
|
|
|
<template id="view_blog_post_short" name="Blog Post Summary">
|
2013-09-24 19:38:19 +00:00
|
|
|
<div>
|
|
|
|
<h2 class="text-center">
|
2013-09-29 13:03:07 +00:00
|
|
|
<a t-attf-href="/blog/#{blog_post.category_id.id}/#{blog_post.id}" t-field="blog_post.name"></a>
|
2013-09-24 19:38:19 +00:00
|
|
|
</h2>
|
|
|
|
<p class="post-meta text-muted text-center">
|
2013-09-25 11:28:03 +00:00
|
|
|
<span class="icon-calendar"> <span t-field="blog_post.create_date"/></span> &nbsp;
|
2013-09-29 12:39:26 +00:00
|
|
|
<span class="icon-user"> By <span t-field="blog_post.create_uid"/> &nbsp;</span>
|
2013-09-24 19:38:19 +00:00
|
|
|
<span t-if="len(blog_post.message_ids) > 0" class="icon-comment"> With
|
|
|
|
<a t-if="len(blog_post.message_ids) <= 1" t-attf-href="/blog/#{blog_post.category_id.id}/#{blog_post.id}#comments"><t t-esc="len(blog_post.message_ids)"/> comment</a>
|
|
|
|
<a t-if="len(blog_post.message_ids) > 1" t-attf-href="/blog/#{blog_post.category_id.id}/#{blog_post.id}#comments"><t t-esc="len(blog_post.message_ids)"/> comments</a>
|
|
|
|
</span>
|
|
|
|
</p>
|
|
|
|
<div t-field="blog_post.shortened_content" class="blog_content"/>
|
|
|
|
<hr/>
|
|
|
|
|
2013-09-20 13:56:43 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2013-09-29 12:39:26 +00:00
|
|
|
<template id="view_blog_post_short_author" inherit_option_id="website_blog.view_blog_post_short" name="Hide Authors">
|
|
|
|
<xpath expr="//span[@class='icon-user']" position="attributes">
|
|
|
|
<attribute name="class">hidden</attribute>
|
|
|
|
</xpath>
|
|
|
|
</template>
|
|
|
|
|
2013-09-23 14:44:22 +00:00
|
|
|
<!-- Blog Post Complete -->
|
2013-09-23 10:17:30 +00:00
|
|
|
<template id="view_blog_post" name="Blog Post">
|
2013-09-24 21:15:14 +00:00
|
|
|
<div>
|
2013-09-26 11:18:54 +00:00
|
|
|
<t t-call="website.publish_management"><t t-set="object" t-value="blog_post"/></t>
|
2013-09-24 21:15:14 +00:00
|
|
|
</div><div class="clearfix"/>
|
|
|
|
|
|
|
|
<h2 class="text-center" t-field="blog_post.name"/>
|
|
|
|
<p class="post-meta text-muted text-center">
|
2013-09-25 11:28:03 +00:00
|
|
|
<span class="icon-calendar"> <span t-field="blog_post.create_date"/></span> &nbsp;
|
2013-09-29 12:39:26 +00:00
|
|
|
<span class="icon-user"> By <span t-field="blog_post.create_uid"/> &nbsp;</span>
|
2013-09-24 21:15:14 +00:00
|
|
|
<span t-if="len(blog_post.message_ids) > 0" class="icon-comment"> With
|
|
|
|
<a t-if="len(blog_post.message_ids) <= 1" t-attf-href="#comments"><t t-esc="len(blog_post.message_ids)"/> comment</a>
|
|
|
|
<a t-if="len(blog_post.message_ids) > 1" t-attf-href="#comments"><t t-esc="len(blog_post.message_ids)"/> comments</a>
|
|
|
|
</span>
|
|
|
|
</p>
|
|
|
|
<p class="post-meta text-muted text-center" t-if="len(blog_post.tag_ids)">
|
|
|
|
<span class="icon-tags"/>
|
|
|
|
<t t-foreach="blog_post.tag_ids" t-as="tag">
|
|
|
|
<a href="/blog/tag/#{tag.id}" t-esc="tag.name"/> &nbsp;
|
|
|
|
</t>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<div t-field="blog_post.content" class="mt32"/>
|
2013-09-29 12:39:26 +00:00
|
|
|
<hr class="mb32"/>
|
2013-09-24 21:15:14 +00:00
|
|
|
|
2013-09-29 12:39:26 +00:00
|
|
|
<a id="comments"/>
|
|
|
|
<h4 t-if="len(blog_post.website_message_ids)" class="mb16">
|
2013-09-24 21:15:14 +00:00
|
|
|
<t t-if="len(blog_post.website_message_ids) <= 1">
|
2013-09-29 12:39:26 +00:00
|
|
|
1 Comment
|
2013-09-24 21:15:14 +00:00
|
|
|
</t>
|
|
|
|
<t t-if="len(blog_post.website_message_ids) > 1">
|
|
|
|
<t t-esc="len(blog_post.website_message_ids)"/> Comments
|
|
|
|
</t>
|
2013-09-29 12:39:26 +00:00
|
|
|
</h4>
|
|
|
|
<ul class="media-list">
|
2013-09-24 21:15:14 +00:00
|
|
|
<li t-foreach="blog_post.website_message_ids" t-as="message" class="media">
|
2013-09-29 12:39:26 +00:00
|
|
|
<div class="media-body">
|
|
|
|
<img class="media-object pull-left" t-att-src="'/website/image?model=res.users&field=image_small&id='+str(message.author_id.id)" style="width: 50px; margin-right: 10px;"/>
|
|
|
|
<div class="media-body">
|
|
|
|
<t t-call="website.publish_management"><t t-set="object" t-value="message"/></t>
|
|
|
|
<h5 class="media-heading">
|
|
|
|
<span t-field="message.author_id"/> <small>on <span t-field="message.date"/></small>
|
|
|
|
</h5>
|
|
|
|
<div t-field="message.body"/>
|
|
|
|
</div>
|
2013-09-23 12:42:48 +00:00
|
|
|
</div>
|
2013-09-24 21:15:14 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
2013-09-29 12:39:26 +00:00
|
|
|
<section groups="group_website_blog_reply" class="mb32">
|
|
|
|
<t t-call="website_mail.follow"><t t-set="object" t-value="blog_post"/></t>
|
|
|
|
<h4>Leave a Comment</h4>
|
|
|
|
<form id="comment" t-attf-action="/blog/#{blog_post.category_id.id}/#{blog_post.id}/post#post"
|
|
|
|
method="POST">
|
|
|
|
<img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.users&field=image_small&id='+str(uid)" style="width: 50px; margin-right: 10px;"/>
|
|
|
|
<div class="pull-left" style="width: 75%%">
|
|
|
|
<textarea rows="3" class="form-control" placeholder="Write a comment..."></textarea>
|
|
|
|
<button type="submit" class="btn btn-danger mt8">Post</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template id="view_blog_post_author" inherit_option_id="website_blog.view_blog_post" name="Hide Authors">
|
|
|
|
<xpath expr="//span[@class='icon-user']" position="attributes">
|
|
|
|
<attribute name="class">hidden</attribute>
|
|
|
|
</xpath>
|
2013-09-20 13:56:43 +00:00
|
|
|
</template>
|
|
|
|
|
2013-09-29 12:39:26 +00:00
|
|
|
|
2013-09-20 13:56:43 +00:00
|
|
|
<!-- Page -->
|
|
|
|
<template id="index" name="Blogs" page="True">
|
|
|
|
<t t-call="website.layout">
|
|
|
|
<t t-set="head">
|
2013-09-23 10:17:30 +00:00
|
|
|
<script type="text/javascript" src="/website_blog/static/src/js/website_blog.js"></script>
|
|
|
|
<link rel='stylesheet' href='/website_blog/static/src/css/website_blog.css'/>
|
2013-09-20 13:56:43 +00:00
|
|
|
</t>
|
|
|
|
<t t-set="title">Blog</t>
|
|
|
|
<div id="wrap">
|
2013-09-24 20:42:38 +00:00
|
|
|
<div class="container mt16 js_website_blog">
|
2013-09-20 13:56:43 +00:00
|
|
|
<div class="row">
|
2013-09-29 08:48:53 +00:00
|
|
|
<div class="col-lg-8 col-sm-9" t-if="not blog_post">
|
2013-09-24 19:38:19 +00:00
|
|
|
<t t-foreach="blog_posts" t-as="blog_post" data-publish="">
|
|
|
|
<t t-call="website_blog.view_blog_post_short"/>
|
|
|
|
</t>
|
2013-09-29 12:39:26 +00:00
|
|
|
<div class="pull-right" t-call="website.pager"/>
|
2013-09-20 13:56:43 +00:00
|
|
|
</div>
|
2013-09-29 08:48:53 +00:00
|
|
|
<div class="col-md-9 col-lg-8" t-if="blog_post">
|
2013-09-24 20:42:38 +00:00
|
|
|
<t t-call="website_blog.view_blog_post">
|
|
|
|
<t t-set="blog_post" t-value="blog_post"/>
|
|
|
|
</t>
|
|
|
|
</div>
|
2013-09-20 13:56:43 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</t>
|
|
|
|
</template>
|
|
|
|
|
2013-09-29 12:39:26 +00:00
|
|
|
<template id="blog_right_column" inherit_id="website_blog.index" inherit_option_id="website_blog.index" name="Right Column">
|
|
|
|
<xpath expr="//div[@class='row']" position="inside">
|
|
|
|
<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>
|
|
|
|
</xpath>
|
|
|
|
</template>
|
|
|
|
|
2013-09-23 10:17:30 +00:00
|
|
|
<!-- Option: archives -->
|
2013-09-29 12:39:26 +00:00
|
|
|
<template id="blog_history" inherit_id="website_blog.blog_right_column" inherit_option_id="website_blog.blog_right_column" name="Archives">
|
2013-09-29 08:48:53 +00:00
|
|
|
<xpath expr="//div[@id='right_column']" position="inside">
|
|
|
|
<section>
|
2013-09-23 10:17:30 +00:00
|
|
|
<h4>Archives</h4>
|
2013-09-20 13:56:43 +00:00
|
|
|
<ul class="nav nav-pills nav-stacked">
|
|
|
|
<li t-foreach="nav_list" t-as="year" class="js_nav_year">
|
|
|
|
<t t-set="year" t-value="nav_list[year]"/>
|
|
|
|
<a href="#"><t t-esc="year['name']"/> <small>(<t t-esc="year['create_date_count']"/>)</small></a>
|
|
|
|
<ul class="nav list-group css_nav_month nav-stacked nav-hierarchy">
|
|
|
|
<t t-foreach="year['months']">
|
|
|
|
<li class="js_nav_month"><a href="#" t-att-data-domain="__domain"><t t-esc="create_date"/> <small>(<t t-esc="create_date_count"/>)</small></a>
|
|
|
|
<ul class="nav list-group nav-stacked nav-hierarchy"/>
|
|
|
|
</li>
|
|
|
|
</t>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2013-09-29 08:48:53 +00:00
|
|
|
</section>
|
2013-09-20 13:56:43 +00:00
|
|
|
</xpath>
|
|
|
|
</template>
|
2013-09-24 20:42:38 +00:00
|
|
|
|
2013-09-29 12:39:26 +00:00
|
|
|
<template id="blog_aboutus" inherit_option_id="website_blog.blog_right_column" inherit_id="website_blog.blog_right_column" name="About" priority="4">
|
2013-09-29 08:48:53 +00:00
|
|
|
<xpath expr="//div[@id='right_column']" position="inside">
|
|
|
|
<section class="mb16">
|
2013-09-24 21:15:14 +00:00
|
|
|
<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>
|
2013-09-29 08:48:53 +00:00
|
|
|
<button src="/contactus" class="btn btn-primary">Contact us</button>
|
2013-09-24 21:15:14 +00:00
|
|
|
</div>
|
2013-09-29 08:48:53 +00:00
|
|
|
</section>
|
2013-09-24 21:15:14 +00:00
|
|
|
</xpath>
|
|
|
|
</template>
|
|
|
|
|
2013-09-29 12:39:26 +00:00
|
|
|
<template id="blog_followus" inherit_option_id="website_blog.blog_right_column" inherit_id="website_blog.blog_right_column" name="Follow us" priority="2">
|
2013-09-29 08:48:53 +00:00
|
|
|
<xpath expr="//div[@id='right_column']" position="inside">
|
|
|
|
<section class="mb16">
|
2013-09-24 21:15:14 +00:00
|
|
|
<h4>Follow us</h4>
|
|
|
|
<p class="text-muted">
|
2013-09-29 08:48:53 +00:00
|
|
|
Participate on our social stream.
|
2013-09-24 21:15:14 +00:00
|
|
|
</p>
|
|
|
|
<t t-call="website_mail.follow"><t t-set="object" t-value="category"/></t>
|
2013-09-29 08:48:53 +00:00
|
|
|
<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>
|
2013-09-24 21:15:14 +00:00
|
|
|
</xpath>
|
|
|
|
</template>
|
|
|
|
|
2013-09-29 12:39:26 +00:00
|
|
|
<template id="blog_categories" inherit_option_id="website_blog.blog_right_column" name="Other Blogs" priority="6">
|
2013-09-29 08:48:53 +00:00
|
|
|
<xpath expr="//div[@id='right_column']" position="inside">
|
|
|
|
<section class="mb16">
|
|
|
|
<h4>Other Blogs</h4>
|
|
|
|
<ul class="nav nav-pills nav-stacked">
|
2013-09-24 20:42:38 +00:00
|
|
|
<t t-foreach="categories" t-as="nav_category">
|
2013-09-29 08:48:53 +00:00
|
|
|
<li>
|
2013-09-24 20:42:38 +00:00
|
|
|
<a t-attf-href="/blog/#{nav_category.id}">
|
2013-09-25 11:28:03 +00:00
|
|
|
<span t-field="nav_category.name"/>
|
2013-09-24 20:42:38 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</t>
|
|
|
|
</ul>
|
2013-09-29 08:48:53 +00:00
|
|
|
</section>
|
2013-09-24 20:42:38 +00:00
|
|
|
</xpath>
|
|
|
|
</template>
|
|
|
|
|
2013-09-20 13:56:43 +00:00
|
|
|
</data>
|
|
|
|
</openerp>
|