Layout view file improvements

This commit is contained in:
Alex Tselegidis 2021-12-10 22:21:44 +01:00
parent 49ec1d1cae
commit 271be99f05
4 changed files with 103 additions and 83 deletions

View file

@ -12,42 +12,20 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#35A768"> <meta name="theme-color" content="#35A768">
<title><?= lang('login') ?> | Easy!Appointments</title>
<?php slot('meta') ?> <?php slot('meta') ?>
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/vendor/jquery-ui-dist/jquery-ui.min.css') ?>"> <title><?= lang('login') ?> | Easy!Appointments</title>
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/bootstrap.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/layouts/account_layout.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/general.css') ?>">
<link rel="icon" type="image/x-icon" href="<?= asset_url('assets/img/favicon.ico') ?>"> <link rel="icon" type="image/x-icon" href="<?= asset_url('assets/img/favicon.ico') ?>">
<link rel="icon" sizes="192x192" href="<?= asset_url('assets/img/logo.png') ?>"> <link rel="icon" sizes="192x192" href="<?= asset_url('assets/img/logo.png') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/vendor/jquery-ui-dist/jquery-ui.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/bootstrap.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/general.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/layouts/account_layout.css') ?>">
<?php slot('styles') ?> <?php slot('styles') ?>
<script src="<?= asset_url('assets/vendor/jquery/jquery.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/jquery-ui-dist/jquery-ui.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@popperjs-core/popper.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/bootstrap/bootstrap.min.js') ?>"></script>
<script>
var GlobalVariables = {
csrfToken: <?= json_encode($this->security->get_csrf_hash()) ?>,
baseUrl: <?= json_encode($base_url) ?>,
destUrl: <?= json_encode($dest_url) ?>,
AJAX_SUCCESS: 'SUCCESS',
AJAX_FAILURE: 'FAILURE'
};
var EALang = <?= json_encode($this->lang->language) ?>;
var availableLanguages = <?= json_encode(config('available_languages')) ?>;
$(function () {
GeneralFunctions.enableLanguageSelection($('#select-language'));
});
</script>
</head> </head>
<body> <body>
<div id="login-frame" class="frame-container"> <div id="login-frame" class="frame-container">
@ -62,6 +40,34 @@
</div> </div>
</div> </div>
<script src="<?= asset_url('assets/vendor/jquery/jquery.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/jquery-ui-dist/jquery-ui.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@popperjs-core/popper.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/bootstrap/bootstrap.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/moment/moment.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/moment-timezone/moment-timezone-with-data.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@fortawesome-fontawesome-free/fontawesome.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@fortawesome-fontawesome-free/solid.min.js') ?>"></script>
<script>
const GlobalVariables = {
csrfToken: <?= json_encode($this->security->get_csrf_hash()) ?>,
baseUrl: <?= json_encode($base_url) ?>,
destUrl: <?= json_encode($dest_url) ?>,
AJAX_SUCCESS: 'SUCCESS',
AJAX_FAILURE: 'FAILURE'
};
const EALang = <?= json_encode($this->lang->language) ?>;
const availableLanguages = <?= json_encode(config('available_languages')) ?>;
$(function () {
GeneralFunctions.enableLanguageSelection($('#select-language'));
});
</script>
<?php slot('scripts') ?> <?php slot('scripts') ?>
</body> </body>

View file

