Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make logo in header clickable in the shared file view #40439

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions core/templates/layout.public.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,22 @@

<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()); ?>
Expand Down
4 changes: 4 additions & 0 deletions lib/private/TemplateLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ public function __construct($renderAs, $appId = '') {
$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);
Expand Down
Loading