[CLEAN] Moved needaction html into a dedicated template.
bzr revid: tde@openerp.com-20121129161428-usvgdoykg0g0etr7
This commit is contained in:
parent
f0087538ac
commit
0de15c9bbf
|
@ -847,7 +847,7 @@ instance.web.Menu = instance.web.Widget.extend({
|
|||
var $item = self.$secondary_menus.find('a[data-menu="' + menu_id + '"]');
|
||||
$item.remove('oe_menu_counter');
|
||||
if (item.needaction_counter && item.needaction_counter > 0) {
|
||||
$item.append('<div class="oe_tag oe_tag_dark oe_menu_counter">' + item.needaction_counter + '</div>');
|
||||
$item.append(QWeb.render("Menu.needaction_counter", { widget : item }));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -388,14 +388,16 @@
|
|||
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"/>
|
||||
<t t-if="menu.needaction_enabled and menu.needaction_counter">
|
||||
<div class="oe_tag oe_tag_dark oe_menu_counter">
|
||||
<t t-if="menu.needaction_counter > 99"> 99+ </t><t t-if="menu.needaction_counter <= 99"> <t t-esc="menu.needaction_counter"/> </t>
|
||||
</div>
|
||||
</t>
|
||||
</a>
|
||||
</t>
|
||||
|
||||
<t t-name="Menu.needaction_counter">
|
||||
<div class="oe_tag oe_tag_dark oe_menu_counter">
|
||||
<t t-if="widget.needaction_counter > 99"> 99+ </t>
|
||||
<t t-if="widget.needaction_counter <= 99"> <t t-esc="widget.needaction_counter"/> </t>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="UserMenu">
|
||||
<span class="oe_user_menu oe_topbar_item oe_dropdown_toggle oe_dropdown_arrow">
|
||||
<img class="oe_topbar_avatar" t-att-data-default-src="_s + '/web/static/src/img/user_menu_avatar.png'"/>
|
||||
|
|
Loading…
Reference in New Issue