[MERGE] website: add optional 'action' in managment edit button to laod one specific backend view

bzr revid: chm@openerp.com-20140314162909-ff0obqbw6j7lalmz
This commit is contained in:
chm@openerp.com 2014-03-14 17:29:09 +01:00
commit 410ec52276
4 changed files with 20 additions and 14 deletions

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>