From 527fa2f048f4a9de540eaa7b117d8b04085a7bb1 Mon Sep 17 00:00:00 2001 From: Shreesh Arora Date: Tue, 1 Oct 2024 20:00:08 +0530 Subject: [PATCH] update date display process --- .../controllers/carts/helpers/view/view.tpl | 3 ++- .../orders/_current_cart_details_data.tpl | 3 ++- .../template/controllers/orders/_overbookings.tpl | 3 ++- .../template/controllers/orders/_product_line.tpl | 3 ++- .../orders/_resolvable_overbookings.tpl | 3 ++- .../controllers/orders/helpers/view/view.tpl | 3 ++- .../orders/modals/_cancel_room_bookings.tpl | 3 ++- classes/controller/AdminController.php | 3 ++- classes/controller/Controller.php | 2 ++ classes/controller/FrontController.php | 4 +++- classes/module/Module.php | 14 +++++++------- classes/pdf/HTMLTemplateInvoice.php | 5 +++-- modules/blockcart/blockcart.php | 5 +++-- modules/blockcart/blockcart.tpl | 3 ++- .../helpers/view/_partials/booking-cart.tpl | 3 ++- .../helpers/view/_partials/booking-rooms.tpl | 9 ++++++--- .../order_refund_requests/helpers/view/view.tpl | 3 ++- .../_partials/order-room-detail.tpl | 5 +++-- themes/hotel-reservation-theme/global.tpl | 1 + .../modules/blockcart/blockcart.tpl | 3 ++- .../hotel-reservation-theme/order-confirmation.tpl | 5 +++-- themes/hotel-reservation-theme/order-detail.tpl | 3 ++- themes/hotel-reservation-theme/order-return.tpl | 3 ++- themes/hotel-reservation-theme/shopping-cart.tpl | 5 +++-- 24 files changed, 62 insertions(+), 35 deletions(-) diff --git a/admin/themes/default/template/controllers/carts/helpers/view/view.tpl b/admin/themes/default/template/controllers/carts/helpers/view/view.tpl index 630836734..41f4ee2fe 100644 --- a/admin/themes/default/template/controllers/carts/helpers/view/view.tpl +++ b/admin/themes/default/template/controllers/carts/helpers/view/view.tpl @@ -100,7 +100,8 @@ {$room['room_type_info'].hotel_name} - {dateFormat date=$room['date_from']} - {dateFormat date=$room['date_to']} + {assign var="is_full_date" value=($show_full_date && ($room['date_from']|date_format:'%D' == $room['date_to']|date_format:'%D'))} + {dateFormat date=$room['date_from'] full=$is_full_date} - {dateFormat date=$room['date_to'] full=$is_full_date} {if $room['adults']}{$room['adults']}{/if} {if $room['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if {$room['children']}}, {$room['children']} {if $room['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if} diff --git a/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl b/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl index f8490a33c..3bb29c765 100644 --- a/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl +++ b/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl @@ -51,7 +51,8 @@

{$data.room_type|escape:'html':'UTF-8'}

- {dateFormat date=$data.date_from} - {dateFormat date=$data.date_to} + {assign var="is_full_date" value=($show_full_date && ($data['date_from']|date_format:'%D' == $data['date_to']|date_format:'%D'))} + {dateFormat date=$data.date_from full=$is_full_date} - {dateFormat date=$data.date_to full=$is_full_date} {if $occupancy_required_for_booking}