summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/base.xml
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2015-08-28 16:32:31 +0200
committerRaphael Collet <rco@openerp.com>2015-08-31 12:07:41 +0200
commit80e5b4245a0ced2717a6e063d96ee10fb8ec469d (patch)
tree35752f47bf68bfc2840221c7e6c2859ef00a2744 /addons/web/static/src/xml/base.xml
parenta64c1b644f9014b236fdd51de9fe8fe32c220ecf (diff)
[IMP] web: make `boolean_button` more specific, and change label on hover
The widget now provide labels that depend on widget option "terminology". For each terminology, it provides four button labels that are shown depending on the field's value and hover status on the button.
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
-rw-r--r--addons/web/static/src/xml/base.xml11
1 files changed, 10 insertions, 1 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index cb698908cd8..dc448fbae2d 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -1436,6 +1436,15 @@
<img t-attf-src="#{_s}/web/static/src/img/icons/#{widget.icon}" t-att-alt="widget.string"/>
</button>
-<div t-name="BooleanButton" class="o_stat_info is_true"/>
+<t t-name="BooleanButton">
+ <t t-if="widget.get_value()">
+ <span class="o_stat_text text-success"><t t-esc="widget.string_true"/></span>
+ <span class="o_stat_text o_hover text-danger"><t t-esc="widget.hover_true"/></span>
+ </t>
+ <t t-if="!widget.get_value()">
+ <span class="o_stat_text text-danger"><t t-esc="widget.string_false"/></span>
+ <span class="o_stat_text o_hover text-success"><t t-esc="widget.hover_false"/></span>
+ </t>
+</t>
</templates>