From d5fd531820bfd0b233f9e93c8a6b1c2725660fd0 Mon Sep 17 00:00:00 2001 From: Pablo Date: Mon, 28 Jan 2019 10:27:36 +0100 Subject: [PATCH] [WIP] Adjust styles --- hotel_calendar/models/bus_hotel_calendar.py | 2 +- .../models/inherited_hotel_reservation.py | 8 +- hotel_calendar/static/src/css/view.css | 51 ++++--- .../src/xml/hotel_calendar_templates.xml | 124 +++++++++--------- 4 files changed, 104 insertions(+), 81 deletions(-) diff --git a/hotel_calendar/models/bus_hotel_calendar.py b/hotel_calendar/models/bus_hotel_calendar.py index 4c4b809d2..cd07b9057 100644 --- a/hotel_calendar/models/bus_hotel_calendar.py +++ b/hotel_calendar/models/bus_hotel_calendar.py @@ -52,7 +52,7 @@ class BusHotelCalendar(models.TransientModel): 'real_dates': vals['real_dates'], }, 'tooltip': { - 'folio_name': vals['folio_id'], + 'folio_name': vals['folio_name'], 'name': vals['partner_name'], 'phone': vals['partner_phone'], 'email': vals['partner_email'], diff --git a/hotel_calendar/models/inherited_hotel_reservation.py b/hotel_calendar/models/inherited_hotel_reservation.py index 5d685e90d..b09828a82 100644 --- a/hotel_calendar/models/inherited_hotel_reservation.py +++ b/hotel_calendar/models/inherited_hotel_reservation.py @@ -95,7 +95,7 @@ class HotelReservation(models.Model): 'real_dates': [reserv['real_checkin'], reserv['real_checkout']]}) json_reservation_tooltips.update({ reserv['id']: { - 'folio_name': reserv['folio_id'], + 'folio_name': reserv['folio_name'], 'name': _('Out of service') if reserv['reservation_type'] == 'out' else reserv['partner_name'], @@ -119,8 +119,7 @@ class HotelReservation(models.Model): 'splitted': reserv['splitted'], 'channel_type': reserv['channel_type'], 'real_dates': [reserv['real_checkin'], reserv['real_checkout']], - # TODO: Add Board Services and Extra Service as Cradle, Bed, ... - 'board_service_name': reserv['board_service_name'], + 'board_service_name': reserv['board_service_name'] or _('No board services'), 'services': reserv['services'], } }) @@ -393,6 +392,7 @@ class HotelReservation(models.Model): 'title': ntitle, 'room_id': self.room_id.id, 'reserv_id': self.id, + 'folio_name': self.folio_id.name, 'partner_name': (self.closure_reason_id.name or _('Out of service')) if self.reservation_type == 'out' else self.partner_id.name, 'adults': self.adults, @@ -424,7 +424,7 @@ class HotelReservation(models.Model): or _('No reason given'), 'real_dates': [self.real_checkin, self.real_checkout], 'channel_type': self.channel_type, - 'board_service_name': self.board_service_room_id.hotel_board_service_id.name, + 'board_service_name': self.board_service_room_id.hotel_board_service_id.name or _('No board services'), 'services': [service.product_id.name for service in self.service_ids if service.product_id.show_in_calendar] or False, } diff --git a/hotel_calendar/static/src/css/view.css b/hotel_calendar/static/src/css/view.css index 9c99c8b43..d1acf6c89 100644 --- a/hotel_calendar/static/src/css/view.css +++ b/hotel_calendar/static/src/css/view.css @@ -224,36 +224,41 @@ input#bookings_search { text-overflow: ellipsis; } -/** TOOLTIPS **/ +/** POPOVER **/ .popover-content { font-family: Garuda, sans-serif; font-size: 12px; - padding: 9px; + padding: 0px; } .popover h1, .h1, h2, .h2, h3, .h3 { margin-top: 2px; margin-bottom: 0px; } .popover { - max-width: 550px; + max-width: 400px; border-radius: 0px; + padding: 0px; } .popover .container { max-width: 100%; } .popover .container p { - margin-top: 3px; + margin-top: 2px; margin-bottom: 0px; } -.popover header { - font-size: 1.3em; +.popover .container p.email { + word-wrap: break-word; } -.popover .fa-border { - padding: .25em; - border: solid 0.1em #777777; - border-radius: .2em; +.popover .container p.board { + margin-top: 0px; +} +.popover header { + font-size: 1.2em; } +.fa-2_5x { + font-size: 2.5em; +} .fa-text-inside { font-family: Garuda, sans-serif; font-size: 14px; @@ -262,10 +267,29 @@ input#bookings_search { padding-top: 3px; padding-bottom: 3px; } +/* custom styles for popover info */ +.circle { + width:35px; + height:35px; + border-radius:50px; + line-height:35px; + text-align:center; + color:#fff; + background:#777; + margin-right: .65em; +} + +.bg-gray-lighter { + background-color: #ddd; +} + /* Spacing in Bootstrap v4.0 */ .mt-3 { margin-top: 3px; } +.mt-5 { + margin-top: 5px; +} .mt-10 { margin-top: 10px !important; } @@ -286,11 +310,8 @@ input#bookings_search { .pb-10 { padding-bottom: 10px; } - -@media (min-width:0px) and (max-width: 1600px) { - /* .text-hidden-xs { - visibility: hidden; - } */ +.pr-0 { + padding-right: 0px; } /* WARNING: The .row-eq-height class uses CSS3's flexbox layout mode, diff --git a/hotel_calendar/static/src/xml/hotel_calendar_templates.xml b/hotel_calendar/static/src/xml/hotel_calendar_templates.xml index 0c67aa1d8..703a8a70a 100644 --- a/hotel_calendar/static/src/xml/hotel_calendar_templates.xml +++ b/hotel_calendar/static/src/xml/hotel_calendar_templates.xml @@ -109,50 +109,30 @@ - -
-
- + +
+
+ +
+

+
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
- - - - - - -

This reservation is part of splitted reservation. You can check it in the corresponding Folio.

-
+
+ +
+ +

+ + +

Adults:

+

Children:

-
+

Folio Pending

@@ -175,7 +155,7 @@
-
+