blob: 378c11ad7a8e6c8e7039d98f248521f1ad662a8b [file] [log] [blame]
<?php
/* 221934 - this page to remain on eclipse.org */
// -----------------------------------------------------------------------------------------------
// project_summary.php - standardized landing page for projects
//
// AUTHOR: Karl Matthias
// DATE: 2007-12-16
// HISTORY: 2008-01-02 Ready for release, pending icon placement.
// 2008-08-19 Updated for $App-managed database connections.
// -----------------------------------------------------------------------------------------------
/*
* ______NOTE TO DEVELOPERS_______
* This file is one of three main files that use the project meta-data.
* So when you modify this file you MUST be sure to update the other
* places the information is used including:
* /myfoundation/components/meta_data_questionnaire/...
* /projects/project_summary.php
* /projects/dev_process/project-status-infrastructure/left-menu.php (documentation)
* /projects/dev_process/paragraphs/project-status-info-table.php (documentation)
* /projects/dev_process/images/standard-project-page-annotated.gif (documentation)
* _______ _______ _______ _______
*/
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/classes/projects/projectInfoData.class.php");
require_once("common/shared_functions.php");
$release_logos = true; // show the member company logos
// Used for breaking out CVS roots from end directory paths, which are not separated
// in the meta-data but need to be for clients to connect. [270569]
$cvsroots = array(
'/cvsroot/birt',
'/cvsroot/datatools',
'/cvsroot/dsdp',
'/cvsroot/eclipse',
'/cvsroot/modeling',
'/cvsroot/rt',
'/cvsroot/stp',
'/cvsroot/technology',
'/cvsroot/tools',
'/cvsroot/tptp',
'/cvsroot/webtools'
);
// ----------------------------------------------------------------------------
// PHOENIX STUFF
$App = new App();
$Nav = new Nav();
$Menu = new Menu();
include($App->getProjectCommon());
$pageTitle = "Project Summary - ";
$pageAuthor = "Karl Matthias";
$extraHtmlHeaders = '
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.4.1/build/container/assets/container.css">
<!--[if IE 6]><link rel="stylesheet" type="text/css" href="common/project_summary_ie.css"><![endif]-->
<link rel="stylesheet" type="text/css" href="common/project_summary.css">
';
$App->AddExtraHtmlHeader($extraHtmlHeaders);
$Nav->setLinkList(array()); // empty Nav
// ----------------------------------------------------------------------------
// BEGIN CODE
function filter_cvsroot($entry) {
global $cvsroot;
return (strpos($cvsroot, $entry) !== false);
}
// Start Output Buffering
ob_start();
// Validate parameter
preg_match('/^([a-z.0-9\-_]+)$/', $_REQUEST['projectid'], $matches);
if(!isset($matches[1])) {
if(!isset($_REQUEST['test'])) {
nice_die('You must specify a projectid parameter. This is not a standalone script.');
}
$result = $App->projectinfo_sql("SELECT DISTINCT(ProjectID) FROM ProjectInfo ORDER BY ProjectID");
mysql_error_check();
echo "<div style='padding-left: 1em'>";
echo "<span style='font-size: x-large; font-weight: bold;'>Project Summaries</span><br/>";
echo "The following projects have meta-data available:<br/><br/>";
while($row = mysql_fetch_assoc($result)) {
echo "<div style='padding-left: 2em'><a href='?projectid=" . $row['ProjectID'] . "'>" . $row['ProjectID'] . "</a></div>";
}
echo "</div>";
$pageTitle .= 'all projects';
nice_die('');
}
$projectid = $matches[1];
$project = new ProjectInfoData($projectid);
// Get the project website from the DB
$result = $App->foundation_sql("SELECT UrlIndex from Projects where ProjectID = '$projectid'");
$row = mysql_fetch_assoc($result);
$website_url = isset($row['UrlIndex']) ? $row['UrlIndex'] : '';
$bz_productid = urlencode(bugzilla_for_project($project,$projectid));
// Fetch the description text
$description = '';
if($project->descriptionurl) {
if(count($project->descriptionurls) > 1) {
$urls = $project->descriptionurls;
$url = trim($urls[0]);
} else {
$url = trim($project->descriptionurl);
}
if(!preg_match('/http:\/\//', $url)) {
$description = file_get_contents("http://www.eclipse.org/" . $url);
} else {
$description = file_get_contents($url);
}
// If it's a phoenix page, clean it up
if(preg_match('/\<div id="midcolumn"\>/s', $description)) {
$description = preg_replace('/((^.*\<div id="midcolumn"\>)|(\<\/div\>\<div id="footer"\>.*))/s', '', $description);
$description = substr($description, 0, strripos($description, '</div>'));
}
if(trim($description) == '') {
$description = '<p><em>No information has been provided by the project (description is empty)</em></p>';
}
} else {
$description = '<p><em>No information has been provided by the project.</em></p>';
}
$pageTitle .= $projectid;
// Configuration details
$iconDir = "http://dev.eclipse.org/large_icons";
$activity_image = "http://dash.eclipse.org/dash/commits/web-app/active-graph.cgi?project=$projectid";
$dashLink = "http://dash.eclipse.org/dash/commits/web-app/summary.cgi?company=y&month=x&project=$projectid";
// ----------------------------------------------------------------------------
// OUTPUT
?>
<!-- YAHOO Includes -->
<script type="text/javascript" src="/eclipse.org-common/yui/2.6.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="/eclipse.org-common/yui/2.6.0/build/animation/animation-min.js"></script>
<script type="text/javascript" src="/eclipse.org-common/yui/2.6.0/build/container/container-min.js"></script>
<script src="/eclipse.org-common/yui/2.6.0/build/dom/dom-min.js"></script>
<div id="maincontent">
<div id="midcolumn" style="width: 95%; margin-left: 1.5em;">
<!-- MESSAGE -->
<div style="text-align: center; width: 100%;">
<a href="#" onclick="simpledialog.render(document.body);simpledialog.show();return false;">Click here if the information on this page is ugly, incorrect, or just plain bogus.</a>
</div>
<br/>
<?php box_header('blueonwhite', '', '', false, true); ?>
<div style="padding: 1em">
<!-- HEADER -->
<div class="projects_header">
<table style="width: 100%;"><tr>
<td valign="bottom" align="left">
<span style="font-size: xx-large; font-weight: bold;"><?= $project->projectnames[0] != '' ? $project->projectnames[0] : $projectid; ?></span><img src="https://dev.eclipse.org/project-phase-icon.php?project=<?= $projectid ?>">
</td>
<td>
<?php if($project->logourl) { ?> <img height="80" src="<?= $project->logourl ?>"> <?php } ?>
</td>
<?php if($project->downloadsurl) { ?>
<td valign="bottom" align="right"><a href="<?= $project->downloadsurls[0] ?>"><span class="downloads">Download</span><img src="<?= $iconDir ?>/actions/go-bottom.png"></a></td>
<?php } else { ?>
<td valign="bottom" align="right"><span style="color: black"><em>No Download Site Information Has Been Provided</em></span></td>
<?php } ?>
</tr></table>
</div>
<!-- DESCRIPTION -->
<?php box_header('whiteonblue', 'Description', "$iconDir/mimetypes/text-x-generic.png", false, true); ?>
<?= $description ?>
<?php box_footer('whiteonblue') ?>
<br/>
<!-- COMMITS METER -->
<?php box_header('whiteonblue', 'Commits Activity Meter', "$iconDir/apps/utilities-system-monitor.png", false, true); ?>
<div style="float:left; padding-left: 3em;">
<?php if(strlen($activity_image) > 0) { ?>
<a href="<?= $dashLink ?>"><img src="<?= $activity_image ?>"></a>
<?php } else { ?>
<em>No activity graph is available.</em>
<?php } ?>
</div>
<br clear="all"/>
<?php box_footer('whiteonblue'); ?>
<!-- NEWSGROUPS -->
<?php box_header('whiteonblue', "Newsgroups", "$iconDir/apps/internet-news-reader.png"); ?>
<ul class="myul">
<?php
if($project->newsgroups) {
foreach($project->newsgroups as $newsgroup) {
if($newsgroup->name) {
echo "<li class=\"myli\"><a class=\"mya\" href=\"news://$newsgroup->name\">$newsgroup->name</a>:
$newsgroup->description
(<a class=\"mya\" href=\"http://www.eclipse.org/newsportal/thread.php?group=$newsgroup->name\">web</a>)
</li>\n";
}
}
} else {
echo "<p><em>The project has not listed any newsgroups.</em></p>";
}
?>
</ul>
<?php box_footer('whiteonblue'); ?>
<!-- MAILING LISTS -->
<?php box_header('whiteonblue', 'Mailing Lists', "$iconDir/apps/internet-mail.png", true) ?>
<ul class="myul">
<?php
if($project->mailinglists) {
foreach($project->mailinglists as $mailinglist) {
if($mailinglist->name) {
echo "<li class=\"myli\"><a href=\"http://dev.eclipse.org/mailman/listinfo/$mailinglist->name\">$mailinglist->name</a>: $mailinglist->description(<a href=\"http://dev.eclipse.org/mhonarc/lists/$mailinglist->name/maillist.html\">web</a>)</li>\n";
}
}
} else {
echo "<p><em>The project has not listed any mailing lists.</em></p>";
}
?>
</ul>
<?php box_footer('whiteonblue'); ?>
<br clear="all"/>
<!-- SOURCE REPOSITORY -->
<?php box_header('whiteonblue', 'Source Repository', "$iconDir/categories/applications-multimedia.png", false, true) ?>
<?php if($project->sourcerepository) { ?>
<p>Eclipse projects store all of their source code in public revision control systems. The <?= $project->shortname ?> project hosts its revision control repository at:</p>
<?php
$cvsdirs = array();
$cvsroot = '';
$root = '';
foreach($project->sourcerepositorys as $cvs) {
// CVS roots and paths have to be listed separately
if(preg_match('/^\/cvsroot/', $cvs)) {
// Figure out from the first one what the the root is so we can strip if off the others
if($root == '') {
$cvsroot = $cvs;
$root = array_values(array_filter($cvsroots, 'filter_cvsroot')); // reduce
$root = $root[0];
}
$cvsdirs[] = str_replace($root, '', $cvs); // filter out the root part
} else {
echo "<div style=\"padding-left: 2em;\"><b>SVN:</b> http://dev.eclipse.org/svnroot$cvs</div>\n";
}
}
if(count($cvsdirs) > 0) {
echo "<div style=\"padding-left: 2em;\"><b>CVS:</b> :pserver:anonymous@dev.eclipse.org:" . $root . "</div>\n";
echo "<div style='padding-left: 3em;'>Including the following CVS paths:</div>\n";
foreach($cvsdirs as $cvsdir) {
echo "<div style='padding-left: 4em'>" . trim($cvsdir, '/') . "</div>\n";
}
}
?>
<p>CVS and SVN repositories are browseable <a href="http://dev.eclipse.org/viewcvs/index.cgi/">on the web</a>.</p>
</p>
<?php } else { ?>
<p><em>The project has not listed any revision control repositories.</em>
<?php if(strpos($projectid,'.') === false) { ?> <em>Top level projects may have no code of their own.</em> <? } ?>
</p>
<?php } ?>
<?php box_footer('whiteonblue'); ?>
<!-- COMMITTERS -->
<?php box_header('whiteonblue', 'Committers', "$iconDir/apps/system-users.png"); ?>
<?php
$committer_count = committers_for_project($projectid, $release_logos);
?>
<p><font size=-1 color=gray>
This automatically collected information may not represent
true activity and should not be used as sole indicator of
individual or project behavior.
See the <a href="http://wiki.eclipse.org/index.php/Commits_Explorer">wiki page</a> about known data anamolies.</p>
</font>
<p><font size=-1 color=gray>
Other web pages list <a href="committers-alumni.php">alumni</a> and
<a href="committers-emeritus.php">emeritus</a> committers from all
Eclipse projects.
</font>
<?php box_footer('whiteonblue'); ?>
<!-- LEADS -->
<?php box_header('whiteonblue', 'Project Leadership', "$iconDir/apps/preferences-desktop-theme.png", true); ?>
<p><b>Project Leads</b>
<?php
leads_for_project($projectid);
?>
<br/>
<?php if(strpos($projectid, '.') === false) { ?>
<b style="padding-left: 1em">Project Management Council</b>
<?php
pmc_for_project($projectid);
?>
<?php } ?>
<?php box_footer('whiteonblue'); ?>
<!-- RELEASES -->
<?php box_header('whiteonblue', 'Releases', "$iconDir/mimetypes/package-x-generic.png", $committer_count < 8 ? false : true); ?>
<?php if($project->updatesiteurl) {
if(is_array($project->updatesiteurl)) {
$updatesite = $project->updatesiteurl[0];
} else {
$updatesite = $project->updatesiteurl;
}
?>
<p>The Eclipse update site for this project is <a class="mya" href="<?= $updatesite ?>"><?= $updatesite ?></a>.</p>
<?php } else { ?>
<p><em>No Eclipse update site has been listed.</em></p>
<?php } ?>
<?php if($project->releases) {
echo "<p><table>\n";
$noreleases = false;
$releases = array(); $release_status = array(); $release_download = array();
foreach($project->releases as $release) {
if(($release->name == 'noreleases') || ($release->name == 'NORELEASES')) {
$noreleases = true;
?>
<p>This project does not make software releases.</p>
<?php
break;
}
$releases[$release->date] = $release->name;
$release_status[$release->date] = $release->status;
$release_download[$release->date] = $release->download;
}
arsort($releases); $count = 0;
foreach($releases as $key => $value) {
if($count++ >= 5) { break; }
echo "<tr><td><a class='mya' href='". $release_download[$key] . "'>$value</a>:</td><td>$key</td><td>" . $release_status[$key] . "</td></tr>\n";
}
echo "</table></p>\n";
// Show the timeline link
if(!$noreleases) {
?>
<p>Here is the <a href="timeline/index.php?projectid=<?= $projectid ?>">Project Release Timeline</a>.
<?php
} ?>
<?php } else { ?>
<p><em>No releases have been filed for this project.</em></p>
<?php } ?>
<?php box_footer('whiteonblue'); ?>
<!-- BUGS -->
<?php box_header('whiteonblue', 'Bugs', "$iconDir/categories/preferences-system.png", true); ?>
<?php
if($project->bugzilla) {
$bugsurl = '';
$bugkeys = array();
foreach($project->bugzilla as $bugzilla) {
if($bugzilla->url && !$bugsurl) {
$bugsurl = $bugzilla->url;
}
if($bugzilla->productname) {
if($bugzilla->components) {
$x = explode( ',', $bugzilla->components );
foreach( $x as $each ) {
$bugkeys[] = array( $bugzilla->productname, $each );
}
} else {
$bugkeys[] = array( $bugzilla->productname, '' );
}
}
}
if($bugsurl) {
?>
<p>Bugs can be searched and filed using <a href="<?= $bugsurl ?>">bugzilla</a>.</p>
<?php
} else if( count($bugkeys) > 0 ) {
?>
<p>Bugs can be searched and filed under
<?php
$x = array();
foreach( $bugkeys as $each ) {
if( $each[1] ) {
$x[] = "<a href='https://bugs.eclipse.org/bugs/query.cgi?product=" . $each[0] .
"&amp;component=" . $each[1] . "'>" . $each[0] . "</a>";
} else {
$x[] = "<a href='https://bugs.eclipse.org/bugs/query.cgi?product=" . $each[0] .
"'>" . $each[0] . "</a>";
}
}
echo implode( ", " . $x );
} else { ?>
<p><em>No bugzilla link has been provided.</em></p>
<?php
}
} else { ?>
<p><em>No bugzilla link has been provided.</em></p>
<?php } ?>
<?php box_footer('whiteonblue'); ?>
<!-- WEBSITE -->
<?php box_header('whiteonblue', 'Project Web Site', "$iconDir/apps/internet-web-browser.png");
$wikiurl = $project->wikiurls[0];
if($wikiurl !== NULL && !preg_match('/wiki.eclipse.org/', $wikiurl)) {
$wikiurl = "http://wiki.eclipse.org/$wikiurl";
}
?><p><?php
if( $website_url == '' ) {
if( $wikiurl != '' ) {
?>The project maintains <a href="<?= $wikiurl ?>">these wiki pages</a>.<?php
} else {
?><em>No web site or wiki pages provided.</em><?php
}
} else {
if( $wikiurl != '' ) {
?>The project maintains <a href="<?= $website_url ?>">this website</a>
and <a href="<?= $wikiurl ?>">these wiki pages</a>.<?php
} else {
?>The project maintains <a href="<?= $website_url ?>">this website</a>.<?php
}
}
?></p>
<?php box_footer('whiteonblue'); ?>
<!-- PROJECT PLAN -->
<?php box_header('whiteonblue', 'Project Plan', "$iconDir/mimetypes/x-office-presentation.png", true); ?>
<?php if($project->projectplanurl) {
?>
<p>Here is the <a href="<?= $project->projectplanurl ?>">project plan</a>
(and in the <a href="project-plan.php?projectid=<?= $projectid ?>">pending standard form</a>).</p>
<?php } else { ?>
<p><em>The project has no plan.</em></p>
<?php } ?>
<?php box_footer('whiteonblue'); ?>
<!-- DOCUMENTATION -->
<?php box_header('whiteonblue', 'Documentation', "$iconDir/actions/edit-find-replace.png"); ?>
<p>
<?php if($project->documentationurl) { ?>
<a href="<?= $project->documentationurls[0] ?>">Documentation</a> is available for this project.
<?php } else { ?>
<em>The project has no documentation.</em>
<?php } ?>
</p>
<?php box_footer('whiteonblue'); ?>
<!-- IP LOG -->
<?php box_header('whiteonblue', 'IP Log', "$iconDir/apps/accessories-text-editor.png"); ?>
<p>
The project team maintains this <a href="ip_log.php?projectid=<?= $projectid ?>">IP Log</a>.
</p>
<?php box_footer('whiteonblue'); ?>
<!-- ARTICLES -->
<?php box_header('whiteonblue', 'Articles', "$iconDir/mimetypes/x-office-document.png", true); ?>
<p>
<?php if($project->articleurls) { ?>
The project has published or been discussed in these articles.<br/>
<?php foreach($project->articleurls as $article) { ?>
<span style="padding-left: 1ex"><a href="<?= $article ?>"><?= $article ?></a></span><br/>
<?php } ?>
<?php } else {?>
The project has published no articles.
<?php } ?>
</p>
<?php box_footer('whiteonblue'); ?>
<!-- MENTORS -->
<?php box_header('whiteonblue', 'Mentors', "$iconDir/actions/contact-new.png"); ?>
<?php $result = $App->foundation_sql("
SELECT People.PersonID, FName, LName FROM PeopleProjects, People
WHERE People.PersonID = PeopleProjects.PersonID
AND Projectid = '$projectid'
AND Relation = 'ME'
");
if(mysql_num_rows($result) > 0) {
echo "<p><table>";
while($row = mysql_fetch_array($result)) {
?>
<tr><td>
<?php
output_one_person($row);
?>
</td></tr>
<?php
}
echo "</table></p>";
} else { ?>
<p>
This project has not been assigned any mentors.
</p>
<?php } ?>
<?php box_footer('whiteonblue'); ?>
<br clear="all"/>
</div>
<?php box_footer('blueonwhite'); ?>
</div> <!-- midcolumn -->
<!-- Popup Box -->
<div id="popupDialog" style="visibility: hidden;">
<?php box_header('grayishonblue', 'Improve this page by choosing your role', "$iconDir/apps/preferences-desktop-multimedia.png", false, true, 'popup'); ?>
<div class="hd"></div>
<div class="bd">
<table width="100%">
<tr>
<td width="50%" style="border: 2px solid black" onclick="handleUser(); return false;">&nbsp;<a><img src="<?= $iconDir ?>/places/start-here.png">I'm a user, show me how to report a problem with this page.</a></td>
<td width="50%" style="border: 2px solid black" onclick="handleCommitter(); return false;">&nbsp;<a><img src="<?= $iconDir ?>/apps/system-users.png">I'm a project team member, show me how to update the information on this page.</a></td>
</tr>
</table>
</div>
<div class="ft"></div>
<?php box_footer('grayishonblue'); ?>
</div>
<!-- Popup Box Code -->
<script type="text/javascript">
// Define various event handlers for Dialog
var handleUser = function() {
window.location = "https://bugs.eclipse.org/bugs/enter_bug.cgi?product=<?= $bz_productid ?>&short_desc=<?= urlencode('Project meta-data needs improvement.') ?>&comment=<?= urlencode('I was looking at the project summary page and there appear to be omissions or inaccuracies in the meta-data displayed. What I saw was:') ?>";
this.hide();
};
var handleCommitter = function() {
window.location = "http://www.eclipse.org/projects/dev_process/project-status-infrastructure.php";
this.hide();
};
var mywidth = YAHOO.util.Dom.getViewportWidth();
// Instantiate the Dialog
var simpledialog =
new YAHOO.widget.Panel("popupDialog",
{ width: (mywidth *.5) + 'px',
fixedcenter: true,
effect:{effect:YAHOO.widget.ContainerEffect.FADE, duration:0.25},
visible: false,
draggable: false,
close: true,
modal: true,
underlay: 'shadow',
constraintoviewport: true
} );
</script>
</div> <!-- maincontent -->
<?php
$html = ob_get_contents();
ob_end_clean();
# Generate the web page
$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);
?>