diff --git a/admin/appinfo/app.php b/admin/appinfo/app.php index befe8e678f..3221e276c5 100644 --- a/admin/appinfo/app.php +++ b/admin/appinfo/app.php @@ -1,12 +1,12 @@ "admin", "name" => "Administration" )); +OC_APP::register( array( "order" => 1, "id" => "admin", "name" => "Administration" )); if( OC_USER::ingroup( $_SESSION['username'], 'admin' )) { - OC_UTIL::addNavigationEntry( array( "app" => "admin", "file" => "index.php", "name" => "Administration" )); + OC_UTIL::addNavigationEntry( array( "id" => "admin_index", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "index.php" ), "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ), "name" => "Administration" )); } -OC_UTIL::addAdminPage( array( "app" => "admin", "file" => "system.php", "name" => "System Settings" )); -OC_UTIL::addAdminPage( array( "app" => "admin", "file" => "users.php", "name" => "Users" )); -OC_UTIL::addAdminPage( array( "app" => "admin", "file" => "plugins.php", "name" => "Plugins" )); +OC_UTIL::addAdminPage( array( "order" => 1, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" => "System settings" )); +OC_UTIL::addAdminPage( array( "order" => 2, "href" => OC_HELPER::linkTo( "admin", "users.php" ), "name" => "Users" )); +OC_UTIL::addAdminPage( array( "order" => 3, "href" => OC_HELPER::linkTo( "admin", "plugins.php" ), "name" => "Plugins" )); ?> diff --git a/admin/img/navicon.png b/admin/img/navicon.png new file mode 100644 index 0000000000..f2c7c0867f Binary files /dev/null and b/admin/img/navicon.png differ diff --git a/admin/index.php b/admin/index.php index 96fa200724..cfcb70d056 100644 --- a/admin/index.php +++ b/admin/index.php @@ -30,7 +30,7 @@ if( !OC_USER::isLoggedIn() || !OC_USER::ingroup( $_SESSION['username'], 'admin' $adminpages = array(); -foreach( OC_APP::list() as $i ){ +foreach( OC_UTIL::$adminpages as $i ){ // Do some more work here soon $adminpages[] = $i; } diff --git a/admin/templates/index.php b/admin/templates/index.php index 56f85cbbbc..f13d5634ea 100644 --- a/admin/templates/index.php +++ b/admin/templates/index.php @@ -7,6 +7,6 @@ diff --git a/files/appinfo/app.php b/files/appinfo/app.php index aa0054fc43..8b1a806b7b 100644 --- a/files/appinfo/app.php +++ b/files/appinfo/app.php @@ -1,7 +1,8 @@ "files", "name" => "Files" )); -OC_UTIL::addNavigationEntry( array( "app" => "files", "file" => "index.php", "name" => "Files" )); -OC_UTIL::addAdminPage( array( "app" => "files", "file" => "admin.php", "name" => "Files" )); +OC_APP::register( array( "order" => 2, "id" => "files", "name" => "Files" )); + +OC_UTIL::addNavigationEntry( array( "id" => "files_index", "order" => 1, "href" => OC_HELPER::linkTo( "files", "index.php" ), "icon" => OC_HELPER::imagePath( "files", "navicon.png" ), "name" => "Files" )); +OC_UTIL::addAdminPage( array( "order" => 1, "href" => OC_HELPER::linkTo( "files", "admin.php" ), "name" => "Files" )); ?> diff --git a/files/img/navicon.png b/files/img/navicon.png new file mode 100644 index 0000000000..9ee717c8b1 Binary files /dev/null and b/files/img/navicon.png differ diff --git a/img/actions/arrow-down.png b/img/actions/arrow-down.png new file mode 100644 index 0000000000..03f201428a Binary files /dev/null and b/img/actions/arrow-down.png differ diff --git a/img/actions/arrow-left.png b/img/actions/arrow-left.png new file mode 100644 index 0000000000..b56cfee03d Binary files /dev/null and b/img/actions/arrow-left.png differ diff --git a/img/actions/arrow-right.png b/img/actions/arrow-right.png new file mode 100644 index 0000000000..0acee70bcd Binary files /dev/null and b/img/actions/arrow-right.png differ diff --git a/img/actions/arrow-up.png b/img/actions/arrow-up.png new file mode 100644 index 0000000000..5e423213fb Binary files /dev/null and b/img/actions/arrow-up.png differ diff --git a/lib/app.php b/lib/app.php index 181af8a4fa..0bef738126 100644 --- a/lib/app.php +++ b/lib/app.php @@ -6,13 +6,15 @@ class OC_APP{ /** * */ - public static function init(){ + public static function loadApps(){ + global $SERVERROOT; + // Get all appinfo $dir = opendir( $SERVERROOT ); while( false !== ( $filename = readdir( $dir ))){ if( substr( $filename, 0, 1 ) != '.' ){ - if( file_exists( "$SERVERROOT/$filename/appinfo.php" )){ - oc_require( "$filename/appinfo.php" ); + if( file_exists( "$SERVERROOT/$filename/appinfo/app.php" )){ + oc_require( "$filename/appinfo/app.php" ); } } } @@ -32,8 +34,8 @@ class OC_APP{ /** * */ - public static function list(){ - return OC_APP::$apps[]; + public static function getApps(){ + return OC_APP::$apps; } } diff --git a/lib/base.php b/lib/base.php index c7f0fea682..09e0a1e299 100644 --- a/lib/base.php +++ b/lib/base.php @@ -77,6 +77,7 @@ if(isset($CONFIG_HTTPFORCESSL) and $CONFIG_HTTPFORCESSL){ } // load core libs +oc_require_once('helper.php'); oc_require_once('app.php'); oc_require_once('files.php'); oc_require_once('filesystem.php'); @@ -89,7 +90,6 @@ oc_require_once('ocs.php'); oc_require_once('connect.php'); oc_require_once('remotestorage.php'); oc_require_once('plugin.php'); -oc_require_once('helper.php'); OC_PLUGIN::loadPlugins( "" ); @@ -104,15 +104,15 @@ if( !$RUNTIME_NOSETUPFS ){ } // Add the stuff we need always -OC_UTIL::addPersonalMenuEntry( array( "file" => "index.php?logout=1", "name" => "Logout" )); +OC_UTIL::addPersonalMenuEntry( array( "order" => 1000, "href" => OC_HELPER::linkTo( "", "index.php?logout=1" ), "name" => "Logout" )); OC_UTIL::addScript( "jquery-1.5.min" ); OC_UTIL::addScript( "jquery-ui-1.8.10.custom.min" ); OC_UTIL::addScript( "js" ); OC_UTIL::addStyle( "jquery-ui-1.8.10.custom" ); OC_UTIL::addStyle( "styles" ); -// Require all appinfo.php -OC_APP::init(); +// Load Apps +OC_APP::loadApps(); // check if the server is correctly configured for ownCloud OC_UTIL::checkserver(); @@ -239,7 +239,7 @@ class OC_UTIL { * * @param array $entry */ - public static function addAdminPage( $entry){ + public static function addAdminPage( $entry ){ OC_UTIL::$adminpages[] = $entry; } diff --git a/log/appinfo/app.php b/log/appinfo/app.php index 292d59ee57..e639982a89 100644 --- a/log/appinfo/app.php +++ b/log/appinfo/app.php @@ -1,6 +1,6 @@ "log", "name" => "Log" )); -OC_UTIL::addNavigationEntry( array( "app" => "log", "file" => "index.php", "name" => "Log" )); +OC_APP::register( array( "order" => 1, "id" => "log", "name" => "Log" )); +OC_UTIL::addPersonalMenuEntry( array( "order" => 2, "href" => OC_HELPER::linkTo( "log", "index.php" ), "name" => "Log" )); ?> diff --git a/settings/appinfo/app.php b/settings/appinfo/app.php index 0db9944157..c43d47f0dd 100644 --- a/settings/appinfo/app.php +++ b/settings/appinfo/app.php @@ -1,6 +1,6 @@ "settings", "name" => "Settings" )); -OC_UTIL::addNavigationEntry( array( "app" => "settings", "file" => "index.php", "name" => "Settings" )); +OC_UTIL::addPersonalMenuEntry( array( "order" => 1, "href" => OC_HELPER::linkTo( "settings", "index.php" ), "name" => "Settings" )); ?> diff --git a/templates/layout.admin.php b/templates/layout.admin.php index b4fcc91588..849ed6656b 100644 --- a/templates/layout.admin.php +++ b/templates/layout.admin.php @@ -25,7 +25,7 @@ Username @@ -34,9 +34,8 @@
diff --git a/templates/layout.user.php b/templates/layout.user.php index 0643c99e93..ff845a9b95 100644 --- a/templates/layout.user.php +++ b/templates/layout.user.php @@ -25,7 +25,7 @@ Username
@@ -35,7 +35,7 @@