mirror of
https://github.com/nextcloud/server.git
synced 2026-05-23 10:37:27 -04:00
fix(profile): clean up 404 profile template
Make messaging more consistent with the generic 404.php template. Refactor (clarity/modernize). Signed-off-by: Josh <josh.t.richards@gmail.com>
This commit is contained in:
parent
1219c8e152
commit
088437fe84
1 changed files with 16 additions and 7 deletions
|
|
@ -3,11 +3,14 @@
|
|||
* SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
/** @var array $_ */
|
||||
/** @var \OCP\IL10N $l */
|
||||
/** @var \OCP\Defaults $theme */
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
if (!isset($_)) { //standalone page is not supported anymore - redirect to /
|
||||
if (!isset($_)) {
|
||||
// Standalone access is not supported; redirect to the root.
|
||||
require_once '../../../lib/base.php';
|
||||
|
||||
$urlGenerator = \OCP\Server::get(\OCP\IURLGenerator::class);
|
||||
|
|
@ -15,16 +18,22 @@ if (!isset($_)) { //standalone page is not supported anymore - redirect to /
|
|||
exit;
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
$urlGenerator = \OCP\Server::get(\OCP\IURLGenerator::class);
|
||||
$backUrl = $urlGenerator->linkTo('', 'index.php');
|
||||
?>
|
||||
<?php if (isset($_['content'])) : ?>
|
||||
<?php print_unescaped($_['content']) ?>
|
||||
<?php else : ?>
|
||||
|
||||
<?php if (isset($_['content'])): ?>
|
||||
<?php print_unescaped($_['content']); ?>
|
||||
<?php else: ?>
|
||||
<div class="body-login-container update">
|
||||
<div class="icon-big icon-error"></div>
|
||||
<h2><?php p($l->t('Profile not found')); ?></h2>
|
||||
<p class="infogroup"><?php p($l->t('The profile does not exist.')); ?></p>
|
||||
<p><a class="button primary" href="<?php p(\OCP\Server::get(\OCP\IURLGenerator::class)->linkTo('', 'index.php')) ?>">
|
||||
<p class="infogroup"><?php p($l->t('The profile does not exist or is unavailable.')); ?></p>
|
||||
<p>
|
||||
<a class="button primary" href="<?php p($backUrl); ?>">
|
||||
<?php p($l->t('Back to %s', [$theme->getName()])); ?>
|
||||
</a></p>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
|
|
|||
Loading…
Reference in a new issue