2013-09-20 13:56:43 +00:00
<?xml version="1.0" encoding="utf-8"?>
<openerp >
<data >
2013-11-13 17:14:38 +00:00
2014-01-16 18:05:35 +00:00
<template id= "editor_head" inherit_id= "website.editor_head" name= "Blog Editor" groups= "base.group_document_user" >
<xpath expr= "//script[@id='website_tour_js']" position= "after" >
2013-12-12 10:58:21 +00:00
<script type= "text/javascript" src= "/website_blog/static/src/js/website_blog.editor.js" > </script>
<script type= "text/javascript" src= "/website_blog/static/src/js/website.tour.blog.js" > </script>
</xpath>
</template>
2013-09-20 13:56:43 +00:00
2013-12-12 10:58:21 +00:00
<!-- Layout add nav and footer -->
<template id= "header_footer_custom" inherit_id= "website.layout" name= "Footer News Blog Link" >
<xpath expr= "//footer//div[@name='info']/ul" position= "inside" >
2014-03-22 21:39:14 +00:00
<li > <a t-attf-href= "/blog/%(website_blog.blog_blog_1)d" > News</a> </li>
2013-12-12 10:58:21 +00:00
</xpath>
</template>
2014-01-26 13:11:12 +00:00
<!-- Overview of all blog posts -->
2013-12-12 10:58:21 +00:00
<template id= "latest_blogs" name= "Latest Blogs" >
<t t-call= "website.layout" >
<div id= "wrap" >
<div class= "oe_structure" />
<section class= "container" >
2014-03-22 19:02:15 +00:00
<div class= "alert alert-warning alert-dismissable mt16" groups= "base.group_website_publisher" >
<button type= "button" class= "close" data-dismiss= "alert" aria-hidden= "true" > & times;</button>
<p >
This page is great to improve your <strong > Search Engine Optimization</strong> ;
You can review titles, keywords and descriptions of all blogs at once.
</p> <p >
You should <strong > add a banner on the top</strong> as it is a frequent landing page for new visitors.
<span class= "text-muted" > This box will not be visible to your visitors.</span>
</p>
</div>
2013-12-12 10:58:21 +00:00
<t t-call= "website.pager" >
<t t-set= "classname" > pull-right</t>
</t>
</section>
2014-03-22 19:02:15 +00:00
<section class= "container" >
<h1 class= "text-center" > Latest Blogs</h1>
2013-12-12 10:58:21 +00:00
</section>
<section class= "container" >
<div class= "row" >
<t t-set= "count" t-value= "0" />
<t t-foreach= "blogs" t-as= "blog" >
<div class= "col-md-4" >
<h4 >
2014-01-28 20:50:17 +00:00
<a t-attf-href= "/blogpost/#{ slug(blog) }?#{ tag and 'tag=%s' % tag.id or '' }#{tag and date and '&' or ''}#{ date and 'date=%s' % date or ''}" t-field= "blog.name" > </a>
2013-12-12 10:58:21 +00:00
<span t-if= "not blog.website_published" class= "text-warning" >
& nbsp;
<span class= "fa fa-warning" title= "Not published" />
</span>
</h4>
<div class= "text-muted" >
<span class= "fa fa-calendar" > <span t-field= "blog.create_date" /> & nbsp;</span>
<span class= "fa fa-folder-open" > In
2014-01-28 20:50:17 +00:00
<a t-attf-href= "/blog/#{ slug(blog.blog_id) }" >
2014-01-24 16:22:51 +00:00
<span t-field= "blog.blog_id" />
2013-12-12 10:58:21 +00:00
</a> & nbsp;
</span>
</div>
<div class= "text-muted fa fa-tags" >
<span t-field= "blog.website_meta_keywords" />
<span t-if= "editable and not blog.website_meta_keywords" class= "label label-danger" >
No keywords defined!
</span>
</div>
<div class= "text-muted" t-if= "len(blog.message_ids) > 0" >
<span class= "fa fa-comment-o" >
2014-01-29 14:20:34 +00:00
<a t-attf-href= "/blogpost/#{ slug(blog) }/?#{ tag and 'tag=%s' % tag.id or '' }#{tag and date and '&' or ''}#{ date and 'date=%s' % date or ''}#comments" >
2013-12-12 10:58:21 +00:00
<t t-if= "len(blog.message_ids) <= 1" > <t t-esc= "len(blog.message_ids)" /> comment</t>
<t t-if= "len(blog.message_ids) > 1" > <t t-esc= "len(blog.message_ids)" /> comments</t>
</a>
</span>
</div>
<div class= "text-muted mb16" t-field= "blog.website_meta_description" />
</div>
<t t-set= "count" t-value= "count+1" />
<div class= "clearfix" t-if= "(count % 3) == 0" />
</t>
</div>
</section>
<div class= "oe_structure" />
2013-11-15 09:15:07 +00:00
</div>
2013-12-12 10:58:21 +00:00
</t>
</template>
2013-11-18 14:35:30 +00:00
2013-12-12 10:58:21 +00:00
<!-- Blog Post Summary -->
2014-02-23 12:57:45 +00:00
<template id= "blog_post_short" name= "Blog Posts" >
2013-12-12 10:58:21 +00:00
<t t-call= "website_blog.index" >
2014-02-23 14:17:06 +00:00
<div class= "oe_structure" >
2014-03-22 21:16:23 +00:00
<section class= "mb0" >
2014-02-23 14:17:06 +00:00
<div class= "container" >
<div class= "row" >
<div class= "col-md-12 mb32 mt16 text-center" >
<h1 t-field= "blog.name" />
<h3 class= "text-muted" t-field= "blog.subtitle" />
</div>
</div>
</div>
</section>
2014-02-23 12:57:45 +00:00
</div>
2014-02-23 14:17:06 +00:00
<div class= "container" >
<div class= "row" >
<div class= "col-md-8 col-md-offset-2" t-ignore= "True" id= "main_column" >
2014-02-23 12:57:45 +00:00
2014-02-23 14:17:06 +00:00
<div t-if= "not blog_posts" class= "container mb64" >
<p class= "css_editable_hidden" >
<h1 > No blog post yet.</h1>
</p>
<p groups= "base.group_document_user" >
Click on "Content" on the top menu to write your first blog post.
</p>
</div>
2014-02-23 12:57:45 +00:00
2014-02-23 14:17:06 +00:00
<div t-foreach= "blog_posts" t-as= "blog_post" class= "mb32" >
2014-02-23 12:57:45 +00:00
2014-02-23 14:17:06 +00:00
<img class= "img-circle pull-right mt16"
2014-03-27 07:23:34 +00:00
t-att-src="'/website/image?model=res.partner& field=image_small& id='+str(blog_post.create_uid.parnter_id.id)"
2014-02-23 14:17:06 +00:00
style="width: 50px;"/>
2014-02-23 12:57:45 +00:00
2014-03-22 21:21:13 +00:00
<a t-attf-href= "/blog/#{ slug(blog_post.blog_id) }/post/#{ slug(blog_post) }" >
2014-02-23 14:17:06 +00:00
<h2 t-field= "blog_post.name" class= "mb4" />
</a>
2014-02-23 12:57:45 +00:00
2014-02-23 14:17:06 +00:00
<div class= "text-muted" >
<h4
t-field="blog_post.sub_title"
class="mb4 mt4"/>
<p name= 'blog_post_data' class= "mb0" >
2014-02-23 12:57:45 +00:00
2014-02-23 14:17:06 +00:00
<span t-field= "blog_post.create_uid.name" />
  <span t-field= "blog_post.create_date" t-field-options= '{"format": "MMMM yyyy"}' />
