aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Myakshin <molodchick@gmail.com>2023-09-15 18:08:12 +0300
committerKonstantin Myakshin <molodchick@gmail.com>2023-10-04 00:36:10 +0300
commit41370350f2c4c811cf04b72c44e34318feb2bbbf (patch)
treefcebeae4eed7c420a310d233aef096405c8d70b8
parentf934d23cf2a1b5446f38c8569fef5b1346130daf (diff)
downloadnextcloud-server-41370350f2c4c811cf04b72c44e34318feb2bbbf.tar.gz
nextcloud-server-41370350f2c4c811cf04b72c44e34318feb2bbbf.zip
Make logo in header clickable in the shared file view
Signed-off-by: Konstantin Myakshin <molodchick@gmail.com>
-rw-r--r--core/templates/layout.public.php14
-rw-r--r--lib/private/TemplateLayout.php4
2 files changed, 15 insertions, 3 deletions
diff --git a/core/templates/layout.public.php b/core/templates/layout.public.php
index e5329716cc7..eef140a1cd5 100644
--- a/core/templates/layout.public.php
+++ b/core/templates/layout.public.php
@@ -38,14 +38,22 @@ p($theme->getTitle());
<header id="header">
<div class="header-left">
- <div class="logo logo-icon svg"></div>
- <span id="nextcloud" class="header-appname">
+ <div id="nextcloud" class="header-appname">
+ <?php if ($_['logoUrl']): ?>
+ <a href="<?php print_unescaped($_['logoUrl']); ?>"
+ aria-label="<?php p($l->t('Go to %s', [$_['logoUrl']])); ?>">
+ <div class="logo logo-icon"></div>
+ </a>
+ <?php else: ?>
+ <div class="logo logo-icon"></div>
+ <?php endif; ?>
+
<?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
<?php p($template->getHeaderTitle()); ?>
<?php } else { ?>
<?php p($theme->getName()); ?>
<?php } ?>
- </span>
+ </div>
<?php if (isset($template) && $template->getHeaderDetails() !== '') { ?>
<div class="header-shared-by">
<?php p($template->getHeaderDetails()); ?>
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index cefa1f30876..e2504363257 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -189,6 +189,10 @@ class TemplateLayout extends \OC_Template {
$this->assign('appid', $appId);
$this->assign('bodyid', 'body-public');
+ // Set logo link target
+ $logoUrl = $this->config->getSystemValueString('logo_url', '');
+ $this->assign('logoUrl', $logoUrl);
+
/** @var IRegistry $subscription */
$subscription = \OCP\Server::get(IRegistry::class);
$showSimpleSignup = $this->config->getSystemValueBool('simpleSignUpLink.shown', true);