summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2018-03-05 09:54:40 +0100
committerAaron Bohy <aab@odoo.com>2018-03-05 13:15:08 +0100
commit24904d406c94266e037728be7bc405797bc2a721 (patch)
tree2700864ec1442a9c1daf0d03b103c7a003e5b503 /addons/web/static/src/xml
parenta86200597ff3e0a8fbbf3b9272f7a3b80b1f5bfe (diff)
[FIX] web: Calendar: control panel buttons in mobile
In mobile, we want a special 'Today' button to be displayed on the bottom right corner of the control panel. Rev. ebe58d92 enforces this by defining less layout rules on the control panel. However, those rules apply globally, for all control panels, not only in Calendar views. So it produces undesired behaviors in other views. This rev. removes the undesired less rules, and instead appends the 'Today' button in the pager area, which is in the bottom right corner.
Diffstat (limited to 'addons/web/static/src/xml')
-rw-r--r--addons/web/static/src/xml/web_calendar.xml15
1 files changed, 8 insertions, 7 deletions
diff --git a/addons/web/static/src/xml/web_calendar.xml b/addons/web/static/src/xml/web_calendar.xml
index ae9250d79e9..7f65ed93a08 100644
--- a/addons/web/static/src/xml/web_calendar.xml
+++ b/addons/web/static/src/xml/web_calendar.xml
@@ -63,13 +63,7 @@
<t t-name="CalendarView.buttons">
<div class="o_calendar_buttons">
- <t t-if="isMobile">
- <span class="fa-stack o_calendar_button_today">
- <i class="fa fa-calendar-o fa-stack-2x"></i>
- <strong class="o_calendar_text fa-stack-1x"><t t-esc="moment().date()"/></strong>
- </span>
- </t>
- <t t-else="">
+ <t t-if="!isMobile">
<button class="o_calendar_button_prev btn btn-sm btn-primary"><span class="fa fa-arrow-left"/></button>
<button class="o_calendar_button_today btn btn-sm btn-primary">Today</button>
<button class="o_calendar_button_next btn btn-sm btn-primary"><span class="fa fa-arrow-right"/></button>
@@ -82,6 +76,13 @@
</div>
</t>
+ <t t-name="CalendarView.TodayButtonMobile">
+ <span class="fa-stack o_calendar_button_today">
+ <i class="fa fa-calendar-o fa-stack-2x"></i>
+ <strong class="o_calendar_text fa-stack-1x"><t t-esc="moment().date()"/></strong>
+ </span>
+ </t>
+
<div t-name="CalendarView.quick_create" class="o_calendar_quick_create">
<div class="form-group">
<label for='name' class='control-label'>Summary:</label>