diff options
Diffstat (limited to 'addons/web/static/src/xml/notification.xml')
| -rw-r--r-- | addons/web/static/src/xml/notification.xml | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/addons/web/static/src/xml/notification.xml b/addons/web/static/src/xml/notification.xml index 592c3ee23b0..03ff4cd637b 100644 --- a/addons/web/static/src/xml/notification.xml +++ b/addons/web/static/src/xml/notification.xml @@ -4,23 +4,27 @@ <t t-name="Notification"> <div t-attf-class="toast o_notification #{widget.className}" role="alert" aria-live="assertive" aria-atomic="true"> - <div class="toast-header"> + <t t-set="closeButton"> + <button t-if="widget.sticky" type="button" + class="close o_notification_close" + data-dismiss="toast" aria-label="Close"> + <span class="d-inline" aria-hidden="true">&times;</span> + </button> + </t> + <div t-if="widget.title" class="toast-header"> <span t-attf-class="fa fa-2x mr-3 #{widget.icon} o_notification_icon" role="img" t-attf-aria-label="Notification #{widget.name}" t-attf-title="Notification #{widget.name}"/> <div class="d-flex align-items-center mr-auto font-weight-bold o_notification_title" t-raw="widget.title"/> - <button t-if="widget.sticky" type="button" - class="mb-1 close o_notification_close" - data-dismiss="toast" aria-label="Close"> - <span class="d-inline" aria-hidden="true">&times;</span> - </button> + <t t-raw="closeButton"/> </div> - <div t-if="widget.message or widget.subtitle or widget.buttons.length" class="toast-body"> + <div t-if="widget.message or widget.subtitle or widget.buttons.length" class="toast-body d-flex"> <strong t-if="widget.subtitle" t-raw="widget.subtitle" class="o_notification_subtitle"/> <div t-if="widget.message" t-raw="widget.message" - class="o_notification_content"/> + class="mr-auto o_notification_content"/> + <t t-if="!widget.title" t-raw="closeButton"/> <div t-if="widget.buttons.length" class="mt-2 o_notification_buttons"> <button t-foreach="widget.buttons" t-as="button" type="button" t-attf-class="btn #{button.primary ? 'btn-primary' : 'btn-secondary'}"> |
