diff options
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 213 |
1 files changed, 95 insertions, 118 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 09ae4457221..c8a6762ab34 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -17,35 +17,24 @@ </div> </div> </t> -<t t-name="Interface"> - <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" class="main_table"> - <tr> - <td colspan="2" valign="top"> - <div id="oe_header" class="header"></div> - <div id="oe_menu" class="menu"></div> - </td> - </tr> - <tr> - <td colspan="2" valign="top" height="100%"> - <table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%"> - <tr> - <td valign="top" id="oe_secondary_menu" class="secondary_menu"></td> - <td valign="top" class="oe-application-container"> - <div id="oe_app" class="oe-application"> - </div> - </td> - </tr> - </table> - </td> - </tr> - <tr> - <td colspan="2"> - <div id="oe_footer" class="oe_footer"> - <p class="oe_footer_powered">Powered by <a href="http://www.openerp.com">OpenERP</a></p> +<t t-name="WebClient"> + <div class="oe_webclient"> + <div class="oe_topbar"> + <div class="oe_menu_placeholder"/> + <div class="oe_user_menu_placeholder"/> + <div class="oe_systray"/> + </div> + <div class="oe_leftbar"> + <a href="#" class="oe_logo"><img t-att-src='_s + "/web/static/src/img/logo.png"'/></a> + + <div class="oe_secondary_menus_container"/> + + <div class="oe_footer"> + Powered by <a href="http://www.openerp.com"><span>Open</span>ERP</a> </div> - </td> - </tr> - </table> + </div> + <div class="oe_application"/> + </div> </t> <t t-name="Loading"> <div id="oe_loading"> @@ -154,7 +143,7 @@ <option t-att-value="db"><t t-esc="db"/></option> </t> </select> - <input t-if="!db_list" name="drop_db" class="required" + <input t-if="!db_list" name="backup_db" class="required" type="text" autofocus="autofocus"/> </td> </tr> @@ -335,81 +324,73 @@ <div id="oe_db_options" class="oe_db_options"></div> </div> </t> -<t t-name="Header"> - <div> - <a t-att-href="'/' + widget.qs" class="company_logo_link"> - <div class="company_logo" /> - </a> - </div> -</t> -<t t-name="Header-content"> - <h1 class="header_title"> - <t t-esc="user.company_id[1]"/> (<t t-esc="widget.session.db"/>)<br/> - <small class="username"><t t-esc="user.name"/></small> - </h1> - <div class="header_corner"> - <ul class="block"> - <li> - <a t-att-href="'/' + widget.qs" title="Home" class="home"><img t-att-src='_s + "/web/static/src/img/header-home.png"' width="16" height="16" border="0"/></a> - </li> - <li class="preferences"> - <a href="javascript:void(0)" title="Preferences" class="preferences"><img t-att-src='_s + "/web/static/src/img/header-preferences.png"' width="16" height="16" border="0"/></a> - </li> - <li> - <a href="javascript:void(0)" title="About" class="about"><img t-att-src='_s + "/web/static/src/img/header-about.png"' width="16" height="16" border="0"/></a> - </li> - </ul> - <div class="block"> - <a href="javascript:void(0)" class="logout">LOGOUT</a> - </div> - </div> - <div class="oe-shortcuts"> </div> -</t> -<ul t-name="Shortcuts"> - <li t-foreach="shortcuts" t-as="shortcut" - t-att-data-id="shortcut.res_id" - t-att-data-shortcut-id="shortcut.id" - ><t t-esc="shortcut.name"/></li> -</ul> <t t-name="Menu"> - <table align="center"> - <tr> - <td t-foreach="widget.data.data.children" t-as="menu"> - <a href="#" t-att-data-menu="menu.id"> - <t t-esc="menu.name"/> - </a> - </td> - </tr> - </table> + <ul class="oe_menu" t-if="widget.data"> + <li t-foreach="widget.data.data.children" t-as="menu"> + <t t-call="Menu.secondary.link"/> + </li> + </ul> </t> <t t-name="Menu.secondary"> - <div t-attf-class="oe_toggle_secondary_menu"> - <span class="oe_menu_fold" title="Fold menu"><t t-raw="'&laquo;'"/></span> - <span class="oe_menu_unfold" title="Unfold menu"><t t-raw="'&raquo;'"/></span> - </div> <div t-foreach="widget.data.data.children" t-as="menu" style="display: none" class="oe_secondary_menu" t-att-data-menu-parent="menu.id"> <t t-foreach="menu.children" t-as="menu"> - <t t-set="classname" t-translation="off">oe_secondary_menu_item</t> - <t t-set="level" t-value="0"/> - <t t-call="Menu.secondary.children"/> + <div class="oe_secondary_menu_section"> + <t t-esc="menu.name"/> + <!-- + Shall the section be still clickable ? + <t t-call="Menu.secondary.link"/> + --> + </div> + <t t-call="Menu.secondary.submenu"/> </t> </div> </t> -<t t-name="Menu.secondary.children"> - <t t-set="level" t-value="level + 1"/> - <a href="#" t-att-id="menu.children.length ? 'menu_' + menu.id : undefined" - t-att-class="classname + (menu.children.length ? ' submenu' : ' leaf') + (menu_first and level == 1 ? ' opened' : '')" - t-att-data-menu="menu.children.length ? undefined : menu.id"> - <span t-attf-style="padding-left: #{(level - 2) * 20}px"> <t t-esc="menu.name"/></span> +<t t-name="Menu.secondary.submenu"> + <ul t-if="menu.children.length" class="oe_secondary_submenu"> + <li t-foreach="menu.children" t-as="menu"> + <t t-call="Menu.secondary.link"/> + <!--<span class="oe_menu_label">8</span>--> + <t t-call="Menu.secondary.submenu"/> + </li> + </ul> +</t> +<t t-name="Menu.secondary.link"> + <a href="#" + t-att-class="menu.children.length ? 'oe_menu_toggler' : 'oe_menu_leaf'" + t-att-data-menu="menu.id" + t-att-data-action-model="menu.action ? menu.action.split(',')[0] : ''" + t-att-data-action-id="menu.action ? menu.action.split(',')[1] : ''"> + <t t-esc="menu.name"/> </a> - <div t-attf-class="oe_secondary_submenu" t-if="menu.children.length" t-att-style="menu_first and level == 1 ? undefined : 'display: none'"> - <t t-foreach="menu.children" t-as="menu"> - <t t-set="classname" t-translation="off">oe_secondary_submenu_item</t> - <t t-call="Menu.secondary.children"/> - </t> - </div> </t> + +<t t-name="UserMenu"> + <ul class="oe_user_menu oe_topbar_item"> + <li class="oe_dropdown"> + <a href="#" class="oe_dropdown_toggle"> + <img class="oe_topbar_avatar" t-att-data-default-src="_s + '/web/static/src/img/topbar-avatar.png'"/> + <span class="oe_topbar_name"/> + </a> + <ul class="oe_dropdown_options"> + <!--<li><a href="#" data-menu="profile">Profile</a></li>--> + <li><a href="#" data-menu="settings">Settings</a></li> + <li><a href="#" data-menu="logout">Log out</a></li> + <li><hr/></li> + <li><a href="#" data-menu="about">About OpenERP</a></li> + <li><hr/></li> + </ul> + </li> + </ul> +</t> +<t t-name="UserMenu.shortcut"> + <li t-foreach="shortcuts" t-as="shortcut"> + <a href="#" data-menu="shortcut" t-att-data-id="shortcut.res_id" t-att-data-shortcut-id="shortcut.id"> + <t t-esc="shortcut.name"/> + </a> + </li> +</t> + <t t-name="ViewManager"> <table class="view-manager-main-table" cellpadding="0" cellspacing="0"> <tbody> @@ -728,7 +709,8 @@ </td> </tr> <t t-name="ListView.row.form"> - <t t-raw="frame.render()"/> + <th t-if="widget.editable_list.options.selectable"></th> + <th t-if="widget.editable_list.options.isClarkGable"></th> </t> <t t-name="FormView"> @@ -743,7 +725,6 @@ </t> </div> </div> - <t t-raw="frame.render()"/> </t> <t t-name="One2Many.formview" t-extend="FormView"> <t t-jquery=".oe_form_buttons" t-operation="inner"> @@ -892,7 +873,8 @@ </li> </ul> <t t-foreach="widget.pages" t-as="page"> - <t t-raw="page.render()"/> + <div t-att-class="page.element_class"> + </div> </t> </t> <t t-name="WidgetNotebook.tooltip"> @@ -909,9 +891,7 @@ </t> </t> <t t-name="WidgetNotebookPage"> - <div> - <t t-call="WidgetFrame"/> - </div> + <t t-call="WidgetFrame"/> </t> <t t-name="WidgetSeparator"> <div t-if="widget.orientation !== 'vertical'" t-att-class="'separator ' + widget.orientation"> @@ -1107,11 +1087,9 @@ <t t-name="FieldReference"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="oe_frame oe_forms"> <tr> - <td t-attf-class="oe_form_frame_cell oe_form_selection #{widget.selection.element_class}"> - <t t-raw="widget.selection.render()"/> + <td t-attf-class="oe_form_frame_cell oe_form_selection oe_form_view_reference_selection"> </td> - <td t-attf-class="oe_form_frame_cell oe_form_many2one #{widget.m2o.element_class}" nowrap="true" style="display: none"> - <t t-raw="widget.m2o.render()"/> + <td t-attf-class="oe_form_frame_cell oe_form_many2one oe_form_view_reference_m2o" nowrap="true" style="display: none"> </td> </tr> </table> @@ -1128,7 +1106,7 @@ </div> </t> <t t-name="FieldBinaryImage"> - <table cellpadding="0" cellspacing="0" border="0"> + <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td align="center"> <img t-att-src='_s + "/web/static/src/img/placeholder.png"' class="oe-binary-image" @@ -1523,21 +1501,20 @@ <td t-if="edited and !options.deletable" class="oe-listview-padding"/> </t> </t> -<t t-name="ListView.row.frame" t-extend="WidgetFrame"> - <t t-jquery="tr"> - $(document.createElement('t')) - .append(this.contents()) - .attr({ - 't-foreach': this.attr('t-foreach'), - 't-as': this.attr('t-as') - }) - .replaceAll(this) - .after($(document.createElement('td')).append( - $(document.createElement('button')).attr({ - 'class': 'oe-edit-row-save', 'type': 'button'}) - .html(' '))) - .unwrap(); +<t t-name="ListView.row.frame"> + <t 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-valign="td.table ? 'top' : undefined" + t-attf-class="oe_form_frame_cell #{td.classname} #{td.element_class} oe-field-cell" + > + <t t-raw="td.render()"/> + </td> + </t> </t> + <td> + <button class="oe-edit-row-save" type="button"> </button> + </td> </t> <t t-name="view_editor"> <table class="oe_view_editor"> |
