[IMP] Blog tour scaffolding
bzr revid: ddm@openerp.com-20131120094423-ra4e6xmmty6pmpk2
This commit is contained in:
parent
fd02a389e9
commit
bb15c21dc9
|
@ -38,7 +38,7 @@ class WebsiteBlog(http.Controller):
|
|||
|
||||
def nav_list(self):
|
||||
blog_post_obj = request.registry['blog.post']
|
||||
groups = blog_post_obj.read_group(request.cr, request.uid, [], ['name', 'create_date'],
|
||||
groups = blog_post_obj.read_group(request.cr, request.uid, [], ['name', 'create_date'],
|
||||
groupby="create_date", orderby="create_date asc", context=request.context)
|
||||
for group in groups:
|
||||
group['date'] = "%s_%s" % (group['__domain'][0][2], group['__domain'][1][2])
|
||||
|
@ -76,7 +76,7 @@ class WebsiteBlog(http.Controller):
|
|||
'/blog/cat/<model("blog.category"):category>/tag/<model("blog.tag"):tag>/date/<string(length=21):date>/',
|
||||
'/blog/cat/<model("blog.category"):category>/tag/<model("blog.tag"):tag>/date/<string(length=21):date>/page/<int:page>/',
|
||||
], type='http', auth="public", multilang=True)
|
||||
def blog(self, category=None, tag=None, date=None, page=1):
|
||||
def blog(self, category=None, tag=None, date=None, page=1, **opt):
|
||||
""" Prepare all values to display the blog.
|
||||
|
||||
:param category: category currently browsed.
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<record id="action_open_website" model="ir.actions.act_url">
|
||||
<field name="name">Website Blogs</field>
|
||||
<field name="target">self</field>
|
||||
<field name="url" eval="'/blog/cat/'+str(ref('website_blog.blog_category_1'))"/>
|
||||
<field name="url" eval="'/blog/cat/'+str(ref('website_blog.blog_category_1'))+'/?blog-tutorial=true'"/>
|
||||
</record>
|
||||
<record id="base.open_menu" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_open_website"/>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<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>
|
||||
<script type="text/javascript" src="/website_blog/static/src/js/website.tour.blog.js" t-ignore="true"></script>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
@ -59,7 +60,7 @@
|
|||
</h4>
|
||||
<div class="text-muted">
|
||||
<span class="icon-calendar"> <span t-field="blog.create_date"/> &nbsp;</span>
|
||||
<span class="icon-folder-open"> In
|
||||
<span class="icon-folder-open"> In
|
||||
<a t-href="/blog/cat/#{blog.category_id.id}">
|
||||
<span t-field="blog.category_id"/>
|
||||
</a> &nbsp;
|
||||
|
|
Loading…
Reference in New Issue