blob: d606eafd726286b85a6ff70a441cbdba4ff45e13 [file] [log] [blame]
<?php
/*******************************************************************************
* Copyright (c) 2010 Eclipse Foundation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Wayne Beaton - initial API and implementation
*******************************************************************************/
require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/common.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/debug.php");
trace_file_info(__FILE__);
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");
$App = new App();
$Nav = new Nav();
$Menu = new Menu();
login_committer();
include($App->getProjectCommon());
require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/CQ.class.php");
$cqs = find_root_cqs();
if ($App->getHTTPParameter('sort') == 'name') {
function sortCQs($cq1, $cq2) {
$compare = strcasecmp($cq1->getName(), $cq2->getName());
if ($compare == 0) {
return strcasecmp($cq1->getVersion(), $cq2->getVersion());
} else {
return $compare;
}
}
usort($cqs, 'sortCQs');
}
ob_start();
$pageKeywords = "";
$pageTitle = "An Overview of Contribution Questionnaires";
$pageAuthor = "Wayne Beaton";
?>
<div id="midcolumn">
<div class="homeitem">
<h1><?= $pageTitle ?></h1>
<p>This page display information about contribution questionnaires (CQs),
including the hierarchical relationship of the various &quot;piggy-back&quot;.
Where known, the file patterns for any JAR'd bundles associated with
the CQs are indicated.</p>
<style>
.cq table {border-width:0;margin-top:1em;margin-bottom:5px}
.cq tr {vertical-align:top}
.cq p {margin:0}
.cq-info {margin-left:2em}
.cq-info p ul {margin-top:0px;margin-bottom:}
.cq-info li {margin:0}
</style>
<?php
function display_cqs($cqs) {
foreach ($cqs as $cq) {
display_cq($cq);
}
}
function display_cq($cq) {
if (!$cq->is_approved()) return;
echo "<div class=\"cq\">";
if ($cq->is_contribution()) {
$icon = 'eclipse.gif';
$title = 'An EPL-licensed contribution to an Eclipse project';
} else {
$icon = 'library.png';
$title = 'A third-party library';
}
$description = htmlentities($cq->getDescription());
$name = htmlentities($cq->getName());
$version = htmlentities($cq->getVersion());
$header = $name;
if ($version) $header = "$header $version";
echo "
<table>
<tr>
<td><img src=\"/projects/images/$icon\" title=\"$title\"></img></td>
<td><h4><a href=\"https://dev.eclipse.org/ipzilla/show_bug.cgi?id=$cq->id\">CQ&nbsp;$cq->id</a></h4></td>
<td><h4>$header</h4><p>$description<p></td>
</tr>
</table>";
echo "<div class=\"cq-info\">";
$id = $cq->project;
echo "<p>Created by: <a href=\"/projects/project.php?id=$id\">$id</a></p>";
if ($cq->piggyback_cqs) {
echo "<p>Piggyback CQs:</p>";
echo "<ul>";
display_piggybacks($cq->piggyback_cqs);
echo "</ul>";
}
if ($cq->bundles) {
echo "<p>Bundles:</p>";
echo "<ul>";
foreach($cq->bundles as $bundle => $regex) {
echo "<li>$bundle</li>";
}
echo "</ul>";
}
echo "</div>";
echo "</div>";
}
function display_piggybacks($cqs) {
foreach($cqs as $cq) {
if ($cq->is_approved()) {
$description = htmlentities($cq->description);
echo "<li><a href=\"https://dev.eclipse.org/ipzilla/show_bug.cgi?id=$cq->id\" title=\"$description\">$cq->id</a> $cq->project</li>";
}
display_piggybacks($cq->piggyback_cqs);
}
}
display_cqs($cqs);
?>
<?php
echo get_trace_html();
?>
</div>
</div>
<?php
$html = ob_get_contents();
ob_end_clean();
$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);
?>