aboutsummaryrefslogtreecommitdiffstats
path: root/core/templates/layout.user.php
diff options
context:
space:
mode:
authorJulius Haertl <jus@bitgrid.net>2017-03-01 23:21:38 +0100
committerJulius Härtl <jus@bitgrid.net>2017-03-16 11:55:09 +0100
commit61dc78e6dc25f2a342fe523e50c41c557f3c6aca (patch)
tree28665afb3835d1cd43df9e827a55de86de377435 /core/templates/layout.user.php
parenta630e4629f2489e9d7678fbe6833cf926e2b968e (diff)
downloadnextcloud-server-61dc78e6dc25f2a342fe523e50c41c557f3c6aca.tar.gz
nextcloud-server-61dc78e6dc25f2a342fe523e50c41c557f3c6aca.zip
Fix menu issues
Signed-off-by: Julius Haertl <jus@bitgrid.net>
Diffstat (limited to 'core/templates/layout.user.php')
-rw-r--r--core/templates/layout.user.php95
1 files changed, 48 insertions, 47 deletions
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index fb7ceb408c5..8e88a07328f 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -61,6 +61,7 @@
<div id="appmenu">
<ul>
+ <?php $headerIconCount = 8; ?>
<?php foreach($_['headernavigation'] as $entry): ?>
<li data-id="<?php p($entry['id']); ?>">
<a href="<?php print_unescaped($entry['href']); ?>" tabindex="3"
@@ -73,7 +74,7 @@
</a>
</li>
<?php endforeach; ?>
- <?php if (count($_['navigation'])>4): ?>
+ <?php if (count($_['navigation'])>$headerIconCount): ?>
<li id="more-apps" class="menutoggle">
<a href="#">
<div class="icon-more-white"></div>
@@ -82,7 +83,7 @@
</a>
</li>
<?php endif; ?>
- <?php if (count($_['navigation'])<=4): ?>
+ <?php if (count($_['navigation'])<=$headerIconCount): ?>
<?php
/* show "More apps" link to app administration directly in app navigation, as last entry */
if(OC_User::isAdminUser(OC_User::getUser())):
@@ -103,6 +104,51 @@
</ul>
</div>
+ <nav role="navigation"><div id="navigation">
+ <div id="apps">
+ <ul>
+ <?php foreach($_['navigation'] as $entry): ?>
+ <?php if($entry['showInHeader']): ?>
+ <li data-id="<?php p($entry['id']); ?>" class="in-header">
+ <?php else: ?>
+ <li data-id="<?php p($entry['id']); ?>">
+ <?php endif; ?>
+ <a href="<?php print_unescaped($entry['href']); ?>" tabindex="3"
+ <?php if( $entry['active'] ): ?> class="active"<?php endif; ?>>
+ <svg width="32" height="32" viewBox="0 0 32 32">
+ <defs><filter id="invert"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs>
+ <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert)" xlink:href="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" class="app-icon"></image>
+ </svg>
+ <div class="icon-loading-dark" style="display:none;"></div>
+ <span>
+ <?php p($entry['name']); ?>
+ </span>
+ </a>
+ </li>
+ <?php endforeach; ?>
+ <?php
+ /* show "More apps" link to app administration directly in app navigation, as last entry */
+ if(OC_User::isAdminUser(OC_User::getUser())):
+ ?>
+ <li id="apps-management">
+ <a href="<?php print_unescaped(\OC::$server->getURLGenerator()->linkToRoute('settings.AppSettings.viewApps')); ?>" tabindex="4"
+ <?php if( $_['appsmanagement_active'] ): ?> class="active"<?php endif; ?>>
+ <svg width="32" height="32" viewBox="0 0 32 32" class="app-icon">
+ <defs><filter id="invert"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs>
+ <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert)" xlink:href="<?php print_unescaped(image_path('settings', 'apps.svg') . '?v=' . $_['versionHash']); ?>"></image>
+ </svg>
+ <div class="icon-loading-dark" style="display:none;"></div>
+ <span>
+ <?php p($l->t('Apps')); ?>
+ </span>
+ </a>
+ </li>
+ <?php endif; ?>
+
+ </ul>
+ </div>
+ </div></nav>
+
</div>
<div id="header-right">
@@ -152,51 +198,6 @@
</div>
</div></header>
- <nav role="navigation"><div id="navigation">
- <div id="apps">
- <ul>
- <?php foreach($_['navigation'] as $entry): ?>
- <?php if($entry['showInHeader']): ?>
- <li data-id="<?php p($entry['id']); ?>" class="in-header">
- <?php else: ?>
- <li data-id="<?php p($entry['id']); ?>">
- <?php endif; ?>
- <a href="<?php print_unescaped($entry['href']); ?>" tabindex="3"
- <?php if( $entry['active'] ): ?> class="active"<?php endif; ?>>
- <svg width="32" height="32" viewBox="0 0 32 32">
- <defs><filter id="invert"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs>
- <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert)" xlink:href="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" class="app-icon"></image>
- </svg>
- <div class="icon-loading-dark" style="display:none;"></div>
- <span>
- <?php p($entry['name']); ?>
- </span>
- </a>
- </li>
- <?php endforeach; ?>
- <?php
- /* show "More apps" link to app administration directly in app navigation, as last entry */
- if(OC_User::isAdminUser(OC_User::getUser())):
- ?>
- <li id="apps-management">
- <a href="<?php print_unescaped(\OC::$server->getURLGenerator()->linkToRoute('settings.AppSettings.viewApps')); ?>" tabindex="4"
- <?php if( $_['appsmanagement_active'] ): ?> class="active"<?php endif; ?>>
- <svg width="32" height="32" viewBox="0 0 32 32" class="app-icon">
- <defs><filter id="invert"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs>
- <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert)" xlink:href="<?php print_unescaped(image_path('settings', 'apps.svg') . '?v=' . $_['versionHash']); ?>"></image>
- </svg>
- <div class="icon-loading-dark" style="display:none;"></div>
- <span>
- <?php p($l->t('Apps')); ?>
- </span>
- </a>
- </li>
- <?php endif; ?>
-
- </ul>
- </div>
- </div></nav>
-
<div id="sudo-login-background" class="hidden"></div>
<form id="sudo-login-form" class="hidden">
<?php p($l->t('This action requires you to confirm your password:')); ?><br>