aboutsummaryrefslogtreecommitdiffstats
path: root/core/templates/layout.public.php
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-08-28 13:15:56 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-09-03 16:07:49 +0200
commit4d2556d4cf014edfc5c609dfff5c52e963979b93 (patch)
tree7a4f3e16a6bacdd863ba40f76a8884206064a0e9 /core/templates/layout.public.php
parent7b6c78c81d4bd5e280f370b95ca2746cd8693882 (diff)
downloadnextcloud-server-4d2556d4cf014edfc5c609dfff5c52e963979b93.tar.gz
nextcloud-server-4d2556d4cf014edfc5c609dfff5c52e963979b93.zip
refactor(IMenuAction): Make public menu actions use the new Vue UI
This removes custom rendering code an replaces it with the declarative menu actions. Also adjust the template to allow the Vue UI to mount. Custom entries still are possible. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'core/templates/layout.public.php')
-rw-r--r--core/templates/layout.public.php42
1 files changed, 8 insertions, 34 deletions
diff --git a/core/templates/layout.public.php b/core/templates/layout.public.php
index b470e9f02a8..d3c558ec04f 100644
--- a/core/templates/layout.public.php
+++ b/core/templates/layout.public.php
@@ -73,44 +73,18 @@ p($theme->getTitle());
</div>
<div class="header-end">
- <?php
-/** @var \OCP\AppFramework\Http\Template\PublicTemplateResponse $template */
-if (isset($template) && $template->getActionCount() !== 0) {
- $primary = $template->getPrimaryAction();
- $others = $template->getOtherActions(); ?>
- <span id="header-primary-action" class="<?php if ($template->getActionCount() === 1) {
- p($primary->getIcon());
- } ?>">
- <a href="<?php p($primary->getLink()); ?>" class="primary button">
- <span><?php p($primary->getLabel()) ?></span>
- </a>
- </span>
- <?php if ($template->getActionCount() > 1) { ?>
- <div id="header-secondary-action">
- <button id="header-actions-toggle" class="menutoggle icon-more-white"></button>
- <div id="header-actions-menu" class="popovermenu menu">
- <ul>
- <?php
- /** @var \OCP\AppFramework\Http\Template\IMenuAction $action */
- foreach ($others as $action) {
- print_unescaped($action->render());
- }
- ?>
- </ul>
- </div>
- </div>
- <?php } ?>
- <?php
-} ?>
+ <div id="public-page-menu"></div>
</div>
</header>
+
<main id="content" class="app-<?php p($_['appid']) ?>">
<h1 class="hidden-visually">
- <?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
- <?php p($template->getHeaderTitle()); ?>
- <?php } else { ?>
- <?php p($theme->getName()); ?>
- <?php } ?>
+ <?php
+ if (isset($template) && $template->getHeaderTitle() !== '') {
+ p($template->getHeaderTitle());
+ } else {
+ p($theme->getName());
+ } ?>
</h1>
<?php print_unescaped($_['content']); ?>
</main>