@ -1,54 +1,34 @@
<?php <?php
/** /**
* @var string $page_title * @var string $page_title
* @var string $page_path
* @var array $active_menu
* @var array $privileges
*/ */
?> ?>
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><?= $page_title ?? lang('backend_section') ?> | Easy!Appointments</title> <meta name="theme-color" content="#35A768">
<?php slot('meta') ?> <?php slot('meta') ?>
<title><?= $page_title ?? lang('backend_section') ?> | Easy!Appointments</title>
<link rel="icon" type="image/x-icon" href="<?= asset_url('assets/img/favicon.ico') ?>">
<link rel="icon" sizes="192x192" href="<?= asset_url('assets/img/logo.png') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/vendor/jquery-ui-dist/jquery-ui.min.css') ?>"> <link rel="stylesheet" type="text/css" href="<?= asset_url('assets/vendor/jquery-ui-dist/jquery-ui.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/vendor/trumbowyg/trumbowyg.min.css') ?>"> <link rel="stylesheet" type="text/css" href="<?= asset_url('assets/vendor/trumbowyg/trumbowyg.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/vendor/select2/select2.min.css') ?>"> <link rel="stylesheet" type="text/css" href="<?= asset_url('assets/vendor/select2/select2.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/bootstrap.css') ?>"> <link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/bootstrap.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/layouts/backend_layout.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/general.css') ?>"> <link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/general.css') ?>">
<link rel="icon" type="image/x-icon" href="<?= asset_url('assets/img/favicon.ico') ?>"> <link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/layouts/backend_layout.css') ?>">
<link rel="icon" sizes="192x192" href="<?= asset_url('assets/img/logo.png') ?>">
<?php slot('styles') ?> <?php slot('styles') ?>
<script>
// Global JavaScript Variables - Used in all backend pages.
var availableLanguages = <?= json_encode(config('available_languages')) ?>;
var EALang = <?= json_encode($this->lang->language) ?>;
</script>
<script src="<?= asset_url('assets/vendor/jquery/jquery.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@popperjs-core/popper.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/bootstrap/bootstrap.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/tippy.js/tippy-bundle.umd.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/jquery-ui-dist/jquery-ui.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/moment/moment.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/moment-timezone/moment-timezone-with-data.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/trumbowyg/trumbowyg.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/select2/select2.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@fortawesome-fontawesome-free/fontawesome.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@fortawesome-fontawesome-free/solid.min.js') ?>"></script>
</head> </head>
<body> <body>
<script src="<?= asset_url('assets/js/layouts/backend.js') ?>"></script>
<script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script>
<?php require 'backend_header.php' ?> <?php require 'backend_header.php' ?>
@ -56,6 +36,27 @@
<?php require 'backend_footer.php' ?> <?php require 'backend_footer.php' ?>
<script>
const EALang = <?= json_encode($this->lang->language) ?>;
const availableLanguages = <?= json_encode(config('available_languages')) ?>;
</script>
<script src="<?= asset_url('assets/vendor/jquery/jquery.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/jquery-ui-dist/jquery-ui.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@popperjs-core/popper.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/bootstrap/bootstrap.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/moment/moment.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/moment-timezone/moment-timezone-with-data.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@fortawesome-fontawesome-free/fontawesome.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@fortawesome-fontawesome-free/solid.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/tippy.js/tippy-bundle.umd.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/trumbowyg/trumbowyg.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/select2/select2.min.js') ?>"></script>
<script src="<?= asset_url('assets/js/layouts/backend.js') ?>"></script>
<script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script>
<?php slot('scripts') ?> <?php slot('scripts') ?>
</body> </body>
</html> </html>

View file

