cvs: pearweb /public_html/pepr pepr-overview.php
| From: | Tobias Schlitt | Date: | Sat, 04 Sep 2004 23:54:29 +0000 |
| Subject: | cvs: pearweb /public_html/pepr pepr-overview.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-23639@lists.php.net to get a copy of this message | ||
toby Sat Sep 4 19:54:29 2004 EDT
Modified files:
/pearweb/public_html/pepr pepr-overview.php
Log:
* Don't show all finished proposals.
* Show filtered output ordered by category and name.
http://cvs.php.net/diff.php/pearweb/public_html/pepr/pepr-overview.php?r1=1.8&r2=1.9&ty=u
Index: pearweb/public_html/pepr/pepr-overview.php
diff -u pearweb/public_html/pepr/pepr-overview.php:1.8
pearweb/public_html/pepr/pepr-overview.php:1.9
--- pearweb/public_html/pepr/pepr-overview.php:1.8 Sat Aug 28 17:27:39 2004
+++ pearweb/public_html/pepr/pepr-overview.php Sat Sep 4 19:54:28 2004
@@ -20,7 +20,7 @@
* @author Daniel Convissor <danielc@php.net>
* @copyright Copyright (c) 1997-2004 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License
- * @version $Id: pepr-overview.php,v 1.8 2004/08/28 21:27:39 mj Exp $
+ * @version $Id: pepr-overview.php,v 1.9 2004/09/04 23:54:28 toby Exp $
*/
/**
@@ -39,13 +39,19 @@
$filter_value = $filter->getValue();
+$selectStatus = '';
+
if ($form->validate()) {
if (trim($filter_value[0]) != "") {
$selectStatus = $filter_value[0];
}
}
-$proposals =& proposal::getAll($dbh, @$selectStatus);
+if ($selectStatus != '') {
+ $order = ' pkg_category ASC, pkg_name ASC';
+}
+
+$proposals =& proposal::getAll($dbh, @$selectStatus, null, @$order);
response_header('PEPr :: Package Proposals');
@@ -57,6 +63,8 @@
$last_status = false;
+$finishedCounter = 0;
+
foreach ($proposals as $proposal) {
if ($proposal->getStatus() != $last_status) {
echo "</ul>";
@@ -67,6 +75,18 @@
echo "<ul>";
$last_status = $proposal->getStatus();
}
+ $prpCat = $proposal->pkg_category;
+ if ($selectStatus != '' && (!isset($lastChar) || $lastChar != $prpCat{0})) {
+ $lastChar = $prpCat{0};
+ echo '</ul>';
+ echo "<h3>$lastChar</h3>";
+ echo '<ul>';
+ }
+ if ($proposal->getStatus() == 'finished' && $selectStatus !=
'finished') {
+ if (++$finishedCounter == 10) {
+ break;
+ }
+ }
if (!isset($users[$proposal->user_handle])) {
$users[$proposal->user_handle] = user::info($proposal->user_handle);
}
@@ -107,6 +127,10 @@
}
echo "</ul>";
+
+if ($selectStatus == '') {
+ print_link('pepr-overview.php?filter=finished', 'All finished proposals');
+}
response_footer();