[IMP] website: publish button use action for url to backend

bzr revid: chm@openerp.com-20140311171941-1fwhholwlsuncjyh
This commit is contained in:
chm@openerp.com 2014-03-11 18:19:41 +01:00
parent 972147fba8
commit 384f398090
6 changed files with 22 additions and 14 deletions

View File

@ -119,6 +119,7 @@ header a.navbar-brand img {
.container .container {
padding-left: 0;
padding-right: 0;
width: 100%;
}
/* ----- BOOTSTRAP HACK FOR HEADER NAV BAR ----- */

View File

@ -89,6 +89,7 @@ header
.container
padding-left: 0
padding-right: 0
width: 100%
/* ----- BOOTSTRAP HACK FOR HEADER NAV BAR ----- */

View File

@ -364,7 +364,7 @@
</li>
<t t-raw="0"/>
<li t-if="publish_edit">
<a t-att-href="'/web#return_label=Website&amp;model=%s&amp;id=%s' % (object._name, object.id)"
<a t-attf-href="/web#return_label=Website&amp;view_type=form&amp;model=#{object._name}&amp;id=#{object.id}&amp;action=#{action}"
title='Edit in backend'>Edit</a>
</li>
</ul>

View File

@ -155,7 +155,19 @@
<template id="blog_post_complete" name="Blog Post">
<t t-call="website_blog.index">
<div class="container" id="title">
<t t-call="website.publish_management">
<t t-set="object" t-value="blog_post"/>
<t t-set="publish_edit" t-value="True"/>
<t t-set="action" t-value="'website_blog.action_blog_post'"/>
<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 id="title">
<h1 class="text-center" t-field="blog_post.name"/>
<p class="post-meta text-muted text-center" name="blog_post_data">
<span class="fa fa-calendar oe_date"> <span t-field="blog_post.create_date"/> &amp;nbsp;</span>
@ -167,18 +179,6 @@
</span>
</p>
</div>
<div class="container">
<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>
<div t-field="blog_post.content"/>

View File

@ -189,6 +189,11 @@
</ol>
</div>
<div class="col-sm-5" groups="event.group_event_manager">
<t t-call="website.publish_management">
<t t-set="object" t-value="event"/>
<t t-set="publish_edit" t-value="True"/>
<t t-set="action" t-value="'event.action_event_view'"/>
</t>
</div>
</div>
</div>

View File

@ -293,6 +293,7 @@
<t t-call="website.publish_management">
<t t-set="object" t-value="product"/>
<t t-set="publish_edit" t-value="True"/>
<t t-set="action" t-value="'product.product_template_action'"/>
</t>
</div>
</div>