@ -11,15 +11,13 @@
* @var array $customer_data * @var array $customer_data
* @var array $available_services * @var array $available_services
* @var array $available_providers * @var array $available_providers
* @var array $show_field
* @var bool $require_phone_number
* @var string $display_any_provider * @var string $display_any_provider
* @var string $display_terms_and_conditions * @var string $display_terms_and_conditions
* @var string $display_privacy_policy * @var string $display_privacy_policy
* @var string $display_cookie_notice * @var string $display_cookie_notice
* @var string $page_path
*/ */
?> ?>
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
@ -27,19 +25,19 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#35A768"> <meta name="theme-color" content="#35A768">
<title><?= lang('page_title') . ' ' . $company_name ?></title>
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/vendor/jquery-ui-dist/jquery-ui.min.css') ?>"> <?php slot('meta') ?>
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/vendor/cookieconsent/cookieconsent.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/bootstrap.css') ?>"> <title><?= lang('page_title') . ' ' . $company_name ?> | Easy!Appointments</title>
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/layouts/booking_layout.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/general.css') ?>">
<link rel="icon" type="image/x-icon" href="<?= asset_url('assets/img/favicon.ico') ?>"> <link rel="icon" type="image/x-icon" href="<?= asset_url('assets/img/favicon.ico') ?>">
<link rel="icon" sizes="192x192" href="<?= asset_url('assets/img/logo.png') ?>"> <link rel="icon" sizes="192x192" href="<?= asset_url('assets/img/logo.png') ?>">
<script src="<?= asset_url('assets/vendor/@fortawesome-fontawesome-free/fontawesome.min.js') ?>"></script> <link rel="stylesheet" type="text/css" href="<?= asset_url('assets/vendor/jquery-ui-dist/jquery-ui.min.css') ?>">
<script src="<?= asset_url('assets/vendor/@fortawesome-fontawesome-free/solid.min.js') ?>"></script> <link rel="stylesheet" type="text/css" href="<?= asset_url('assets/vendor/cookieconsent/cookieconsent.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/bootstrap.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/general.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/layouts/booking_layout.css') ?>">
</head> </head>
<body> <body>
@ -70,7 +68,7 @@
<?php endif ?> <?php endif ?>
<script> <script>
var GlobalVariables = { const GlobalVariables = {
availableServices: <?= json_encode($available_services) ?>, availableServices: <?= json_encode($available_services) ?>,
availableProviders: <?= json_encode($available_providers) ?>, availableProviders: <?= json_encode($available_providers) ?>,
baseUrl: <?= json_encode(config('base_url')) ?>, baseUrl: <?= json_encode(config('base_url')) ?>,
@ -87,8 +85,9 @@
csrfToken: <?= json_encode($this->security->get_csrf_hash()) ?> csrfToken: <?= json_encode($this->security->get_csrf_hash()) ?>
}; };
var EALang = <?= json_encode($this->lang->language) ?>; const EALang = <?= json_encode($this->lang->language) ?>;
var availableLanguages = <?= json_encode(config('available_languages')) ?>;
const availableLanguages = <?= json_encode(config('available_languages')) ?>;
</script> </script>
<script src="<?= asset_url('assets/vendor/jquery/jquery.min.js') ?>"></script> <script src="<?= asset_url('assets/vendor/jquery/jquery.min.js') ?>"></script>
@ -96,9 +95,11 @@
<script src="<?= asset_url('assets/vendor/cookieconsent/cookieconsent.min.js') ?>"></script> <script src="<?= asset_url('assets/vendor/cookieconsent/cookieconsent.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@popperjs-core/popper.min.js') ?>"></script> <script src="<?= asset_url('assets/vendor/@popperjs-core/popper.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/bootstrap/bootstrap.min.js') ?>"></script> <script src="<?= asset_url('assets/vendor/bootstrap/bootstrap.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/tippy.js/tippy-bundle.umd.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/moment/moment.min.js') ?>"></script> <script src="<?= asset_url('assets/vendor/moment/moment.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/moment-timezone/moment-timezone-with-data.min.js') ?>"></script> <script src="<?= asset_url('assets/vendor/moment-timezone/moment-timezone-with-data.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@fortawesome-fontawesome-free/fontawesome.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@fortawesome-fontawesome-free/solid.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/tippy.js/tippy-bundle.umd.min.js') ?>"></script>
<script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script> <script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script>
<script src="<?= asset_url('assets/js/pages/frontend_book_api.js') ?>"></script> <script src="<?= asset_url('assets/js/pages/frontend_book_api.js') ?>"></script>
<script src="<?= asset_url('assets/js/pages/frontend_book.js') ?>"></script> <script src="<?= asset_url('assets/js/pages/frontend_book.js') ?>"></script>

View file

@ -1,9 +1,9 @@
<?php <?php
/** /**
* @var string $title * @var string $page_title
* @var array $global_variables
*/ */
?> ?>
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
@ -11,14 +11,19 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#35A768"> <meta name="theme-color" content="#35A768">
<link rel="icon" href="<?= asset_url('assets/img/favicon.ico') ?>">
<link rel="icon" href="<?= asset_url('assets/img/logo.png') ?>" sizes="192x192" type="image/png">
<title><?= $page_title ?> | Easy!Appointments</title>
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/bootstrap.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/layouts/booking_layout.css') ?>">
<?php slot('meta') ?> <?php slot('meta') ?>
<title><?= $page_title ?> | Easy!Appointments</title>
<link rel="icon" type="image/x-icon" href="<?= asset_url('assets/img/favicon.ico') ?>">
<link rel="icon" sizes="192x192" href="<?= asset_url('assets/img/logo.png') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/vendor/jquery-ui-dist/jquery-ui.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/bootstrap.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/general.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/layouts/booking_layout.css') ?>">
<?php slot('styles') ?> <?php slot('styles') ?>
</head> </head>
<body> <body>
@ -40,12 +45,19 @@
</div> </div>
<script> <script>
var EALang = <?= json_encode($this->lang->language) ?>; const EALang = <?= json_encode($this->lang->language) ?>;
</script> </script>
<script src="<?= asset_url('assets/vendor/jquery/jquery.min.js') ?>"></script> <script src="<?= asset_url('assets/vendor/jquery/jquery.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/jquery-ui-dist/jquery-ui.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@popperjs-core/popper.min.js') ?>"></script> <script src="<?= asset_url('assets/vendor/@popperjs-core/popper.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/bootstrap/bootstrap.min.js') ?>"></script> <script src="<?= asset_url('assets/vendor/bootstrap/bootstrap.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/moment/moment.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/moment-timezone/moment-timezone-with-data.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@fortawesome-fontawesome-free/fontawesome.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/@fortawesome-fontawesome-free/solid.min.js') ?>"></script>
<script src="<?= asset_url('assets/vendor/bootstrap/bootstrap.min.js') ?>"></script>
<script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script> <script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script>
<?php google_analytics_script() ?> <?php google_analytics_script() ?>