Completely removing personalMenu

This commit is contained in:
Jakob Sack 2011-04-16 18:06:23 +02:00
parent 5d23b60c8a
commit f2e37e0018
5 changed files with 2 additions and 39 deletions

View File

@ -1,6 +1,5 @@
<?php <?php
OC_APP::register( array( "id" => "help", "name" => "Help" )); OC_APP::register( array( "id" => "help", "name" => "Help" ));
OC_APP::addPersonalMenuEntry( array( "order" => 2, "href" => OC_HELPER::linkTo( "help", "index.php" ), "name" => "Help" ));
?> ?>

View File

@ -7,6 +7,7 @@ if( !OC_USER::isLoggedIn()){
exit(); exit();
} }
OC_APP::setActiveNavigationEntry( "help" );
$settings = array(); $settings = array();
// Do the work ... // Do the work ...

View File

@ -34,7 +34,6 @@ class OC_APP{
static private $settingspages = array(); static private $settingspages = array();
static private $navigation = array(); static private $navigation = array();
static private $subnavigation = array(); static private $subnavigation = array();
static private $personalmenu = array();
/** /**
* @brief loads all apps * @brief loads all apps
@ -181,28 +180,6 @@ class OC_APP{
return self::$activeapp; return self::$activeapp;
} }
/**
* @brief adds an entry to the personal menu
* @param $data array containing the data
* @returns true/false
*
* This function adds a new entry to the personal menu visible to users
* only. $data is an associative array.
* The following keys are required:
* - id: unique id for this entry ("logout")
* - href: link to the page
* - name: Human readable name ("Logout")
*
* The following keys are optional:
* - order: integer, that influences the position of your application in
* the personal menu. Lower values come first.
*/
public static function addPersonalMenuEntry( $data ){
// TODO: write function
OC_APP::$personalmenu[] = $data;
return true;
}
/** /**
* @brief registers an admin page * @brief registers an admin page
* @param $data array containing the data * @param $data array containing the data
@ -266,18 +243,6 @@ class OC_APP{
return OC_APP::$navigation; return OC_APP::$navigation;
} }
/**
* @brief Returns the personal menu
* @returns associative array
*
* This function returns an array containing all personal menu entries
* added. The entries are sorted by the key "order" ascending.
*/
public static function getPersonalMenu(){
// TODO: write function
return OC_APP::$personalmenu;
}
/** /**
* @brief Returns the admin pages * @brief Returns the admin pages
* @returns associative array * @returns associative array

View File

@ -191,9 +191,8 @@ class OC_TEMPLATE{
$page = new OC_TEMPLATE( "core", "layout.user" ); $page = new OC_TEMPLATE( "core", "layout.user" );
// Add menu data // Add menu data
// Add navigation entry and personal menu // Add navigation entry
$page->assign( "navigation", OC_APP::getNavigation()); $page->assign( "navigation", OC_APP::getNavigation());
$page->assign( "personalmenu", OC_APP::getPersonalMenu());
} }
elseif( $this->renderas == "admin" ) elseif( $this->renderas == "admin" )
{ {

View File

@ -1,6 +1,5 @@
<?php <?php
OC_APP::register( array( "id" => "settings", "name" => "Settings" )); OC_APP::register( array( "id" => "settings", "name" => "Settings" ));
OC_APP::addPersonalMenuEntry( array( "order" => 1, "href" => OC_HELPER::linkTo( "settings", "index.php" ), "name" => "Settings" ));
?> ?>