[IMP] renamed controllers
bzr revid: fp@tinyerp.com-20140322212113-9naxywttg3x6ufja
This commit is contained in:
parent
3447004533
commit
e740be4418
|
@ -252,15 +252,14 @@ class WebsiteBlog(http.Controller):
|
|||
def blog_post_create(self, blog_id, **post):
|
||||
cr, uid, context = request.cr, request.uid, request.context
|
||||
create_context = dict(context, mail_create_nosubscribe=True)
|
||||
new_blog_post_id = request.registry['blog.post'].create(
|
||||
request.cr, request.uid, {
|
||||
new_blog_post_id = request.registry['blog.post'].create(cr, uid, {
|
||||
'blog_id': blog_id,
|
||||
'name': _("Blog Post Title"),
|
||||
'sub_title': _("Subtitle"),
|
||||
'content': '',
|
||||
'website_published': False,
|
||||
}, context=create_context)
|
||||
return werkzeug.utils.redirect("/blogpost/%s/?enable_editor=1" % new_blog_post_id)
|
||||
return werkzeug.utils.redirect("/blog/%s/post/%s/?enable_editor=1" % (blog_id, new_blog_post_id))
|
||||
|
||||
@http.route('/blogpost/duplicate', type='http', auth="public", website=True)
|
||||
def blog_post_copy(self, blog_post_id, **post):
|
||||
|
@ -272,8 +271,9 @@ class WebsiteBlog(http.Controller):
|
|||
"""
|
||||
cr, uid, context = request.cr, request.uid, request.context
|
||||
create_context = dict(context, mail_create_nosubscribe=True)
|
||||
new_blog_post_id = request.registry['blog.post'].copy(cr, uid, blog_post_id, {}, context=create_context)
|
||||
return werkzeug.utils.redirect("/blogpost/%s/?enable_editor=1" % new_blog_post_id)
|
||||
nid = request.registry['blog.post'].copy(cr, uid, blog_post_id, {}, context=create_context)
|
||||
post = request.registry['blog.post'].browse(cr, uid, nid, context)
|
||||
return werkzeug.utils.redirect("/blog/%s/post/%s/?enable_editor=1" % (post.blog_id.id, nid))
|
||||
|
||||
@http.route('/blogpost/get_discussion/', type='json', auth="public", website=True)
|
||||
def discussion(self, post_id=0, discussion=None, **post):
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
t-att-src="'/website/image?model=blog.post&field=author_image&id='+str(blog_post.id)"
|
||||
style="width: 50px;"/>
|
||||
|
||||
<a t-attf-href="/blogpost/#{ slug(blog_post) }?#{ tag and 'tag=%s' % tag.id or '' }#{tag and date and '&' or ''}#{ date and 'date=%s' % date or ''}">
|
||||
<a t-attf-href="/blog/#{ slug(blog_post.blog_id) }/post/#{ slug(blog_post) }">
|
||||
<h2 t-field="blog_post.name" class="mb4"/>
|
||||
</a>
|
||||
|
||||
|
@ -218,7 +218,7 @@
|
|||
<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">
|
||||
<div class="blog_title">
|
||||
<a class="hidden js_next" t-attf-href="/blogpost/#{ slug(next_post) }/#wrap"/>
|
||||
<a class="hidden js_next" t-attf-href="/blog/#{ slug(next_post.blog_id) }/post/#{ slug(next_post) }/#wrap"/>
|
||||
<h1 t-field="next_post.name"/>
|
||||
<h2 t-field="next_post.sub_title"/>
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue