summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/appinfo/app.php10
-rw-r--r--admin/img/navicon.pngbin0 -> 874 bytes
-rw-r--r--admin/index.php2
-rw-r--r--admin/templates/index.php2
-rw-r--r--files/appinfo/app.php7
-rw-r--r--files/img/navicon.pngbin0 -> 635 bytes
-rw-r--r--img/actions/arrow-down.pngbin0 -> 525 bytes
-rw-r--r--img/actions/arrow-left.pngbin0 -> 512 bytes
-rw-r--r--img/actions/arrow-right.pngbin0 -> 527 bytes
-rw-r--r--img/actions/arrow-up.pngbin0 -> 484 bytes
-rw-r--r--lib/app.php12
-rw-r--r--lib/base.php10
-rw-r--r--log/appinfo/app.php4
-rw-r--r--settings/appinfo/app.php2
-rw-r--r--templates/layout.admin.php7
-rw-r--r--templates/layout.user.php4
16 files changed, 31 insertions, 29 deletions
diff --git a/admin/appinfo/app.php b/admin/appinfo/app.php
index befe8e678f0..3221e276c5f 100644
--- a/admin/appinfo/app.php
+++ b/admin/appinfo/app.php
@@ -1,12 +1,12 @@
<?php
-OC_APP::register( array( "id" => "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 00000000000..f2c7c0867f6
--- /dev/null
+++ b/admin/img/navicon.png
Binary files differ
diff --git a/admin/index.php b/admin/index.php
index 96fa2007244..cfcb70d056b 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 56f85cbbbc5..f13d5634eac 100644
--- a/admin/templates/index.php
+++ b/admin/templates/index.php
@@ -7,6 +7,6 @@
<ul>
<? foreach( $_["adminpages"] as $i ){ ?>
- <li><a href="<? echo link_to( $i["app"], $i["file"] ) ?>"><? echo $i["name"] ?></a></li>
+ <li><a href="<? echo $i["href"] ?>"><? echo $i["name"] ?></a></li>
<? } ?>
</ul>
diff --git a/files/appinfo/app.php b/files/appinfo/app.php
index aa0054fc43d..8b1a806b7be 100644
--- a/files/appinfo/app.php
+++ b/files/appinfo/app.php
@@ -1,7 +1,8 @@
<?php
-OC_APP::register( array( "id" => "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 00000000000..9ee717c8b12
--- /dev/null
+++ b/files/img/navicon.png
Binary files differ
diff --git a/img/actions/arrow-down.png b/img/actions/arrow-down.png
new file mode 100644
index 00000000000..03f201428ad
--- /dev/null
+++ b/img/actions/arrow-down.png
Binary files differ
diff --git a/img/actions/arrow-left.png b/img/actions/arrow-left.png
new file mode 100644
index 00000000000..b56cfee03df
--- /dev/null
+++ b/img/actions/arrow-left.png
Binary files differ
diff --git a/img/actions/arrow-right.png b/img/actions/arrow-right.png
new file mode 100644
index 00000000000..0acee70bcdd
--- /dev/null
+++ b/img/actions/arrow-right.png
Binary files differ
diff --git a/img/actions/arrow-up.png b/img/actions/arrow-up.png
new file mode 100644
index 00000000000..5e423213fbd
--- /dev/null
+++ b/img/actions/arrow-up.png
Binary files differ
diff --git a/lib/app.php b/lib/app.php
index 181af8a4faf..0bef7381262 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 c7f0fea6820..09e0a1e299a 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 292d59ee578..e639982a89c 100644
--- a/log/appinfo/app.php
+++ b/log/appinfo/app.php
@@ -1,6 +1,6 @@
<?php
-OC_APP::register( array( "id" => "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 0db99441574..c43d47f0dd6 100644
--- a/settings/appinfo/app.php
+++ b/settings/appinfo/app.php
@@ -1,6 +1,6 @@
<?php
OC_APP::register( array( "id" => "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 b4fcc915882..849ed6656be 100644
--- a/templates/layout.admin.php
+++ b/templates/layout.admin.php
@@ -25,7 +25,7 @@
<a id="user_menu_link" href="" title="">Username</a>
<ul id="user_menu">
<? foreach( $_["personalmenu"] as $entry ){ ?>
- <li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li>
+ <li><a href="<? echo $entry["href"] ?>" title=""><? echo $entry["name"] ?></a></li>
<? } ?>
</ul>
</div>
@@ -34,9 +34,8 @@
<div id="main">
<div id="plugins">
<ul>
- <? foreach( $_["navigation"] as $entry ){ ?>
- <li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li>
- <? } ?>
+ <li><a style="background-image:url(<? echo image_path( "admin", "navicon.png" ) ?>)" href="<? echo link_to( "admin", "index.php" )?>" title="">Administration</a></li>
+ <li><a style="background-image:url(<? echo image_path( "", "actions/arrow-left.png" ) ?>)" href="<? echo link_to( "", "index.php" )?>" title="">Back</a></li>
</ul>
</div>
diff --git a/templates/layout.user.php b/templates/layout.user.php
index 0643c99e933..ff845a9b957 100644
--- a/templates/layout.user.php
+++ b/templates/layout.user.php
@@ -25,7 +25,7 @@
<a id="user_menu_link" href="" title="">Username</a>
<ul id="user_menu">
<? foreach( $_["personalmenu"] as $entry ){ ?>
- <li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li>
+ <li><a href="<? echo $entry["href"] ?>" title=""><? echo $entry["name"] ?></a></li>
<? } ?>
</ul>
</div>
@@ -35,7 +35,7 @@
<div id="plugins">
<ul>
<? foreach( $_["navigation"] as $entry ){ ?>
- <li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li>
+ <li><a style="background-image:url(<? echo $entry["icon"] ?>)" href="<? echo $entry["href"] ?>" title=""><? echo $entry["name"] ?></a></li>
<? } ?>
</ul>
</div>