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
<template id= "website_blog_script" inherit_id= "website.layout" name= "Website Blog script" >
<xpath expr= "//t[@id='editable_scripts_hook']" position= "inside" >
<script type= "text/javascript" src= "/website_blog/static/src/js/website_blog.editor.js" t-ignore= "true" > </script>
</xpath>
</template>
2013-09-20 13:56:43 +00:00
<!-- Layout add nav and footer -->
2013-11-07 13:19:49 +00:00
<template id= "header_footer_custom" inherit_id= "website.layout" name= "Footer News Blog Link" >
2013-09-23 13:55:27 +00:00
<xpath expr= "//footer//div[@name='info']/ul" position= "inside" >
2013-10-30 16:29:09 +00:00
<li > <a t-href= "/blog/cat/%(website_blog.blog_category_1)d/" > News</a> </li>
2013-09-20 13:56:43 +00:00
</xpath>
</template>
2013-11-17 10:16:57 +00:00
<!-- Blog Post Summary -->
2013-11-18 10:33:29 +00:00
<template id= "latest_blogs" name= "Latest Blogs" >
2013-11-17 10:16:57 +00:00
<t t-call= "website.layout" >
<div id= "wrap" >
<div class= "oe_structure" />
<section t-if= "editable" >
<div class= "container text-center mt16" >
<div class= "alert alert-warning alert-dismissable" >
<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.
2013-11-17 10:18:08 +00:00
<span class= "text-muted" > This box will not be visible to your visitors.</span>
2013-11-17 10:16:57 +00:00
</p>
</div>
</div>
</section>
<section class= "container" >
<t t-call= "website.pager" >
<t t-set= "classname" > pull-right</t>
</t>
</section>
<section data-snippet-id= "title" class= "container" >
<div class= "row" >
<div class= "col-md-12 text-center" >
<h1 > Latest Blogs</h1>
</div>
</div>
</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 >
2013-11-18 14:35:30 +00:00
<a t-href= "/blog/#{blog.id}?#{ tag and 'tag=%s' % tag.id or '' }#{tag and date and '&' or ''}#{ date and 'date=%s' % date or ''}" t-field= "blog.name" > </a>
2013-11-17 10:16:57 +00:00
<span t-if= "not blog.website_published" class= "text-warning" >
& nbsp;
<span class= "icon-warning-sign" title= "Not published" />
</span>
</h4>
<div class= "text-muted" >
<span class= "icon-calendar" > <span t-field= "blog.create_date" /> & nbsp;</span>
<span class= "icon-folder-open" > In
<a t-href= "/blog/cat/#{blog.category_id.id}" >
<span t-field= "blog.category_id" />
</a> & nbsp;
</span>
</div>
<div class= "text-muted icon-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= "icon-comment" >
2013-11-18 14:35:30 +00:00
<a t-href= "/blog/#{blog.id}/?#{ tag and 'tag=%s' % tag.id or '' }#{tag and date and '&' or ''}#{ date and 'date=%s' % date or ''}#comment" >
2013-11-17 10:16:57 +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" />
</div>
</t>
</template>
2013-09-23 14:44:22 +00:00
<!-- Blog Post Summary -->
2013-10-11 09:18:15 +00:00
<template id= "blog_post_short" name= "Blog Post Summary" >
2013-11-15 08:56:32 +00:00
<t t-call= "website_blog.index" >
2013-11-15 09:15:07 +00:00
<div t-if= "not blog_posts" >
<h1 >
No blog post yet!
</h1>
<p t-if= "editable" >
To create a new blog post, use the top-right menu <em > Content</em>
and select the menuitem <em > New Blog Post</em> .
</p>
</div>
2013-11-16 16:19:58 +00:00
<t t-foreach= "blog_posts" t-as= "blog_post" >
<div t-att-data-publish= "blog_post.website_published and 'on' or 'off'" >
2013-09-24 19:38:19 +00:00
<h2 class= "text-center" >
2013-11-18 14:35:30 +00:00
<a t-href= "/blog/#{blog_post.id}/?#{ tag and 'tag=%s' % tag.id or '' }#{tag and date and '&' or ''}#{ date and 'date=%s' % date or ''}" t-field= "blog_post.name" > </a>
2013-09-24 19:38:19 +00:00
</h2>
2013-10-11 09:18:15 +00:00
<p class= "post-meta text-muted text-center" name= 'blog_post_data' >
2013-11-16 17:43:25 +00:00
<span class= "icon-calendar" > <span t-field= "blog_post.create_date" /> & nbsp;</span>
2013-10-11 13:00:59 +00:00
<span t-if= "len(blog_post.message_ids) > 0" class= "icon-comment" >
2013-11-18 14:35:30 +00:00
<a t-href= "/blog/#{blog_post.id}/?#{ tag and 'tag=%s' % tag.id or '' }#{tag and date and '&' or ''}#{ date and 'date=%s' % date or ''}#comment" >
2013-10-11 13:00:59 +00:00
<t t-if= "len(blog_post.message_ids) <= 1" > <t t-esc= "len(blog_post.message_ids)" /> comment</t>
<t t-if= "len(blog_post.message_ids) > 1" > <t t-esc= "len(blog_post.message_ids)" /> comments</t>
</a>
2013-09-24 19:38:19 +00:00
</span>
2013-11-16 16:19:58 +00:00
<span t-if= "not blog_post.website_published" class= "label label-danger" > not published</span>
2013-09-24 19:38:19 +00:00
</p>
<div t-field= "blog_post.shortened_content" class= "blog_content" />
<hr />
2013-11-16 16:19:58 +00:00
</div>
2013-09-24 19:38:19 +00:00
2013-11-16 16:19:58 +00:00
</t>
2013-11-15 08:56:32 +00:00
</t>
2013-09-20 13:56:43 +00:00
</template>
2013-09-30 16:21:41 +00:00
<!-- Options: Blog Post Summary: hide author -->
2013-11-16 17:43:25 +00:00
<template id= "opt_blog_post_short_author" name= "Author"
2013-10-11 09:18:15 +00:00
inherit_option_id="website_blog.blog_post_short">
2013-11-16 17:43:25 +00:00
<xpath expr= "//span[@class='icon-calendar']" position= "after" >
<span class= "icon-user" > By <span t-field= "blog_post.create_uid" /> & nbsp;</span>
2013-09-29 12:39:26 +00:00
</xpath>
</template>
2013-10-11 09:18:15 +00:00
<!-- Option: Blog Post Summary: show tags -->
<template id= "opt_blog_post_short_tags" name= "Tags"
inherit_option_id="website_blog.blog_post_short" inherit_id="website_blog.blog_post_short">
<xpath expr= "//p[@name='blog_post_data']" position= "after" >
<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" >
2013-11-18 14:35:30 +00:00
<a t-href= "/blog/cat/#{ category.id }/tag/#{tag.id}" t-esc= "tag.name" /> & nbsp;
2013-10-11 09:18:15 +00:00
</t>
</p>
</xpath>
</template>
2013-09-23 14:44:22 +00:00
<!-- Blog Post Complete -->
2013-10-11 09:18:15 +00:00
<template id= "blog_post_complete" name= "Blog Post" >
2013-11-15 08:56:32 +00:00
<t t-call= "website_blog.index" >
2013-11-18 14:35:30 +00:00
<div class= "row" >
<div class= "col-sm-9" >
<ol class= "breadcrumb" >
<li > <a t-href= "/blog/cat/#{category.id}" > <span t-field= "category.name" /> </a> </li>
<li t-if= "tag" > <a t-href= "/blog/cat/#{ category.id }/tag/#{tag.id}" > <span t-field= "tag.name" /> </a> </li>
<li t-if= "tag and date" > <a t-href= "/blog/cat/#{ category.id }/tag/#{tag.id}/date/#{ date }" t-esc= "date_name" /> </li>
<li t-if= "not tag and date" > <a t-href= "/blog/cat/#{ category.id }/date/#{ date }" t-esc= "date_name" /> </li>
<li class= "active" > <span t-field= "blog_post.name" /> </li>
</ol>
</div> <div class= "col-sm-3" >
2013-09-30 15:45:11 +00:00
<t t-call= "website.publish_management" >
<t t-set= "object" t-value= "blog_post" />
2013-10-02 15:45:28 +00:00
<t t-set= "publish_edit" t-value= "True" />
2013-11-05 15:47:22 +00:00
<li >
2013-11-18 14:35:30 +00:00
<a href= "#" t-attf-data-href= "/blog/duplicate?blog_post_id=#{blog_post.id}" > Duplicate</a>
2013-11-05 15:47:22 +00:00
<script >
var $a=$("[data-href$='/duplicate']");
$a.attr("href", $a.data('href')).removeAttr('data-href');
$a.next("script").remove();
</script>
</li>
2013-09-30 15:45:11 +00:00
</t>
2013-11-18 14:35:30 +00:00
</div>
2013-10-11 09:18:15 +00:00
</div>
2013-11-18 14:35:30 +00:00
2013-10-11 09:18:15 +00:00
<div class= "clearfix" />
2013-09-24 21:15:14 +00:00
2013-09-29 15:34:20 +00:00
<h1 class= "text-center" t-field= "blog_post.name" />
2013-10-11 09:18:15 +00:00
<p class= "post-meta text-muted text-center" name= "blog_post_data" >
2013-11-16 17:43:25 +00:00
<span class= "icon-calendar" > <span t-field= "blog_post.create_date" /> & nbsp;</span>
2013-10-30 16:29:09 +00:00
<span t-if= "len(blog_post.message_ids) > 0" class= "icon-comment" > With
2013-10-11 13:00:59 +00:00
<a t-attf-href= "#comments" >
<t t-if= "len(blog_post.message_ids) <= 1" > <t t-esc= "len(blog_post.message_ids)" /> comment</t>
<t t-if= "len(blog_post.message_ids) > 1" > <t t-esc= "len(blog_post.message_ids)" /> comments</t>
</a>
2013-09-24 21:15:14 +00:00
</span>
</p>
2013-09-29 13:09:54 +00:00
<div t-field= "blog_post.content" class= "mt16" />
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" />
2013-11-15 08:56:32 +00:00
<ul class= "media-list" id= "comments-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" >
2013-09-30 14:49:50 +00:00
<img class= "media-object pull-left" t-att-src= "'/website/image?model=res.partner&field=image_small&id='+str(message.author_id.id)" style= "width: 50px; margin-right: 10px;" />
2013-09-29 12:39:26 +00:00
<div class= "media-body" >
2013-09-30 15:45:11 +00:00
<t t-call= "website.publish_short" >
<t t-set= "object" t-value= "message" />
</t>
2013-09-29 12:39:26 +00:00
<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-11-15 08:56:32 +00:00
</t>
2013-10-03 15:00:48 +00:00
</template>
<!-- Options: Blog Post: user can reply -->
2013-11-15 09:28:25 +00:00
<template id= "opt_blog_post_complete_comment" name= "Allow Comments"
2013-10-11 09:18:15 +00:00
inherit_option_id="website_blog.blog_post_complete" inherit_id="website_blog.blog_post_complete">
2013-11-15 08:56:32 +00:00
<xpath expr= "//ul[@id='comments-list']" position= "after" >
2013-11-04 15:43:41 +00:00
<t t-if= "not is_public_user" >
<section groups= "group_website_blog_reply" class= "mb32" >
2013-11-18 11:07:47 +00:00
<form id= "comment" t-attf-action= "/blog/#{blog_post.id}/#{ path_filter }/comment"
2013-11-04 15:43:41 +00:00
method="POST">
<img class= "img pull-left img-rounded" t-att-src= "'/website/image?model=res.partner&field=image_small&id='+str(user_id.partner_id.id)" style= "width: 50px; margin-right: 10px;" />
<div class= "pull-left mb32" style= "width: 75%%" >
2013-11-04 17:23:56 +00:00
<textarea rows= "3" name= "comment" class= "form-control" placeholder= "Write a comment..." > </textarea>
2013-11-16 17:36:36 +00:00
<button type= "submit" class= "btn btn-primary mt8" > Post</button>
2013-11-04 15:43:41 +00:00
</div>
</form>
</section>
2013-11-17 11:30:44 +00:00
<div class= "clearfix" />
2013-11-04 15:43:41 +00:00
</t>
2013-10-03 15:00:48 +00:00
</xpath>
2013-09-29 12:39:26 +00:00
</template>
2013-09-30 16:21:41 +00:00
<!-- Options: Blog Post: hide author -->
2013-11-16 17:43:25 +00:00
<template id= "opt_blog_post_complete_author" name= "Authors"
2013-10-11 09:18:15 +00:00
inherit_option_id="website_blog.blog_post_complete">
2013-11-16 17:45:05 +00:00
<xpath expr= "//span[@class='icon-calendar']" position= "after" >
2013-11-16 17:43:25 +00:00
<span class= "icon-user" > By <span t-field= "blog_post.create_uid" /> & nbsp;</span>
2013-09-29 12:39:26 +00:00
</xpath>
2013-09-20 13:56:43 +00:00
</template>
2013-09-30 16:21:41 +00:00
<!-- Options: Blog Post: show category -->
2013-11-16 17:49:35 +00:00
<template id= "opt_blog_post_complete_category" name= "Blog Category"
2013-10-11 09:18:15 +00:00
inherit_option_id="website_blog.blog_post_complete">
2013-11-16 17:45:05 +00:00
<xpath expr= "//span[@class='icon-calendar']" position= "after" >
2013-09-30 16:21:41 +00:00
<span class= "icon-folder-open" > In <span t-field= "blog_post.category_id" /> & nbsp;</span>
</xpath>
</template>
2013-09-29 12:39:26 +00:00
2013-10-11 09:18:15 +00:00
<!-- Options: Blog Post: show tags -->
<template id= "opt_blog_post_complete_tags" name= "Tags"
inherit_option_id="website_blog.blog_post_complete" inherit_id="website_blog.blog_post_complete">
<xpath expr= "//p[@name='blog_post_data']" position= "after" >
<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" >
2013-11-18 14:35:30 +00:00
<a t-href= "/blog/cat/#{ category.id }/tag/#{tag.id}" t-esc= "tag.name" /> & nbsp;
2013-10-11 09:18:15 +00:00
</t>
</p>
</xpath>
</template>
2013-10-30 16:29:09 +00:00
<!-- Page -->
2013-11-15 09:30:15 +00:00
<template id= "index" name= "Blog Navigation" >
2013-09-20 13:56:43 +00:00
<t t-call= "website.layout" >
2013-10-11 09:18:15 +00:00
<t t-set= "head" >
<link rel= 'stylesheet' href= '/website_blog/static/src/css/website_blog.css' />
</t>
<div id= "wrap" >
<div class= "container mt16 js_website_blog" >
<div class= "row" >
2013-11-15 08:56:32 +00:00
<div class= "col-lg-12 col-sm-12" id= "blog_left_column" >
<t t-raw= "0" />
2013-10-11 09:18:15 +00:00
</div>
2013-11-15 08:56:32 +00:00
<div class= "col-lg-3 col-lg-offset-1 col-sm-4" id= "blog_right_column" />
2013-09-24 20:42:38 +00:00
</div>
2013-09-20 13:56:43 +00:00
</div>
</div>
</t>
</template>
2013-09-30 16:21:41 +00:00
<!-- Option: Right Column: archives -->
2013-10-11 09:18:15 +00:00
<template id= "opt_blog_rc_history" name= "Archives"
2013-11-15 08:56:32 +00:00
inherit_option_id="website_blog.index" inherit_id="website_blog.index">
<xpath expr= "//div[@id='blog_left_column']" position= "attributes" >
<attribute name= "class" > col-lg-8 col-sm-8</attribute>
</xpath>
<xpath expr= "//div[@id='blog_right_column']" position= "inside" >
<section class= "mt32" >
2013-09-23 10:17:30 +00:00
<h4 > Archives</h4>
2013-11-18 14:35:30 +00:00
<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-href= "/blog/cat/#{ category.id }/#{ tag and 'tag/%s/' % tag.id or '' }date/#{ months['date'] }" > <t t-esc= "months['create_date']" /> <span class= "pull-right badge" t-esc= "months['create_date_count']" /> </a>
2013-09-20 13:56:43 +00:00
</li>
2013-11-18 14:35:30 +00:00
</t>
2013-09-20 13:56:43 +00:00
</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-30 16:21:41 +00:00
<!-- Option: Right Column: about us -->
2013-11-17 07:25:32 +00:00
<template id= "opt_blog_rc_about_us" name= "About Us" priority= "2"
2013-11-15 08:56:32 +00:00
inherit_option_id="website_blog.index" inherit_id="website_blog.index">
<xpath expr= "//div[@id='blog_left_column']" position= "attributes" >
<attribute name= "class" > col-lg-8 col-sm-8</attribute>
</xpath>
<xpath expr= "//div[@id='blog_right_column']" position= "inside" >
<section class= "mt32" >
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-11-12 14:44:42 +00:00
<a href= "/page/website.contactus" > <button class= "btn btn-primary" > Contact us</button> </a>
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-30 16:21:41 +00:00
<!-- Option: Right Column: follow us -->
2013-11-17 07:25:32 +00:00
<template id= "opt_blog_rc_follow_us" name= "Follow us" priority= "4"
2013-11-15 08:56:32 +00:00
inherit_option_id="website_blog.index" inherit_id="website_blog.index">
<xpath expr= "//div[@id='blog_left_column']" position= "attributes" >
<attribute name= "class" > col-lg-8 col-sm-8</attribute>
</xpath>
<xpath expr= "//div[@id='blog_right_column']" position= "inside" >
<section class= "mt32" >
2013-11-16 15:09:27 +00:00
<h4 > Follow us<small t-if= "category" > : <t t-esc= "category.name" /> </small> </h4>
2013-09-30 16:21:41 +00:00
<t t-if= "category" >
<t t-call= "website_mail.follow" >
2013-10-02 11:56:03 +00:00
<t t-set= "email" t-value= "user_id.email" />
2013-09-30 16:21:41 +00:00
<t t-set= "object" t-value= "category" />
</t>
2013-09-30 14:33:57 +00:00
</t>
2013-11-15 09:01:06 +00:00
<p class= "text-muted mb0 mt16" >
2013-09-30 14:33:57 +00:00
Participate on our social stream.
</p>
2013-11-15 08:56:32 +00:00
<h2 class= "mt4" >
2013-09-30 14:33:57 +00:00
<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>
2013-09-29 08:48:53 +00:00
</section>
2013-09-24 21:15:14 +00:00
</xpath>
</template>
2013-10-11 09:18:15 +00:00
<!-- Option: Right Column: categories -->
2013-11-15 08:56:32 +00:00
<template id= "opt_blog_rc_categories" name= "Our Blogs" priority= "6"
inherit_option_id="website_blog.index">
<xpath expr= "//div[@id='blog_left_column']" position= "attributes" >
<attribute name= "class" > col-lg-8 col-sm-8</attribute>
</xpath>
<xpath expr= "//div[@id='blog_right_column']" position= "inside" >
2013-11-15 09:15:07 +00:00
<section class= "mt32 mb32" >
2013-11-15 08:56:32 +00:00
<h4 > Our Blogs</h4>
2013-11-18 14:41:08 +00:00
<ul class= "nav nav-pills nav-stacked" >
2013-09-24 20:42:38 +00:00
<t t-foreach= "categories" t-as= "nav_category" >
2013-11-18 14:41:08 +00:00
<li t-att-class= "nav_category.id == category.id and 'active' or ''" >
2013-11-15 09:01:06 +00:00
<a t-href= "/blog/cat/#{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-10-11 09:18:15 +00:00
</data>
2013-09-20 13:56:43 +00:00
</openerp>