diff options
author | Julius Haertl <jus@bitgrid.net> | 2017-03-01 23:57:16 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2017-03-16 11:55:09 +0100 |
commit | 7eae6690ad2fbf36c83364dbd56b444378ea0a45 (patch) | |
tree | 8ec84fcbaae512f2b091c640596c3a92643dde0c | |
parent | 61dc78e6dc25f2a342fe523e50c41c557f3c6aca (diff) | |
download | nextcloud-server-7eae6690ad2fbf36c83364dbd56b444378ea0a45.tar.gz nextcloud-server-7eae6690ad2fbf36c83364dbd56b444378ea0a45.zip |
Make app management icon act like a normal app icon
Signed-off-by: Julius Haertl <jus@bitgrid.net>
-rw-r--r-- | core/templates/layout.user.php | 5 | ||||
-rw-r--r-- | lib/private/legacy/app.php | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 8e88a07328f..4b0f6354b1c 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -74,7 +74,8 @@ </a> </li> <?php endforeach; ?> - <?php if (count($_['navigation'])>$headerIconCount): ?> + <?php if (count($_['navigation'])>$headerIconCount + || (OC_User::isAdminUser(OC_User::getUser()) && count($_['navigation'])>=$headerIconCount)): ?> <li id="more-apps" class="menutoggle"> <a href="#"> <div class="icon-more-white"></div> @@ -83,7 +84,7 @@ </a> </li> <?php endif; ?> - <?php if (count($_['navigation'])<=$headerIconCount): ?> + <?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())): diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index 3d0ebc9644c..c82d620882d 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -530,6 +530,9 @@ class OC_App { // This is private as well. It simply works, so don't ask for more details private static function proceedNavigation($list) { $headerIconCount = 8; + if(OC_User::isAdminUser(OC_User::getUser())) { + $headerIconCount--; + } usort($list, function($a, $b) { if (isset($a['order']) && isset($b['order'])) { return ($a['order'] < $b['order']) ? -1 : 1; @@ -573,6 +576,9 @@ class OC_App { public static function proceedAppNavigation($entries) { $headerIconCount = 8; + if(OC_User::isAdminUser(OC_User::getUser())) { + $headerIconCount--; + } $activeAppIndex = -1; $list = self::proceedNavigation($entries); |