Make app management icon act like a normal app icon

Signed-off-by: Julius Haertl <jus@bitgrid.net>
This commit is contained in:
Julius Haertl 2017-03-01 23:57:16 +01:00 committed by Julius Härtl
parent 61dc78e6dc
commit 7eae6690ad
No known key found for this signature in database
GPG key ID: 4C614C6ED2CDE6DF
2 changed files with 9 additions and 2 deletions

View file

@ -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())):

View file

@ -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);