[REV] header template extraction
bzr revid: xmo@openerp.com-20121004074610-o2wk9nspzgqjj4y1
This commit is contained in:
parent
aa6672b2af
commit
29a53e1954
|
@ -2,12 +2,6 @@
|
||||||
<!-- vim:fdl=1:
|
<!-- vim:fdl=1:
|
||||||
-->
|
-->
|
||||||
<templates id="template" xml:space="preserve">
|
<templates id="template" xml:space="preserve">
|
||||||
<t t-name="ui.Header">
|
|
||||||
<header>
|
|
||||||
<t t-raw="__content__"/>
|
|
||||||
</header>
|
|
||||||
</t>
|
|
||||||
|
|
||||||
<t t-name="EmptyComponent">
|
<t t-name="EmptyComponent">
|
||||||
<div></div>
|
<div></div>
|
||||||
</t>
|
</t>
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB |
|
@ -22,8 +22,6 @@ Contents:
|
||||||
list-view
|
list-view
|
||||||
form-notes
|
form-notes
|
||||||
|
|
||||||
templates
|
|
||||||
|
|
||||||
guides/client-action
|
guides/client-action
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
.. highlight:: xml
|
|
||||||
|
|
||||||
Generic templates
|
|
||||||
=================
|
|
||||||
|
|
||||||
Generic template names should be prefixed by ``ui.`` to indicate their
|
|
||||||
special role.
|
|
||||||
|
|
||||||
Global Header: ``ui.Header``
|
|
||||||
----------------------------
|
|
||||||
|
|
||||||
Role
|
|
||||||
++++
|
|
||||||
|
|
||||||
This template is mostly dedicated to client actions taking over the
|
|
||||||
whole content area, and full-HTML form views (especially those opening
|
|
||||||
in the ``inline`` target).
|
|
||||||
|
|
||||||
It is used to display a buttons container (and can also be used for
|
|
||||||
status bars). The buttons should simply be placed inside the
|
|
||||||
``ui.Header`` body.
|
|
||||||
|
|
||||||
Arguments
|
|
||||||
+++++++++
|
|
||||||
|
|
||||||
The template only uses its body as argument.
|
|
||||||
|
|
||||||
Example
|
|
||||||
+++++++
|
|
||||||
|
|
||||||
::
|
|
||||||
|
|
||||||
<t t-call="ui.Header">
|
|
||||||
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
|
|
||||||
or
|
|
||||||
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
|
|
||||||
</t>
|
|
||||||
|
|
||||||
This block demonstrates a common pattern in OpenERP views and widgets:
|
|
||||||
a highlighted button, and a discard button styled as a link to cancel
|
|
||||||
the action:
|
|
||||||
|
|
||||||
.. image:: ./images/templates/ui.Header.*
|
|
||||||
|
|
||||||
In this case, both buttons are OpenERP action buttons.
|
|
Loading…
Reference in New Issue