From eece6b7f0fe37507a87c9ab2ea501ecf5cad43b9 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Mon, 13 Feb 2023 12:43:22 +0530 Subject: [PATCH] Minor changes --- .../default/sass/controllers/_order.sass | 4 + admin/themes/default/template/alerts.tpl | 87 +++++++++++++++++ ...cuments.tpl => _booking_document_line.tpl} | 9 +- ...ments.tpl => _booking_documents_modal.tpl} | 31 ++++-- .../template/controllers/orders/_errors.tpl | 33 ------- admin/themes/default/template/layout.tpl | 64 +------------ controllers/admin/AdminOrdersController.php | 16 ++-- js/admin/orders.js | 95 +++++++++++-------- .../classes/HotelBookingDocument.php | 16 +--- 9 files changed, 182 insertions(+), 173 deletions(-) create mode 100644 admin/themes/default/template/alerts.tpl rename admin/themes/default/template/controllers/orders/{_booking_documents.tpl => _booking_document_line.tpl} (90%) rename admin/themes/default/template/controllers/orders/{modal_booking_documents.tpl => _booking_documents_modal.tpl} (73%) delete mode 100644 admin/themes/default/template/controllers/orders/_errors.tpl diff --git a/admin/themes/default/sass/controllers/_order.sass b/admin/themes/default/sass/controllers/_order.sass index b0b52d613..2bf932b9b 100644 --- a/admin/themes/default/sass/controllers/_order.sass +++ b/admin/themes/default/sass/controllers/_order.sass @@ -4,12 +4,16 @@ #customization_list border: 0px +<<<<<<< HEAD .booking_occupancy .booking_occupancy_wrapper max-height: 250px overflow-x: auto #modal-booking-documents +======= +#booking-documents-modal +>>>>>>> Minor changes .documents-list table tbody diff --git a/admin/themes/default/template/alerts.tpl b/admin/themes/default/template/alerts.tpl new file mode 100644 index 000000000..2d4e3973e --- /dev/null +++ b/admin/themes/default/template/alerts.tpl @@ -0,0 +1,87 @@ +{* +* 2007-2017 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2017 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($conf)} +
+
+ + {$conf} +
+
+{/if} +{if isset($errors) && count($errors) && current($errors) != '' && (!isset($disableDefaultErrorOutPut) || $disableDefaultErrorOutPut == false)} +
+
+ + {if count($errors) == 1} + {reset($errors)} + {else } + {l s='%d errors' sprintf=$errors|count} +
+
    + {foreach $errors as $error} +
  1. {$error}
  2. + {/foreach} +
+ {/if} +
+
+{/if} +{if isset($informations) && count($informations) && $informations} +
+
+ +
    + {foreach $informations as $info} +
  • {$info}
  • + {/foreach} +
+
+
+{/if} +{if isset($confirmations) && count($confirmations) && $confirmations} +
+
+ {foreach $confirmations as $conf} + {$conf} + {/foreach} +
+
+{/if} +{if isset($warnings) && count($warnings)} +
+
+ + {if count($warnings) > 1} +

{l s='There are %d warnings:' sprintf=count($warnings)}

+ {/if} +
    + {foreach $warnings as $warning} +
  • {$warning}
  • + {/foreach} +
+
+
+{/if} diff --git a/admin/themes/default/template/controllers/orders/_booking_documents.tpl b/admin/themes/default/template/controllers/orders/_booking_document_line.tpl similarity index 90% rename from admin/themes/default/template/controllers/orders/_booking_documents.tpl rename to admin/themes/default/template/controllers/orders/_booking_document_line.tpl index c3121ad42..9411ae1b8 100644 --- a/admin/themes/default/template/controllers/orders/_booking_documents.tpl +++ b/admin/themes/default/template/controllers/orders/_booking_document_line.tpl @@ -20,7 +20,6 @@ {if is_array($booking_documents) && count($booking_documents)} {foreach from=$booking_documents item=booking_document} - {$booking_document.title} {if $booking_document.file_type == HotelBookingDocument::FILE_TYPE_IMAGE} @@ -30,6 +29,7 @@ {/if} + {$booking_document.title} {dateFormat date=$booking_document.date_add full=1} @@ -43,6 +43,11 @@ {/foreach} {else} - {l s='No documents uploaded yet.'} + +
+ + {l s='No documents uploaded yet.'} +
+ {/if} diff --git a/admin/themes/default/template/controllers/orders/modal_booking_documents.tpl b/admin/themes/default/template/controllers/orders/_booking_documents_modal.tpl similarity index 73% rename from admin/themes/default/template/controllers/orders/modal_booking_documents.tpl rename to admin/themes/default/template/controllers/orders/_booking_documents_modal.tpl index 95866e83d..d62524b3f 100644 --- a/admin/themes/default/template/controllers/orders/modal_booking_documents.tpl +++ b/admin/themes/default/template/controllers/orders/_booking_documents_modal.tpl @@ -20,13 +20,13 @@