[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Administrator 5 * @subpackage Templates.Atum 6 * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> 7 * @license GNU General Public License version 2 or later; see LICENSE.txt 8 * @since 4.0.0 9 */ 10 11 defined('_JEXEC') or die; 12 13 use Joomla\CMS\Factory; 14 use Joomla\CMS\HTML\HTMLHelper; 15 use Joomla\CMS\Language\Text; 16 use Joomla\CMS\Layout\LayoutHelper; 17 use Joomla\CMS\Uri\Uri; 18 19 /** @var \Joomla\CMS\Document\ErrorDocument $this */ 20 21 $app = Factory::getApplication(); 22 $input = $app->input; 23 $wa = $this->getWebAssetManager(); 24 25 // Detecting Active Variables 26 $option = $input->get('option', ''); 27 $view = $input->get('view', ''); 28 $layout = $input->get('layout', 'default'); 29 $task = $input->get('task', 'display'); 30 31 // Browsers support SVG favicons 32 $this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']); 33 $this->addHeadLink(HTMLHelper::_('image', 'favicon.ico', '', [], true, 1), 'alternate icon', 'rel', ['type' => 'image/vnd.microsoft.icon']); 34 $this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon-pinned.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#000']); 35 36 // Template params 37 $logoBrandLarge = $this->params->get('logoBrandLarge') 38 ? Uri::root() . htmlspecialchars($this->params->get('logoBrandLarge'), ENT_QUOTES) 39 : Uri::root() . 'media/templates/administrator/atum/images/logos/brand-large.svg'; 40 $loginLogo = $this->params->get('loginLogo') 41 ? Uri::root() . $this->params->get('loginLogo') 42 : Uri::root() . 'media/templates/administrator/atum/images/logos/login.svg'; 43 $logoBrandSmall = $this->params->get('logoBrandSmall') 44 ? Uri::root() . htmlspecialchars($this->params->get('logoBrandSmall'), ENT_QUOTES) 45 : Uri::root() . 'media/templates/administrator/atum/images/logos/brand-small.svg'; 46 47 $logoBrandLargeAlt = empty($this->params->get('logoBrandLargeAlt')) && empty($this->params->get('emptyLogoBrandLargeAlt')) 48 ? 'alt=""' 49 : 'alt="' . htmlspecialchars($this->params->get('logoBrandLargeAlt'), ENT_COMPAT, 'UTF-8') . '"'; 50 $logoBrandSmallAlt = empty($this->params->get('logoBrandSmallAlt')) && empty($this->params->get('emptyLogoBrandSmallAlt')) 51 ? 'alt=""' 52 : 'alt="' . htmlspecialchars($this->params->get('logoBrandSmallAlt'), ENT_COMPAT, 'UTF-8') . '"'; 53 $loginLogoAlt = empty($this->params->get('loginLogoAlt')) && empty($this->params->get('emptyLoginLogoAlt')) 54 ? 'alt=""' 55 : 'alt="' . htmlspecialchars($this->params->get('loginLogoAlt'), ENT_COMPAT, 'UTF-8') . '"'; 56 57 // Get the hue value 58 preg_match('#^hsla?\(([0-9]+)[\D]+([0-9]+)[\D]+([0-9]+)[\D]+([0-9](?:.\d+)?)?\)$#i', $this->params->get('hue', 'hsl(214, 63%, 20%)'), $matches); 59 60 // Enable assets 61 $wa->usePreset('template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')) 62 ->useStyle('template.active.language') 63 ->useStyle('template.user') 64 ->addInlineStyle(':root { 65 --hue: ' . $matches[1] . '; 66 --template-bg-light: ' . $this->params->get('bg-light', '#f0f4fb') . '; 67 --template-text-dark: ' . $this->params->get('text-dark', '#495057') . '; 68 --template-text-light: ' . $this->params->get('text-light', '#ffffff') . '; 69 --template-link-color: ' . $this->params->get('link-color', '#2a69b8') . '; 70 --template-special-color: ' . $this->params->get('special-color', '#001B4C') . '; 71 }'); 72 73 // Override 'template.active' asset to set correct ltr/rtl dependency 74 $wa->registerStyle('template.active', '', [], [], ['template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')]); 75 76 // Set some meta data 77 $this->setMetaData('viewport', 'width=device-width, initial-scale=1'); 78 79 $monochrome = (bool) $this->params->get('monochrome'); 80 81 // @see administrator/templates/atum/html/layouts/status.php 82 $statusModules = LayoutHelper::render('status', ['modules' => 'status']); 83 ?> 84 <!DOCTYPE html> 85 <html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>"> 86 <head> 87 <jdoc:include type="metas" /> 88 <jdoc:include type="styles" /> 89 <jdoc:include type="scripts" /> 90 </head> 91 92 <body class="admin <?php echo $option . ' view-' . $view . ' layout-' . $layout . ($task ? ' task-' . $task : '') . ($monochrome ? ' monochrome' : ''); ?>"> 93 94 <noscript> 95 <div class="alert alert-danger" role="alert"> 96 <?php echo Text::_('JGLOBAL_WARNJAVASCRIPT'); ?> 97 </div> 98 </noscript> 99 100 <header id="header" class="header d-flex"> 101 <div class="header-title d-flex"> 102 <div class="d-flex align-items-center"> 103 <div class="logo"> 104 <img src="<?php echo $logoBrandLarge; ?>" <?php echo $logoBrandLargeAlt; ?>> 105 <img class="logo-collapsed" src="<?php echo $logoBrandSmall; ?>" <?php echo $logoBrandSmallAlt; ?>> 106 </div> 107 </div> 108 <jdoc:include type="modules" name="title" /> 109 </div> 110 <?php echo $statusModules; ?> 111 </header> 112 113 <div id="wrapper" class="d-flex wrapper"> 114 <div class="container-fluid container-main"> 115 <section id="content" class="content h-100"> 116 <main class="d-flex justify-content-center align-items-center h-100"> 117 <div id="element-box" class="card"> 118 <div class="card-body"> 119 <div class="main-brand d-flex align-items-center justify-content-center"> 120 <img src="<?php echo $loginLogo; ?>" <?php echo $loginLogoAlt; ?>> 121 </div> 122 <h1><?php echo Text::_('JERROR_AN_ERROR_HAS_OCCURRED'); ?></h1> 123 <jdoc:include type="message" /> 124 <blockquote class="blockquote"> 125 <span class="badge bg-secondary"><?php echo $this->error->getCode(); ?></span> 126 <?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?> 127 </blockquote> 128 <?php if ($this->debug) : ?> 129 <div> 130 <?php echo $this->renderBacktrace(); ?> 131 <?php // Check if there are more Exceptions and render their data as well ?> 132 <?php if ($this->error->getPrevious()) : ?> 133 <?php $loop = true; ?> 134 <?php // Reference $this->_error here and in the loop as setError() assigns errors to this property and we need this for the backtrace to work correctly ?> 135 <?php // Make the first assignment to setError() outside the loop so the loop does not skip Exceptions ?> 136 <?php $this->setError($this->_error->getPrevious()); ?> 137 <?php while ($loop === true) : ?> 138 <p><strong><?php echo Text::_('JERROR_LAYOUT_PREVIOUS_ERROR'); ?></strong></p> 139 <p><?php echo htmlspecialchars($this->_error->getMessage(), ENT_QUOTES, 'UTF-8'); ?></p> 140 <?php echo $this->renderBacktrace(); ?> 141 <?php $loop = $this->setError($this->_error->getPrevious()); ?> 142 <?php endwhile; ?> 143 <?php // Reset the main error object to the base error ?> 144 <?php $this->setError($this->error); ?> 145 <?php endif; ?> 146 </div> 147 <?php endif; ?> 148 </div> 149 </div> 150 </main> 151 </section> 152 </div> 153 154 <div id="sidebar-wrapper" class="sidebar-wrapper"> 155 <div id="main-brand" class="main-brand"> 156 <h1><?php echo $app->get('sitename'); ?></h1> 157 <a href="<?php echo Uri::root(); ?>"><?php echo Text::_('TPL_ATUM_LOGIN_SIDEBAR_VIEW_WEBSITE'); ?></a> 158 </div> 159 <div id="sidebar"> 160 <jdoc:include type="modules" name="sidebar" style="body" /> 161 </div> 162 </div> 163 </div> 164 <jdoc:include type="modules" name="debug" style="none" /> 165 </body> 166 </html>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |