Merge pull request #10530 from nextcloud/bugfix/10528/public-template
Fix issues when using the public layout without a PublicTemplateResponse
This commit is contained in:
commit
f67d942fad
|
@ -40,6 +40,11 @@
|
||||||
min-height: calc(100vh - 160px);
|
min-height: calc(100vh - 160px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** don't apply content header padding on the base layout */
|
||||||
|
&.layout-base #content {
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* force layout to make sure the content element's height matches its contents' height */
|
/* force layout to make sure the content element's height matches its contents' height */
|
||||||
.ie #content {
|
.ie #content {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<?php emit_script_loading_tags($_); ?>
|
<?php emit_script_loading_tags($_); ?>
|
||||||
<?php print_unescaped($_['headers']); ?>
|
<?php print_unescaped($_['headers']); ?>
|
||||||
</head>
|
</head>
|
||||||
<body id="body-public">
|
<body id="body-public" class="layout-base">
|
||||||
<?php include 'layout.noscript.warning.php'; ?>
|
<?php include 'layout.noscript.warning.php'; ?>
|
||||||
<div id="content" class="app-public" role="main">
|
<div id="content" class="app-public" role="main">
|
||||||
<?php print_unescaped($_['content']); ?>
|
<?php print_unescaped($_['content']); ?>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" >
|
<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">
|
<meta charset="utf-8">
|
||||||
<title>
|
<title>
|
||||||
<?php
|
<?php
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
<meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>">
|
<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-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<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="mobile-web-app-capable" content="yes">
|
||||||
<meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>">
|
<meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>">
|
||||||
<link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>">
|
<link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>">
|
||||||
|
@ -30,22 +30,22 @@
|
||||||
<div id="notification-container">
|
<div id="notification-container">
|
||||||
<div id="notification"></div>
|
<div id="notification"></div>
|
||||||
</div>
|
</div>
|
||||||
<header id="header" class="<?php p($_['header-classes']); ?>">
|
<header id="header">
|
||||||
<div class="header-left">
|
<div class="header-left">
|
||||||
<span id="nextcloud">
|
<span id="nextcloud">
|
||||||
<div class="logo logo-icon svg"></div>
|
<div class="logo logo-icon svg"></div>
|
||||||
<h1 class="header-appname">
|
<h1 class="header-appname">
|
||||||
<?php p($template->getHeaderTitle()); ?>
|
<?php if (isset($template)) { p($template->getHeaderTitle()); } else { p($theme->getName());} ?>
|
||||||
</h1>
|
</h1>
|
||||||
<div class="header-shared-by">
|
<div class="header-shared-by">
|
||||||
<?php p($template->getHeaderDetails()) ?>
|
<?php if (isset($template)) { p($template->getHeaderDetails()); } ?>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/** @var \OCP\AppFramework\Http\Template\PublicTemplateResponse $template */
|
/** @var \OCP\AppFramework\Http\Template\PublicTemplateResponse $template */
|
||||||
if($template->getActionCount() !== 0) {
|
if(isset($template) && $template->getActionCount() !== 0) {
|
||||||
$primary = $template->getPrimaryAction();
|
$primary = $template->getPrimaryAction();
|
||||||
$others = $template->getOtherActions();
|
$others = $template->getOtherActions();
|
||||||
?>
|
?>
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
<div id="content" class="app-<?php p($_['appid']) ?>" role="main">
|
<div id="content" class="app-<?php p($_['appid']) ?>" role="main">
|
||||||
<?php print_unescaped($_['content']); ?>
|
<?php print_unescaped($_['content']); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php if($template->getFooterVisible()) { ?>
|
<?php if(isset($template) && $template->getFooterVisible()) { ?>
|
||||||
<footer>
|
<footer>
|
||||||
<p class="info"><?php print_unescaped($theme->getLongFooter()); ?></p>
|
<p class="info"><?php print_unescaped($theme->getLongFooter()); ?></p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
Loading…
Reference in New Issue