blob: dbb9eef906fb155eeb98b71227badf3bf619da4a [file] [log] [blame]
<?php
/**
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (http://www.eclipse.org/legal/epl-v10.html).
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
*
* This is the custom version of /projects/common/project-info.class.php that
* works as we think it should.
*/
require_once($_SERVER['DOCUMENT_ROOT'] ."/eclipse.org-common/classes/projects/projectInfoData.class.php");
class ProjectInfo {
private $info;
private $projectkey;
function ProjectInfo($key) {
$this->projectkey = $key;
$this->info = new ProjectInfoData($this->projectkey);
}
/**
* Generate the common left menu navigation menu
*/
function generate_common_nav( $thenav, $users = NULL, $integrators = NULL, $contributors = NULL ) {
global $Nav;
$Nav->setLinkList( array() );
$Nav->addNavSeparator( $this->info->projectshortname, $this->info->projecturl );
$Nav->addCustomNav( "About This Project",
"/projects/project_summary.php?projectid=" . $this->projectkey, "", 1 );
$Nav->addNavSeparator("Users", htmlspecialchars($this->info->gettingstartedurl), "", 1);
$Nav->addCustomNav("Getting Started", htmlspecialchars($this->info->gettingstartedurl), "", 2);
$Nav->addCustomNav("Downloads", htmlspecialchars($this->info->downloadsurl), "", 2);
$Nav->addCustomNav("Documentation", "documentation.php", "", 2);
$Nav->addCustomNav("Newsgroup", "newsgroup.php", "", 2);
$Nav->addCustomNav("Bugs", "bugs.php", "", 2);
if( !empty($users) ) {
$users($Nav);
}
$Nav->addNavSeparator("Integrators", htmlspecialchars($this->info->integratorsurl), "", 1);
$Nav->addCustomNav("Plan", "plan.php", "", 2);
if( !empty($integrators) ) {
$integrators($Nav);
}
$Nav->addNavSeparator("Contributors", htmlspecialchars($this->info->contributingurl), "", 1);
$Nav->addCustomNav("Contributing", htmlspecialchars($this->info->contributingurl), "", 2);
$Nav->addCustomNav("Mailing Lists", "mailinglists.php", "", 2);
if( !empty($contributors) ) {
$contributors($Nav);
}
}
}
?>