summaryrefslogtreecommitdiffstats
path: root/core/templates
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-08-03 19:35:56 +0200
committerJulius Härtl <jus@bitgrid.net>2018-08-03 20:41:56 +0200
commit4f2013bd4084b8b08fb739fe2196ed5c8d0e4a48 (patch)
treeda6f9600647e673152f4795e60b8eee37ad9185c /core/templates
parentb4ea19c98149a19399934f9226b9db57d811e861 (diff)
downloadnextcloud-server-4f2013bd4084b8b08fb739fe2196ed5c8d0e4a48.tar.gz
nextcloud-server-4f2013bd4084b8b08fb739fe2196ed5c8d0e4a48.zip
Make public layout also usable without a PublicTemplateResponse
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/layout.public.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/templates/layout.public.php b/core/templates/layout.public.php
index d80aa6d7852..74ce43d4f88 100644
--- a/core/templates/layout.public.php
+++ b/core/templates/layout.public.php
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" >
-<head data-user="<?php p($_['user_uid']); ?>" data-user-displayname="<?php p($_['user_displayname']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>">
+<head data-requesttoken="<?php p($_['requesttoken']); ?>">
<meta charset="utf-8">
<title>
<?php
@@ -14,7 +14,7 @@
<meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
- <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid']!='files')? $_['application']:$theme->getTitle()); ?>">
+ <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid']!=='files')? $_['application']:$theme->getTitle()); ?>">
<meta name="mobile-web-app-capable" content="yes">
<meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>">
<link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>">
@@ -35,17 +35,17 @@
<span id="nextcloud">
<div class="logo logo-icon svg"></div>
<h1 class="header-appname">
- <?php p($template->getHeaderTitle()); ?>
+ <?php if (isset($template)) { p($template->getHeaderTitle()); } else { p($theme->getName());} ?>
</h1>
<div class="header-shared-by">
- <?php p($template->getHeaderDetails()) ?>
+ <?php if (isset($template)) { p($template->getHeaderDetails()); } ?>
</div>
</span>
</div>
<?php
/** @var \OCP\AppFramework\Http\Template\PublicTemplateResponse $template */
- if($template->getActionCount() !== 0) {
+ if(isset($template) && $template->getActionCount() !== 0) {
$primary = $template->getPrimaryAction();
$others = $template->getOtherActions();
?>
@@ -76,7 +76,7 @@
<div id="content" class="app-<?php p($_['appid']) ?>" role="main">
<?php print_unescaped($_['content']); ?>
</div>
- <?php if($template->getFooterVisible()) { ?>
+ <?php if(isset($template) && $template->getFooterVisible()) { ?>
<footer>
<p class="info"><?php print_unescaped($theme->getLongFooter()); ?></p>
</footer>