blob: f776ef686bcbfcce1d2d474ac43f06642a554ce7 [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();
// Not sure who we're protecting this from.
//mustBeCommitter();
include($App->getProjectCommon());
require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/Proposal.class.php");
$smallIconDir = "http://dev.eclipse.org/small_icons";
$proposals = get_proposals($App);
ob_start();
$pageKeywords = "";
$pageTitle = "Proposals";
$pageAuthor = "Wayne Beaton";
?>
<div id="midcolumn">
<div class="homeitem">
<h1><?= $pageTitle ?></h1>
<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:0px}
.cq-info li {margin:0}
</style>
<div class="cq-info">
<?php
function sort_by_date($proposal1, $proposal2) {
if ($proposal1->getDate() == $proposal2->getDate()) return 0;
return $proposal1->getDate() > $proposal2->getDate() ? -1 : 1;
}
usort($proposals, 'sort_by_date');
$counts = array();
echo "<ul>";
foreach($proposals as $proposal) {
echo "<li>" . $proposal->asHtml();
echo "<ul>";
foreach($proposal->statuses as $status) {
$text = $status->getText();
$date = $App->getFormattedDate($status->getDate(), 'short');
echo "<li>$date $text</li>";
}
echo "</ul>";
echo "</li>";
$posted = $proposal->getProposalPosted();
if ($posted) {
$period = date('Y-m', $posted->getDate());
@$counts[$period]++;
}
}
echo "</ul>";
echo get_trace_html();
?>
</div>
</div>
</div>
<div id="rightcolumn">
<div class="sideitem">
<h6>Summaries</h6>
<?php
krsort($counts);
echo '<ul>';
foreach($counts as $period => $count) {
echo "<li>$period - $count</li>";
}
echo '</ul>';
?>
</div>
</div>
<?php
$html = ob_get_contents();
ob_end_clean();
$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);
?>