Make notify options variadic

It opens for extensions.
The implemented options now allow to configure the name and the icon of
the link for the action. Addons could easily add new features as the
arguments are no longer predefined, they'll all be available in the
'options' dictionary.
This commit is contained in:
Guewen Baconnier
2018-06-27 22:45:55 +02:00
committed by Yannick Vaucher
parent bf7fda1980
commit 4fd13e22da
5 changed files with 41 additions and 34 deletions

View File

@@ -12,7 +12,11 @@
<t t-name="Notification.do_action">
<div class="o_notification_action" t-if="widget.options.action">
<a href="#" class="o_notification_do_action">
<span class="fa fa-arrow-circle-left"/> Open
<span t-att-class="'fa ' + (widget.options.action_fa_icon ? widget.options.action_fa_icon : 'fa-arrow-circle-left')"/>
<t t-if="widget.options.action_link_name">
<t t-esc="widget.options.action_link_name"/>
</t>
<t t-else="">Open</t>
</a>
</div>
</t>