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

357 lines
14 KiB
XML

<?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 style="position: absolute; right: 2px; top: 38px;">
<button onclick="QWeb.add_template('base.xml'); $('body').css('background-color', '#FFFF9C'); setTimeout(function() { $('body').css('background-color', '#FFF'); }, 500);">Reload QWEB</button>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" class="main_table">
<tr>
<td colspan="2">
<div id="oe_header" class="header"></div>
<div id="oe_menu" class="menu"></div>
</td>
</tr>
<tr>
<td valign="top" id="oe_secondary_menu" class="secondary_menu">
</td>
<td valign="top" width="100%" height="100%">
<div id="oe_main" class="main">
<div id="oe_application" class="application"></div>
<div id="oe_sidebar"></div>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div id="oe_footer" class="footer">
Powered by OpenERP.
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div id="oe_errors">
Debug:
</div>
</td>
</tr>
</table>
</t>
<t t-name="Loading">
Loading...
</t>
<t t-name="Login">
<form>
Database: <input type="text" name="db" value="trunk"/><br/>
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="Header">
<a href="/" class="company_logo_link">
<img src="/base/static/openerp/img/logo.png" border="0" class="company_logo"/>
</a>
<h1 class="header_title" t-if="session.session_is_valid()">
<span class="company">$company</span> - (<span class="database">$database</span>)<br/>
<small class="username">$username session_id: <t t-esc="session.session_id"/></small>
</h1>
<div class="header_corner">
<ul class="block" t-if="session.session_is_valid()">
<li>
<a href="#home" title="Home" class="home"><img src="/base/static/openerp/img/header-home.png" width="16" height="16" border="0"/></a>
</li>
<li>
<a href="#requests" title="Requests" class="requests"><img src="/base/static/openerp/img/header-requests.png" width="16" height="16" border="0"/><small>1</small></a>
</li>
<li class="preferences">
<a href="#preferences" title="Preferences" class="preferences"><img src="/base/static/openerp/img/header-preferences.png" width="16" height="16" border="0"/></a>
</li>
<li>
<a href="#about" title="About" class="about"><img src="/base/static/openerp/img/header-about.png" width="16" height="16" border="0"/></a>
</li>
<li>
<a href="http://doc.openerp.com/v6.0/book?version=$version" title="Help" target="_blank" class="help"><img src="/base/static/openerp/img/header-help.png" width="16" height="16" border="0"/></a>
</li>
</ul>
<div class="block">
<a href="#logout" class="logout">LOGOUT</a>
</div>
</div>
</t>
<t t-name="Menu">
<ul>
<li t-foreach="data.children" t-as="menu">
<a href="#" t-att-data-menu="menu.id">
<span><t t-esc="menu.name"/></span>
</a>
</li>
</ul>
</t>
<t t-name="Menu.secondary">
<div style="display: none" class="menu_accordion" t-att-data-menu-parent="menu.id">
<t t-foreach="menu.children" t-as="menu">
<t t-set="header">h3</t>
<t t-call="Menu.secondary.children"/>
</t>
</div>
</t>
<t t-name="Menu.secondary.children">
&lt;<t t-esc="header"/>&gt;
<a href="#" t-attf-id="menu_#{menu.id}">
<span><t t-esc="menu.name"/></span>
</a>
&lt;/<t t-esc="header"/>&gt;
<div class="menu_content">
<t t-foreach="menu.children" t-as="menu">
<t t-if="!menu.children.length">
<a href="#" class="leaf" t-att-data-menu="menu.id">
<span><t t-esc="menu.name"/></span>
</a>
</t>
<t t-if="menu.children.length">
<div class="submenu_accordion">
<t t-call="Menu.secondary.children">
<t t-set="header">h4</t>
</t>
</div>
</t>
</t>
</div>
</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="view.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-raw="frame.render()"/>
<div style="text-align:right;">
<input type="button" value="Save"/>
</div>
</t>
<t t-name="Widget">
Unhandled widget
<t t-raw="console.log('Unhandled widget', widget)"/>
</t>
<t t-name="WidgetFrame">
<table border="0" width="100%" cellpadding="2" cellspacing="2">
<tr t-foreach="widget.table" t-as="row">
<t t-foreach="row" t-as="td">
<td t-att-colspan="td.colspan gt 1 ? td.colspan : undefined"
t-att-width="td.width ? td.width : undefined"
t-att-nowrap="td.is_field_label ? 'true' : undefined"
t-att-valign="td.table ? 'top' : undefined"
t-att-id="td.element_id"
>
<t t-raw="td.render()"/>
</td>
</t>
</tr>
</table>
</t>
<t t-name="WidgetNotebook">
<ul>
<li t-foreach="widget.pages" t-as="page">
<a t-att-href="'#' + widget.element_id + '-' + page_index">
<t t-esc="page.string"/>
</a>
</li>
</ul>
<t t-foreach="widget.pages" t-as="page">
<div t-att-id="widget.element_id + '-' + page_index">
<t t-raw="page.render()"/>
</div>
</t>
</t>
<t t-name="WidgetSeparator">
<div t-att-class="'separator ' + (widget.node.attrs.orientation || 'horizontal')">
<t t-esc="widget.string"/>
</div>
</t>
<t t-name="WidgetLabel">
<label t-att-for="widget.for.element_id" t-att-title="widget.for.help" style="display: block; text-align: right;" t-att-ondblclick="'console.log(\'' + widget.for.element_id + '\', openerp.screen.' + widget.for.element_id + ')'">
<t t-esc="widget.for.string"/>
<span t-if="widget.for.help">?</span>
:
</label>
</t>
<t t-name="FieldChar">
<input type="text"
t-att-name="widget.name"
t-att-required="widget.node.attrs.required ? 'required' : undefined"
t-att-class="'field_' + widget.type" style="width: 100%"
/>
</t>
<t t-name="FieldText">
<textarea rows="6" style="width: 100%;"
t-att-name="widget.name"
t-att-required="widget.node.attrs.required ? 'required' : undefined"
t-att-class="'field_' + widget.type"
></textarea>
</t>
<t t-name="FieldDate">
<input type="text" style="width: 100%"
t-att-name="widget.name"
t-att-required="widget.node.attrs.required ? 'required' : undefined"
t-att-class="'field_' + widget.type"
/>
</t>
<t t-name="FieldDatetime">
<input type="text" style="width: 100%"
t-att-name="widget.name"
t-att-required="widget.node.attrs.required ? 'required' : undefined"
t-att-class="'field_' + widget.type"
/>
</t>
<t t-name="FieldSelection">
<select t-att-name="widget.name" t-att-id="widget.element_id" t-att-class="'field_' + widget.type" style="width: 100%">
<t t-foreach="widget.field.selection" t-as="options">
<option t-att-value="options[0]">
<t t-esc="options[1]"/>
</option>
</t>
</select>
</t>
<t t-name="FieldMany2One">
<input type="text" t-att-name="widget.name" t-att-id="widget.element_id" t-att-class="'field_' + widget.type" style="width: 100%; border: 1px solid red;" placeholder="Many 2 One: Please, enter the ID of the object. Thank you !"/>
</t>
<t t-name="FieldOne2Many">
<div style="background: #ccc; padding: 20px">
One2Many widget
</div>
</t>
<t t-name="FieldMany2Many">
<div style="background: #ccc; padding: 20px">
Many2Many widget
</div>
</t>
<t t-name="FieldReference">
<input type="text" t-att-name="widget.name" t-att-id="widget.element_id" t-att-class="'field_' + widget.type" style="width: 100%" placeholder="Widget Reference"/>
</t>
<t t-name="FieldBoolean">
<input type="checkbox" t-att-name="widget.name" t-att-id="widget.element_id" t-att-class="'field_' + widget.type"/>
</t>
<t t-name="WidgetButton">
<button type="button" t-att-id="widget.element_id" t-att-title="widget.help" style="width: 100%" class="button">
<img t-if="widget.node.attrs.icon" t-att-src="'/base/static/openerp/img/icons/' + widget.node.attrs.icon + '.png'" width="16" height="16"/>
<t t-esc="widget.string"/>
</button>
</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.tag == 'group'">
<!-- if group is called without a <newline/> before, the table should be closed.
I think we'll need preprocessing, all those escaped tables are too ugly -->
<td>
<div t-att-class="'searchview_group ' + (node.attrs.expand == '0' ? 'folded' : 'expanded')">
<a class="searchview_group_string" href="#" onclick="$(this).parent().toggleClass('folded expanded')"><t t-esc="node.attrs.string"/></a>
<div class="searchview_group_content">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<t t-call="SearchView.recurse"/>
</tr>
</table>
</div>
</div>
</td>
&lt;/tr&gt;
&lt;/table&gt;
&lt;table border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tr&gt;
</t>
<t t-if="node.children and node.tag != 'newline' and node.tag != 'group'">
<t t-call="SearchView.recurse"/>
</t>
</t>
<t t-name="SearchView.recurse" t-trim="inner">
<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-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>