<span t-if= "len(blog_post.message_ids) > 0" >
  <t t-esc= "len(blog_post.message_ids)" />
<t t-if= "len(blog_post.message_ids) <= 1" > comment</t>
<t t-if= "len(blog_post.message_ids) > 1" > comments</t>
</span>
2014-02-23 12:57:45 +00:00
2014-02-23 14:17:06 +00:00
<span t-if= "not blog_post.website_published" class= "label label-danger" > not published</span>
</p>
</div>
2013-09-24 21:15:14 +00:00
2014-02-23 14:17:06 +00:00
</div>
</div>
2014-02-07 11:40:28 +00:00
</div>
</div>
2014-02-23 12:57:45 +00:00
<div class= "oe_structure" />
</t>
2014-01-31 11:33:25 +00:00
</template>
2013-12-12 10:58:21 +00:00
2014-01-31 11:33:25 +00:00
<!-- Blog Post Complete -->
2013-12-12 10:58:21 +00:00
<template id= "blog_post_complete" name= "Blog Post" >
2014-02-23 17:15:32 +00:00
<t t-call= "website_blog.index" >
2014-01-31 11:33:25 +00:00
2014-03-22 20:12:05 +00:00
<div class= "cover js_header" id= "title" t-attf-style= "background-image: url(#{blog_post.content_image})" t-ignore= "True" >
2014-02-23 17:54:03 +00:00
<div class= "container" >
2014-03-19 13:39:34 +00:00
<div class= "container text-right mt16" >
2014-02-23 17:54:03 +00:00
<div class= "btn-group css_non_editable_mode_hidden" >
<a id= "change_cover" class= "btn btn-primary" >
Change Cover
</a>
<a id= "clear_cover" class= "btn btn-danger" >
<span class= "fa fa-times" />
</a>
</div>
<t t-call= "website.publish_management" >
<t t-set= "object" t-value= "blog_post" />
<t t-set= "publish_edit" t-value= "True" />
<li >
<form class= "duplicate hidden" action= "/blogpost/duplicate" >
<input name= "blog_post_id" t-att-value= "blog_post.id" />
</form>
<a href= "#" class= "duplicate" onclick= "$(this).prev('form').submit()" > Duplicate</a>
</li>
</t>
</div>
2014-02-23 17:15:32 +00:00
</div>
2014-02-23 17:54:03 +00:00
<div class= "blog_title" >
2014-03-23 19:55:31 +00:00
<h1 t-field= "blog_post.name" id= "blog_post_name" t-att-data-blog-id= "blog_post.id" />
2014-03-22 20:12:05 +00:00
<h2 t-field= "blog_post.sub_title" />
2014-02-23 17:54:03 +00:00
<div >
2014-03-27 07:23:34 +00:00
<img class= "img-circle" t-att-src= "'/website/image?model=res.partner&field=image_small&id='+str(blog_post.create_uid.partner_id.id)" style= "width: 30px; margin-right: 10px;" />
2014-02-23 17:54:03 +00:00
<small id= "blog_author" t-field= "blog_post.create_uid.name" /> <br />
</div>
2014-02-25 10:59:21 +00:00
<div t-if= "blog_post.content_image" id= "blog_angle_down" >
2014-03-22 20:12:05 +00:00
<a href= "#blog_content" class= "fa fa-angle-down fa-2x fa-inverse mt32" />
2014-02-23 17:54:03 +00:00
</div>
2014-02-23 17:15:32 +00:00
</div>
2014-01-31 11:33:25 +00:00
</div>
2014-02-23 17:15:32 +00:00
2014-03-22 18:50:58 +00:00
<div id= "blog_content_container" class= "mt32" >
<div id= "blog_content" t-field= "blog_post.content" />
</div>
2014-01-31 11:33:25 +00:00
2014-03-23 19:55:31 +00:00
<section id= "comments" class= "read_width" t-if= "blog_post.website_message_ids" >
<hr />
<ul class= "media-list" id= "comments-list" >
2014-01-31 11:33:25 +00:00
<li t-foreach= "blog_post.website_message_ids" t-as= "message" class= "media" >
2014-03-23 18:17:40 +00:00
<span class= "pull-left" >
2014-03-23 19:55:31 +00:00
<img class= "media-object img img-circle" t-att-src= "'/website/image?model=mail.message&field=author_avatar&id='+str(message.id)" style= "width: 30px" />
2014-03-23 18:17:40 +00:00
</span>
2014-01-31 11:33:25 +00:00
<div class= "media-body" >
2014-03-23 18:17:40 +00:00
<t t-call= "website.publish_short" >
<t t-set= "object" t-value= "message" />
</t>
<strong t-field= "message.author_id" /> <span class= "text-muted" > on <span t-field= "message.date" /> </span>
<div t-field= "message.body" />
2013-12-12 10:58:21 +00:00
</div>
2014-01-31 11:33:25 +00:00
</li>
</ul>
</section>
2014-02-23 17:15:32 +00:00
2014-02-23 18:12:05 +00:00
<t t-if= "next_post" >
<div class= "cover cover_footer mb0 text-center" t-attf-style= "background-image: url(#{next_post.content_image})" t-ignore= "True" >
2014-03-22 20:12:05 +00:00
<div class= "blog_title" >
2014-03-22 21:21:13 +00:00
<a class= "hidden js_next" t-attf-href= "/blog/#{ slug(next_post.blog_id) }/post/#{ slug(next_post) }/#wrap" />
2014-03-22 20:12:05 +00:00
<h1 t-field= "next_post.name" />
<h2 t-field= "next_post.sub_title" />
<div >
2014-03-27 07:23:34 +00:00
<img class= "img-circle" t-att-src= "'/website/image?model=res.partner&field=image_small&id='+str(next_post.create_uid.partner_id.id)" style= "width: 30px; margin-right: 10px;" />
2014-03-22 20:12:05 +00:00
<small id= "blog_author" t-field= "next_post.create_uid.name" />
</div>
<p class= "mt32" > Read Next <span class= "fa fa-long-arrow-right" /> </p>
2014-02-23 18:12:05 +00:00
</div>
2014-02-23 17:15:32 +00:00
</div>
2014-02-23 18:12:05 +00:00
</t>
2014-02-23 17:15:32 +00:00
</t>
2013-12-12 10:58:21 +00:00
</template>
2014-01-31 11:33:25 +00:00
<template id= "blog_breadcrumb" name= "Breadcrumb"
inherit_option_id="website_blog.blog_post_complete">
<xpath expr= "//div[@id='title']" position= "before" >
<div class= "container" >
<div class= "row" >
<div class= "col-sm-9" >
<ol class= "breadcrumb" >
<li > <a t-attf-href= "/blog/#{ slug(blog) }" > <span t-field= "blog.name" /> </a> </li>
<li t-if= "tag" > <a t-attf-href= "/blog/#{ slug(blog) }/tag/#{ slug(tag) }" > <span t-field= "tag.name" /> </a> </li>
<li t-if= "tag and date" > <a t-attf-href= "/blog/#{ slug(blog) }/tag/#{ slug(tag) }/date/#{ date }" t-esc= "date_name" /> </li>
<li t-if= "not tag and date" > <a t-attf-href= "/blog/#{ slug(blog) }/date/#{ date }" t-esc= "date_name" /> </li>
<li class= "active" > <span t-field= "blog_post.name" /> </li>
</ol>
</div> <div class= "col-sm-3" >
</div>
</div>
</div>
</xpath>
</template>
2014-01-26 13:11:12 +00:00
2013-12-12 10:58:21 +00:00
<!-- Options: Blog Post: user can reply -->
2014-03-13 11:14:52 +00:00
<template id= "opt_blog_post_complete_comment" name= "Allow blog post comment"
2014-02-11 10:09:47 +00:00
inherit_option_id="website_blog.blog_post_complete"
2014-01-31 11:33:25 +00:00
groups="website_mail.group_comment">
<xpath expr= "//ul[@id='comments-list']" position= "before" >
2014-03-23 18:17:40 +00:00
<section class= "mb32 read_width css_editable_mode_hidden" >
2014-01-31 11:33:25 +00:00
<form id= "comment" t-attf-action= "/blogpost/comment" method= "POST" >
2014-03-23 18:17:40 +00:00
<div class= "media" >
<span class= "pull-left" >
2014-03-23 19:55:31 +00:00
<img class= "img img-circle media-object" t-att-src= "'/website/image?model=res.partner&field=image_small&id='+str(user_id.partner_id.id)" style= "width: 30px" />
2014-03-23 18:17:40 +00:00
</span>
<div class= "media-body" >
<input name= "blog_post_id" t-att-value= "blog_post.id" type= "hidden" />
<textarea rows= "3" name= "comment" class= "form-control" placeholder= "Write a comment..." > </textarea>
<button type= "submit" class= "btn btn-primary mt8" > Post</button>
</div>
2014-01-31 11:33:25 +00:00
</div>
</form>
</section>
</xpath>
</template>
2013-10-11 09:18:15 +00:00
2014-02-24 11:03:52 +00:00
<!-- Options: Blog Post: user can select text for tweet -->
<template id= "opt_blog_post_select_to_tweet" name= "Select to Tweet"
inherit_option_id="website_blog.blog_post_complete">
2014-03-22 18:50:58 +00:00
<xpath expr= "//div[@id='blog_content']" position= "attributes" >
<attribute name= "class" > js_tweet</attribute>
</xpath>
2014-03-22 21:16:23 +00:00
<xpath expr= "//div[@id='title']//div[@class='blog_title']" position= "attributes" >
2014-03-22 18:50:58 +00:00
<attribute name= "class" > blog_title js_tweet</attribute>
</xpath>
2014-02-24 11:03:52 +00:00
</template>
<!-- Options: Blog Post: user can add Inline Discussion -->
2014-03-13 11:14:52 +00:00
<template id= "opt_blog_post_inline_discussion" name= "Allow comment in text"
2014-03-22 18:50:58 +00:00
inherit_option_id="website_blog.blog_post_complete">
<xpath expr= "//div[@id='blog_content_container']" position= "attributes" >
2014-03-23 19:05:33 +00:00
<attribute name= "class" > js_discuss mt32</attribute>
2014-03-22 18:50:58 +00:00
</xpath>
2014-02-24 11:03:52 +00:00
</template>
2013-12-12 10:58:21 +00:00
<!-- Page -->
<template id= "index" name= "Blog Navigation" >
<t t-call= "website.layout" >
<t t-set= "head" >
<link rel= 'stylesheet' href= '/website_blog/static/src/css/website_blog.css' />
2014-02-19 09:31:03 +00:00
<script type= "text/javascript" src= "/website_blog/static/src/js/website_blog.inline.discussion.js" > </script>
2014-02-12 16:19:59 +00:00
<script type= "text/javascript" src= "/website_blog/static/src/js/website_blog.js" />
2014-02-17 09:14:23 +00:00
<script type= "text/javascript" src= "/website_blog/static/lib/contentshare.js" />
2013-12-12 10:58:21 +00:00
</t>
2014-01-16 18:05:35 +00:00
<div id= "wrap" class= "js_blog" >
2014-01-26 13:11:12 +00:00
<t t-raw= "0" />
</div>
</t>
</template>
2014-02-23 12:57:45 +00:00
<!-- Option:Right Column for extra info -->
2014-01-26 13:11:12 +00:00
2014-02-23 12:57:45 +00:00
<template id= "index_right" name= "Right Column"
2014-02-23 14:17:06 +00:00
inherit_option_id="website_blog.blog_post_short">
<xpath expr= "//div[@id='main_column']" position= "attributes" >
<attribute name= "class" > col-sm-8</attribute>
</xpath>
<xpath expr= "//div[@id='main_column']" position= "after" >
<div class= "col-lg-3 col-lg-offset-1 col-sm-4" id= "blog_right_column" />
2014-01-31 11:33:25 +00:00
</xpath>
</template>
2013-09-20 13:56:43 +00:00
2014-02-23 12:57:45 +00:00
<!-- Option:Right Column: tags -->
2014-01-31 11:33:25 +00:00
<template id= "opt_blog_rc_tags" name= "Tags"
2014-02-23 12:57:45 +00:00
inherit_option_id="website_blog.index_right">
<xpath expr= "//div[@id='blog_right_column']" position= "inside" >
2014-01-31 11:33:25 +00:00
<section class= "mt32" >
<h4 > Tags</h4>
<ul class= "nav nav-pills nav-stacked" >
<t t-foreach= "tags" t-as= "tag_id" >
<li t-att-class= "tag and tag_id.id == tag.id and 'active' or None" style= "display: inline-block;" >
<a t-attf-href= "/blog/#{ slug(blog) }/tag/#{ slug(tag_id) }" > <span t-field= "tag_id.name" /> </a>
</li>
</t>
</ul>
</section>
</xpath>
</template>
2013-11-18 15:05:10 +00:00
2014-02-23 12:57:45 +00:00
<!-- Option:Right Column: archives -->
2014-01-31 11:33:25 +00:00
<template id= "opt_blog_rc_history" name= "Archives"
2014-02-23 12:57:45 +00:00
inherit_option_id="website_blog.index_right">
<xpath expr= "//div[@id='blog_right_column']" position= "inside" >
2014-01-31 11:33:25 +00:00
<section class= "mt32" >
<h4 > Archives</h4>
<ul class= "nav nav-pills nav-stacked" >
<t t-foreach= "nav_list" t-as= "months" >
<li t-att-class= "months['date'] == date and 'active' or None" >
<a t-ignore= "True" t-attf-href= "/blog/#{ slug(blog) }/#{ tag and 'tag/%s/' % slug(tag) or '' }date/#{ months['date'] }" > <t t-esc= "months['create_date']" /> <span class= "pull-right badge" t-esc= "months['create_date_count']" /> </a>
</li>
</t>
</ul>
</section>
</xpath>
</template>
2013-09-24 20:42:38 +00:00
2014-02-23 12:57:45 +00:00
<!-- Option:Right Column: about us -->
2014-01-31 11:33:25 +00:00
<template id= "opt_blog_rc_about_us" name= "About Us" priority= "2"
2014-02-23 12:57:45 +00:00
inherit_option_id="website_blog.index_right">
<xpath expr= "//div[@id='blog_right_column']" position= "inside" >
2014-01-31 11:33:25 +00:00
<section class= "mt32" >
<h4 > About us</h4>
<p >
Write a small text here for when <b > new visitors</b> find your website
through your <b > blog entries</b> , referenced in Google.
</p>
<div >
<a href= "/page/website.contactus" > <button class= "btn btn-primary" > Contact us</button> </a>
</div>
</section>
</xpath>
</template>
2013-09-24 21:15:14 +00:00
2014-02-23 12:57:45 +00:00
<!-- Option:Right Column: follow us -->
2014-01-31 11:33:25 +00:00
<template id= "opt_blog_rc_follow_us" name= "Follow us" priority= "4"
2014-02-23 12:57:45 +00:00
inherit_option_id="website_blog.index_right">
<xpath expr= "//div[@id='blog_right_column']" position= "inside" >
2014-01-31 11:33:25 +00:00
<section class= "mt32" >
<h4 > Follow us<small t-if= "blog" > : <t t-esc= "blog.name" /> </small> </h4>
<t t-if= "blog" >
<t t-call= "website_mail.follow" >
<t t-set= "email" t-value= "user_id.email" />
<t t-set= "object" t-value= "blog" />
</t>
</t>
<p class= "text-muted mb0 mt16" >
Participate on our social stream.
</p>
<h2 class= "mt4" >
<a t-att-href= "website.social_facebook" t-if= "website.social_facebook" > <i class= "fa fa-facebook-square" /> </a>
<a t-att-href= "website.social_twitter" t-if= "website.social_twitter" > <i class= "fa fa-twitter" /> </a>
<a t-att-href= "website.social_linkedin" t-if= "website.social_linkedin" > <i class= "fa fa-linkedin" /> </a>
<a t-att-href= "website.social_youtube" t-if= "website.social_youtube" > <i class= "fa fa-youtube-play" /> </a>
<a t-att-href= "website.social_googleplus" t-if= "website.social_googleplus" > <i class= "fa fa-google-plus-square" /> </a>
<a t-att-href= "website.social_github" t-if= "website.social_github" > <i class= "fa fa-github" /> </a>
</h2>
</section>
</xpath>
</template>
2013-09-24 21:15:14 +00:00
2014-02-23 12:57:45 +00:00
<!-- Option:Right Column: blogs -->
2014-02-17 05:18:46 +00:00
<template id= "opt_blog_rc_blogs" name= "Our Blogs" priority= "6"
2014-02-23 12:57:45 +00:00
inherit_option_id="website_blog.index_right">
<xpath expr= "//div[@id='blog_right_column']" position= "inside" >
2014-02-17 05:18:46 +00:00
<section class= "mt32 mb32" >
<h4 > Our Blogs</h4>
<ul class= "nav nav-pills nav-stacked" >
<t t-foreach= "blogs" t-as= "nav_blog" >
<li t-att-class= "nav_blog.id == blog.id and 'active' or ''" >
<a t-attf-href= "/blog/#{ slug(nav_blog) }" >
<span t-field= "nav_blog.name" />
</a>
</li>
</t>
</ul>
</section>
2014-01-31 11:33:25 +00:00
</xpath>
</template>
2013-09-24 20:42:38 +00:00
2013-10-11 09:18:15 +00:00
</data>
2013-09-20 13:56:43 +00:00
</openerp>