[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:
commit
410ec52276
|
@ -364,7 +364,7 @@
|
||||||
</li>
|
</li>
|
||||||
<t t-raw="0"/>
|
<t t-raw="0"/>
|
||||||
<li t-if="publish_edit">
|
<li t-if="publish_edit">
|
||||||
<a t-att-href="'/web#return_label=Website&model=%s&id=%s' % (object._name, object.id)"
|
<a t-attf-href="/web#return_label=Website&view_type=form&model=#{object._name}&id=#{object.id}&action=#{action}"
|
||||||
title='Edit in backend'>Edit</a>
|
title='Edit in backend'>Edit</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -155,7 +155,19 @@
|
||||||
<template id="blog_post_complete" name="Blog Post">
|
<template id="blog_post_complete" name="Blog Post">
|
||||||
<t t-call="website_blog.index">
|
<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"/>
|
<h1 class="text-center" t-field="blog_post.name"/>
|
||||||
<p class="post-meta text-muted text-center" name="blog_post_data">
|
<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"/> &nbsp;</span>
|
<span class="fa fa-calendar oe_date"> <span t-field="blog_post.create_date"/> &nbsp;</span>
|
||||||
|
@ -167,18 +179,6 @@
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</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"/>
|
<div t-field="blog_post.content"/>
|
||||||
|
|
||||||
|
|
|
@ -189,6 +189,11 @@
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-5" groups="event.group_event_manager">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -293,6 +293,7 @@
|
||||||
<t t-call="website.publish_management">
|
<t t-call="website.publish_management">
|
||||||
<t t-set="object" t-value="product"/>
|
<t t-set="object" t-value="product"/>
|
||||||
<t t-set="publish_edit" t-value="True"/>
|
<t t-set="publish_edit" t-value="True"/>
|
||||||
|
<t t-set="action" t-value="'product.product_template_action'"/>
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue