summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorPatrick Hoste <pko@odoo.com>2019-07-12 11:15:36 +0200
committerYannick Tivisse <yti@odoo.com>2019-07-12 13:01:36 +0200
commit02fbb737b96ab8e35123219db5cdcc008729953b (patch)
treea3f6bf911d9fc365c8a1e22d44950dc4f0cc1c37 /addons/web/static/src/xml
parentaf6787fedfc9eef8d5edc181a4a310338720d0e0 (diff)
[ADD] web: add a new ribbon widget (POC)
Purpose ======= The ribbon widget adds a ribbon on the top right of a form to make some status more visible. You have to specify the text attribute to show the text on the ribbon. You can also specify a bg_color attribute to color the background with a bootstrap background color class. Note: This is an ugly draft of the final widget, that is supposed to land in master in a few days. As this PR brings a lot of functional changes in several files, it has become quite difficult to maintain it over the days. The final responsive version will come with: https://www.odoo.com/web#id=2032621&action=333&active_id=965&model=project.task&view_type=form&menu_id=4720
Diffstat (limited to 'addons/web/static/src/xml')
-rw-r--r--addons/web/static/src/xml/ribbon.xml8
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/web/static/src/xml/ribbon.xml b/addons/web/static/src/xml/ribbon.xml
new file mode 100644
index 00000000000..f8d3efdbb72
--- /dev/null
+++ b/addons/web/static/src/xml/ribbon.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<template>
+
+ <t t-name="web.ribbon">
+ <span t-att-class="'badge badge-primary ' + (widget.bgColor ? widget.bgColor : 'bg-success')" style="position: absolute;"><t t-esc="widget.text"/></span>
+ </t>
+
+</template> \ No newline at end of file