Skip to content

Commit 92aa075

Browse files
authored
[4.0] fix position of Joomla button in Atum header (#33719)
* 🎨 apply indent same as login.php * 🗑️ removal comments just like login.php * 🚚 let wrapper start with html for container followed by sidebar. Just like in login.php * 🗑️ removal obsolete div with className header-inside * 🐛 add className d-flex to div with id = header. Solving alignment
1 parent c49846d commit 92aa075

File tree

3 files changed

+136
-152
lines changed

3 files changed

+136
-152
lines changed

administrator/templates/atum/error_full.php

Lines changed: 77 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,13 @@
8787

8888
<body class="admin <?php echo $option . ' view-' . $view . ' layout-' . $layout . ($task ? ' task-' . $task : '') . ($monochrome ? ' monochrome' : ''); ?>">
8989

90-
<noscript>
91-
<div class="alert alert-danger" role="alert">
92-
<?php echo Text::_('JGLOBAL_WARNJAVASCRIPT'); ?>
93-
</div>
94-
</noscript>
90+
<noscript>
91+
<div class="alert alert-danger" role="alert">
92+
<?php echo Text::_('JGLOBAL_WARNJAVASCRIPT'); ?>
93+
</div>
94+
</noscript>
9595

96-
<?php // Header ?>
97-
<header id="header" class="header">
98-
<div class="header-inside">
96+
<header id="header" class="header d-flex">
9997
<div class="header-title d-flex">
10098
<div class="d-flex align-items-center">
10199
<div class="logo">
@@ -106,93 +104,85 @@
106104
<jdoc:include type="modules" name="title" />
107105
</div>
108106
<?php echo $statusModules; ?>
109-
</div>
110-
</header>
111-
112-
<?php // Wrapper ?>
113-
<div id="wrapper" class="d-flex wrapper<?php echo $hiddenMenu ? '0' : ''; ?>">
114-
115-
<?php // Sidebar ?>
116-
<?php if (!$hiddenMenu) : ?>
117-
<button class="navbar-toggler toggler-burger collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebar-wrapper" aria-controls="sidebar-wrapper" aria-expanded="false" aria-label="<?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>">
118-
<span class="navbar-toggler-icon"></span>
119-
</button>
120-
121-
<div id="sidebar-wrapper" class="sidebar-wrapper sidebar-menu" <?php echo $hiddenMenu ? 'data-hidden="' . $hiddenMenu . '"' : ''; ?>>
122-
<div id="sidebarmenu">
123-
<div class="sidebar-toggle item item-level-1">
124-
<a id="menu-collapse" href="#" aria-label="<?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>">
125-
<span id="menu-collapse-icon" class="icon-toggle-off icon-fw" aria-hidden="true"></span>
126-
<span class="sidebar-item-title"><?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?></span>
127-
</a>
107+
</header>
108+
109+
<div id="wrapper" class="d-flex wrapper<?php echo $hiddenMenu ? '0' : ''; ?>">
110+
<div class="container-fluid container-main">
111+
<?php if (!$cpanel) : ?>
112+
<a class="btn btn-subhead d-md-none d-lg-none d-xl-none" data-bs-toggle="collapse"
113+
data-bs-target=".subhead-collapse"><?php echo Text::_('TPL_ATUM_TOOLBAR'); ?>
114+
<span class="icon-wrench"></span></a>
115+
<div id="subhead" class="subhead mb-3">
116+
<div id="container-collapse" class="container-collapse"></div>
117+
<div class="row">
118+
<div class="col-md-12">
119+
<jdoc:include type="modules" name="toolbar" style="none" />
120+
</div>
121+
</div>
128122
</div>
129-
<jdoc:include type="modules" name="menu" style="none" />
130-
</div>
131-
</div>
132-
<?php endif; ?>
133-
134-
<?php // container-fluid ?>
135-
<div class="container-fluid container-main">
136-
<?php if (!$cpanel) : ?>
137-
<?php // Subheader ?>
138-
<a class="btn btn-subhead d-md-none d-lg-none d-xl-none" data-bs-toggle="collapse"
139-
data-bs-target=".subhead-collapse"><?php echo Text::_('TPL_ATUM_TOOLBAR'); ?>
140-
<span class="icon-wrench"></span></a>
141-
<div id="subhead" class="subhead mb-3">
142-
<div id="container-collapse" class="container-collapse"></div>
123+
<?php endif; ?>
124+
<section id="content" class="content">
125+
<jdoc:include type="message" />
126+
<jdoc:include type="modules" name="top" style="xhtml" />
143127
<div class="row">
144128
<div class="col-md-12">
145-
<jdoc:include type="modules" name="toolbar" style="none" />
129+
<h1><?php echo Text::_('JERROR_AN_ERROR_HAS_OCCURRED'); ?></h1>
130+
<blockquote class="blockquote">
131+
<span class="badge bg-secondary"><?php echo $this->error->getCode(); ?></span>
132+
<?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>
133+
</blockquote>
134+
<?php if ($this->debug) : ?>
135+
<div>
136+
<?php echo $this->renderBacktrace(); ?>
137+
<?php // Check if there are more Exceptions and render their data as well ?>
138+
<?php if ($this->error->getPrevious()) : ?>
139+
<?php $loop = true; ?>
140+
<?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 ?>
141+
<?php // Make the first assignment to setError() outside the loop so the loop does not skip Exceptions ?>
142+
<?php $this->setError($this->_error->getPrevious()); ?>
143+
<?php while ($loop === true) : ?>
144+
<p><strong><?php echo Text::_('JERROR_LAYOUT_PREVIOUS_ERROR'); ?></strong></p>
145+
<p><?php echo htmlspecialchars($this->_error->getMessage(), ENT_QUOTES, 'UTF-8'); ?></p>
146+
<?php echo $this->renderBacktrace(); ?>
147+
<?php $loop = $this->setError($this->_error->getPrevious()); ?>
148+
<?php endwhile; ?>
149+
<?php // Reset the main error object to the base error ?>
150+
<?php $this->setError($this->error); ?>
151+
<?php endif; ?>
152+
</div>
153+
<?php endif; ?>
154+
<p>
155+
<a href="<?php echo $this->baseurl; ?>" class="btn btn-secondary">
156+
<span class="icon-dashboard" aria-hidden="true"></span>
157+
<?php echo Text::_('JGLOBAL_TPL_CPANEL_LINK_TEXT'); ?></a>
158+
</p>
146159
</div>
147-
</div>
148-
</div>
149-
<?php endif; ?>
150-
<section id="content" class="content">
151-
<?php // Begin Content ?>
152-
<jdoc:include type="message" />
153-
<jdoc:include type="modules" name="top" style="xhtml" />
154-
<div class="row">
155-
<div class="col-md-12">
156-
<h1><?php echo Text::_('JERROR_AN_ERROR_HAS_OCCURRED'); ?></h1>
157-
<blockquote class="blockquote">
158-
<span class="badge bg-secondary"><?php echo $this->error->getCode(); ?></span>
159-
<?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>
160-
</blockquote>
161-
<?php if ($this->debug) : ?>
162-
<div>
163-
<?php echo $this->renderBacktrace(); ?>
164-
<?php // Check if there are more Exceptions and render their data as well ?>
165-
<?php if ($this->error->getPrevious()) : ?>
166-
<?php $loop = true; ?>
167-
<?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 ?>
168-
<?php // Make the first assignment to setError() outside the loop so the loop does not skip Exceptions ?>
169-
<?php $this->setError($this->_error->getPrevious()); ?>
170-
<?php while ($loop === true) : ?>
171-
<p><strong><?php echo Text::_('JERROR_LAYOUT_PREVIOUS_ERROR'); ?></strong></p>
172-
<p><?php echo htmlspecialchars($this->_error->getMessage(), ENT_QUOTES, 'UTF-8'); ?></p>
173-
<?php echo $this->renderBacktrace(); ?>
174-
<?php $loop = $this->setError($this->_error->getPrevious()); ?>
175-
<?php endwhile; ?>
176-
<?php // Reset the main error object to the base error ?>
177-
<?php $this->setError($this->error); ?>
178-
<?php endif; ?>
179-
</div>
160+
161+
<?php if ($this->countModules('bottom')) : ?>
162+
<jdoc:include type="modules" name="bottom" style="xhtml" />
180163
<?php endif; ?>
181-
<p>
182-
<a href="<?php echo $this->baseurl; ?>" class="btn btn-secondary">
183-
<span class="icon-dashboard" aria-hidden="true"></span>
184-
<?php echo Text::_('JGLOBAL_TPL_CPANEL_LINK_TEXT'); ?></a>
185-
</p>
186164
</div>
165+
</section>
166+
</div>
187167

188-
<?php if ($this->countModules('bottom')) : ?>
189-
<jdoc:include type="modules" name="bottom" style="xhtml" />
190-
<?php endif; ?>
168+
<?php if (!$hiddenMenu) : ?>
169+
<button class="navbar-toggler toggler-burger collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebar-wrapper" aria-controls="sidebar-wrapper" aria-expanded="false" aria-label="<?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>">
170+
<span class="navbar-toggler-icon"></span>
171+
</button>
172+
173+
<div id="sidebar-wrapper" class="sidebar-wrapper sidebar-menu" <?php echo $hiddenMenu ? 'data-hidden="' . $hiddenMenu . '"' : ''; ?>>
174+
<div id="sidebarmenu">
175+
<div class="sidebar-toggle item item-level-1">
176+
<a id="menu-collapse" href="#" aria-label="<?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>">
177+
<span id="menu-collapse-icon" class="icon-toggle-off icon-fw" aria-hidden="true"></span>
178+
<span class="sidebar-item-title"><?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?></span>
179+
</a>
180+
</div>
181+
<jdoc:include type="modules" name="menu" style="none" />
182+
</div>
191183
</div>
192-
<?php // End Content ?>
193-
</section>
184+
<?php endif; ?>
194185
</div>
195-
</div>
196-
<jdoc:include type="modules" name="debug" style="none" />
186+
<jdoc:include type="modules" name="debug" style="none" />
197187
</body>
198188
</html>

administrator/templates/atum/error_login.php

Lines changed: 57 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,13 @@
9191

9292
<body class="admin <?php echo $option . ' view-' . $view . ' layout-' . $layout . ($task ? ' task-' . $task : '') . ($monochrome ? ' monochrome' : ''); ?>">
9393

94-
<noscript>
95-
<div class="alert alert-danger" role="alert">
96-
<?php echo Text::_('JGLOBAL_WARNJAVASCRIPT'); ?>
97-
</div>
98-
</noscript>
94+
<noscript>
95+
<div class="alert alert-danger" role="alert">
96+
<?php echo Text::_('JGLOBAL_WARNJAVASCRIPT'); ?>
97+
</div>
98+
</noscript>
9999

100-
<header id="header" class="header">
101-
<div class="header-inside">
100+
<header id="header" class="header d-flex">
102101
<div class="header-title d-flex">
103102
<div class="d-flex align-items-center">
104103
<div class="logo">
@@ -109,64 +108,59 @@
109108
<jdoc:include type="modules" name="title" />
110109
</div>
111110
<?php echo $statusModules; ?>
112-
</div>
113-
</header>
114-
115-
<div id="wrapper" class="d-flex wrapper">
116-
117-
<?php // Sidebar ?>
118-
<div id="sidebar-wrapper" class="sidebar-wrapper">
119-
<div id="main-brand" class="main-brand">
120-
<h1><?php echo $app->get('sitename'); ?></h1>
121-
<a href="<?php echo Uri::root(); ?>"><?php echo Text::_('TPL_ATUM_LOGIN_SIDEBAR_VIEW_WEBSITE'); ?></a>
122-
</div>
123-
<div id="sidebar">
124-
<jdoc:include type="modules" name="sidebar" style="body" />
125-
</div>
126-
</div>
127-
128-
<div class="container-fluid container-main">
129-
<section id="content" class="content h-100">
130-
<?php // Begin Content ?>
131-
<main class="d-flex justify-content-center align-items-center h-100">
132-
<div id="element-box" class="card">
133-
<div class="card-body">
134-
<div class="main-brand d-flex align-items-center justify-content-center">
135-
<img src="<?php echo $loginLogo; ?>" <?php echo $loginLogoAlt; ?>>
136-
</div>
137-
<h1><?php echo Text::_('JERROR_AN_ERROR_HAS_OCCURRED'); ?></h1>
138-
<jdoc:include type="message" />
139-
<blockquote class="blockquote">
140-
<span class="badge bg-secondary"><?php echo $this->error->getCode(); ?></span>
141-
<?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>
142-
</blockquote>
143-
<?php if ($this->debug) : ?>
144-
<div>
145-
<?php echo $this->renderBacktrace(); ?>
146-
<?php // Check if there are more Exceptions and render their data as well ?>
147-
<?php if ($this->error->getPrevious()) : ?>
148-
<?php $loop = true; ?>
149-
<?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 ?>
150-
<?php // Make the first assignment to setError() outside the loop so the loop does not skip Exceptions ?>
151-
<?php $this->setError($this->_error->getPrevious()); ?>
152-
<?php while ($loop === true) : ?>
153-
<p><strong><?php echo Text::_('JERROR_LAYOUT_PREVIOUS_ERROR'); ?></strong></p>
154-
<p><?php echo htmlspecialchars($this->_error->getMessage(), ENT_QUOTES, 'UTF-8'); ?></p>
155-
<?php echo $this->renderBacktrace(); ?>
156-
<?php $loop = $this->setError($this->_error->getPrevious()); ?>
157-
<?php endwhile; ?>
158-
<?php // Reset the main error object to the base error ?>
159-
<?php $this->setError($this->error); ?>
160-
<?php endif; ?>
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; ?>>
161121
</div>
162-
<?php endif; ?>
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>
163149
</div>
164-
</div>
165-
</main>
166-
<?php // End Content ?>
167-
</section>
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>
168163
</div>
169-
</div>
170-
<jdoc:include type="modules" name="debug" style="none" />
164+
<jdoc:include type="modules" name="debug" style="none" />
171165
</body>
172166
</html>

administrator/templates/atum/login.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
</head>
9696

9797
<body class="admin <?php echo $option . ' view-' . $view . ' layout-' . $layout . ($task ? ' task-' . $task : '') . ($monochrome ? ' monochrome' : ''); ?>">
98+
9899
<noscript>
99100
<div class="alert alert-danger" role="alert">
100101
<?php echo Text::_('JGLOBAL_WARNJAVASCRIPT'); ?>
@@ -104,7 +105,7 @@
104105
<?php echo Text::_('JGLOBAL_WARNIE'); ?>
105106
</div>
106107

107-
<header id="header" class="header">
108+
<header id="header" class="header d-flex">
108109
<div class="header-title d-flex">
109110
<div class="d-flex align-items-center">
110111
<div class="logo">
@@ -134,7 +135,6 @@
134135
</section>
135136
</div>
136137

137-
<?php // Sidebar ?>
138138
<div id="sidebar-wrapper" class="sidebar-wrapper px-3 pb-3">
139139
<div id="main-brand" class="main-brand">
140140
<h1><?php echo $app->get('sitename'); ?></h1>

0 commit comments

Comments
 (0)