odoo/addons/base/static/openerp/base.xml

178 lines
6.3 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<!-- vim:fdl=1:
-->
<templates id="template" xml:space="preserve">
<t t-name="interface">
<div id="oe_loading" class="loading"></div>
<div id="oe_login" class="login"></div>
<div id="oe_header" style="padding: 4px; border-bottom: 1px solid #000;">
<h2>OpenERP Web Client <span style="font-size:50%; font-weight: normal;"><br/>Codename: from __future__ import openerpweb</span></h2>
</div>
<div id="oe_menu" style="border-bottom: 1px solid #000;"></div>
<div id="oe_main" style="padding-bottom: 6px; border-bottom: 1px solid #000;"></div>
<div id="oe_footer" style="text-align: center; font-size: 75%;">
Powered by OpenERP.
</div>
<div id="oe_errors" style="font-size: 90%;">
Debug:
</div>
<div style="position: absolute; right: 0; top: 0;">
<button onclick="QWeb.add_template('base.xml'); $('body').css('background-color', '#FFFF9C'); setTimeout(function() { $('body').css('background-color', '#FFF'); }, 500);">Reload QWEB</button>
</div>
</t>
<t t-name="Loading">
Loading...
</t>
<t t-name="login">
<form>
Login: <input type="text" name="login" value="admin"/><br/>
Password: <input type="password" name="password" value="a"/><br/>
<input type="submit" name="submit" value="Login"/>
</form>
</t>
<t t-name="Menu.root">
<ul class="sf-menu">
<t t-foreach="data.children" t-as="menu">
<t t-call="Menu.children"/>
</t>
</ul>
<div style="clear: both"></div>
</t>
<t t-name="Menu.children">
<!-- TODO prefix id with the element_id of the controller -->
<li><a href="#" t-attf-id="menu_#{menu.id}"><t t-esc="menu.name"/></a>
<t t-if="menu.children.length!=0">
<ul>
<t t-foreach="menu.children" t-as="menu">
<t t-call="Menu.children"/>
</t>
</ul>
</t>
</li>
</t>
<t t-name="ListView">
<!--
<h3><t t-esc="fields_view.arch['@string']"/></h3>
-->
<div style="text-align:right;">
<input type="button" value="First"/>
<input type="button" value="&lt;&lt;"/>
0 / 0
<input type="button" value="&gt;&gt;"/>
<input type="button" value="Last"/>
</div>
<table id="todo_use_unique_id" class="jqGrid"></table>
</t>
<t t-name="FormView">
<h3 class="title"><t t-esc="fields_view.arch.attrs.string"/></h3>
<div style="text-align:right;">
<input type="button" value="First"/>
<input type="button" value="&lt;&lt;"/>
0 / 0
<input type="button" value="&gt;&gt;"/>
<input type="button" value="Last"/>
</div>
<t t-call="FormView.node">
<t t-set="node" t-value="fields_view.arch"/>
</t>
<div style="text-align:right;">
<input type="button" value="Save"/>
</div>
</t>
<t t-name="FormView.node">
<!--
tag: <t t-esc="node.tag"/> <t t-esc="node['@name']"/> <br/>
<t t-if="node.tag == 'filter'">
<input type="button" t-att-value="node['@string']"/>
<t t-esc="node['@name']"/>
<br/>
</t>
<t t-if="node.tag == 'separator'">
<hr/>
<t t-esc="node['@name']"/>
<t t-esc="node['@string']"/>
</t>
-->
<t t-if="node.tag == 'field'">
<t t-esc="node.attrs.string"/>
<t t-esc="node.attrs.name"/>
<input type="text" t-att-name="node.attrs.name"/>
<br/>
</t>
<t t-foreach="node.children || []" t-as="node">
<t t-call="FormView.node"/>
</t>
</t>
<t t-name="SearchView">
<h3 class="title"><t t-esc="fields_view.arch.attrs['string']"/></h3>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<t t-call="SearchView.node">
<t t-set="node" t-value="fields_view.arch"/>
<t t-set="previous_node_type"></t>
</t>
</tr>
</table>
<div style="text-align:right;">
<input id="search" type="button" value="Search"/>
<input type="button" value="Clear"/>
</div>
</t>
<t t-name="SearchView.node" t-trim="inner">
<t t-if="node.tag == 'filter'">
<t t-if="previous_node_type != 'filter'">
&lt;td nowrap="true" valign="bottom" class="filter_label_group"&gt;
</t>
<button type="button" t-att-title="node.attrs.help" t-att-class="node.attrs.string ? 'filter_label' : 'filter_icon'">
<img t-if="node.attrs.icon" t-att-src="'/base/static/openerp/img/icons/' + node.attrs.icon + '.png'" width="16" height="16"/>
<br t-if="node.attrs.icon and node.attrs.string"/>
<t t-esc="node.attrs.string"/>
</button>
<t t-if="next_node_type != 'filter'">
&lt;/td&gt;
</t>
</t>
<t t-if="node.tag == 'separator'">
<!-- nothing in search view ? -->
</t>
<t t-if="node.tag == 'newline'">
<!-- TODO: check qweb support for cdata -->
&lt;/tr&gt;
&lt;/table&gt;
&lt;table border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tr&gt;
</t>
<t t-if="node.tag == 'field'">
<t t-set="orm" t-value="fields_view.fields[node.attrs.name] || {}"/>
<td>
<label style="display: block" t-att-title="orm.help || node.attrs.help">
<t t-esc="orm.string || node.attrs.string || node.attrs.name"/>
<span t-if="orm.help || node.attrs.help">(?)</span>
</label>
<div>
<input type="text" t-att-name="node.attrs.name"/>
</div>
</td>
</t>
<t t-if="node.children and node.tag != 'newline'">
<t t-foreach="node.children" t-as="node">
<t t-call="SearchView.node">
<t t-set="previous_node_type" t-value="node_all[node_index - 1] ? node_all[node_index - 1].tag : ''"/>
<t t-set="next_node_type" t-value="node_all[node_index + 1] ? node_all[node_index + 1].tag : ''"/>
</t>
</t>
</t>
</t>
<t t-name="Action">
<!-- TODO prefix id with the element_id of the controller t-attf-id="#{prefix}_localid" -->
<div style="text-align:right;">
<input id="mode_list" type="button" value="ListView"/>
<input id="mode_form" type="button" value="FormView"/>
</div>
<div id="oe_action_dataset" style="display:none;"></div>
<div id="oe_action_search" ></div>
<div id="oe_action_list" ></div>
<div id="oe_action_form" ></div>
</t>
</templates>