| <?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 (Eclipse Foundation)- initial API and implementation |
| *******************************************************************************/ |
| |
| /* |
| * This script assumes that it is being included by another script. We |
| * assume that the $App variable has already been defined. |
| */ |
| |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/Activity.class.php"); |
| require_once($_SERVER['DOCUMENT_ROOT'] . '/projects/classes/images.inc'); |
| require_once(dirname(__FILE__) . '/../classes/debug.php'); |
| |
| $smallIconDir = "http://dev.eclipse.org/small_icons"; |
| |
| $activities = getUpcomingReviews(); |
| |
| ?> |
| <h3><a href="/projects/reviews-rss.php"><img src="<?php echo $images->rss; ?>" align="right" alt="[rss]" |
| border="0"/></a>Upcoming Reviews</h3> |
| <? if (!$activities) { ?> |
| <p>There are no reviews scheduled at this time.</p> |
| <? } else {?> |
| <p>The following reviews are scheduled, or have recently completed.</p> |
| <table><tbody> |
| <? |
| $lastDate = null; |
| foreach($activities as $activity) { |
| $name = htmlentities($activity->getName()); |
| $description = htmlentities($activity->getDescription()) . ' Review'; |
| |
| $projectUrl = $activity->getProjectUrl(); |
| if ($projectUrl) |
| $name = "<a href=\"$projectUrl\">$name</a>"; |
| else if ($id = $activity->getProjectId()) |
| $name = "<a href=\"/projects/project.php?id=$id\">$name</a>"; |
| |
| $slidesUrl = $activity->getSlidesUrl(); |
| $iplogUrl = $activity->getIPLogUrl(); |
| $bugNumber = $activity->getBugNumber(); |
| |
| $date = $App->getFormattedDate($activity->getDate(), 'short'); |
| $date = str_replace(' ', ' ', $date); |
| |
| $icons = ''; |
| if ($slidesUrl) |
| $icons .= "<a href=\"$slidesUrl\"><img style=\"vertical-align:top\" title=\"Review Documentation\" src=\"$smallIconDir/mimetypes/x-office-presentation.png\" alt=\"[doc]\"/></a>"; |
| |
| if ($iplogUrl) { |
| $icons .= "<a href=\"$iplogUrl\"><img style=\"vertical-align:top\" title=\"IP Log\" src=\"$smallIconDir/status/dialog-information.png\" alt=\"[log]\"/></a>"; |
| } |
| |
| if ($bugNumber) { |
| $icons .= "<a href=\"https://bugs.eclipse.org/bugs/show_bug.cgi?id=$bugNumber\"><img style=\"vertical-align:top\" title=\"Bug\" src=\"/images/ico_debug.gif\" alt=\"[bug]\"/></a>"; |
| } |
| |
| $status = $activity->getStatus(); |
| |
| if ($activity->isSuccessful()) { |
| $name = "<img style=\"vertical-align:top\" title=\"$status\" src=\"/projects/images/ok.gif\" alt=\"[successful]\"/>$name"; |
| } |
| |
| if ($activity->isUnsuccessful()) { |
| $date = "<strike>$date</strike>"; |
| $name = "<strike>$name</strike>"; |
| $description = "<strike>$description</strike>"; |
| $icons .= "<img style=\"vertical-align:top\" title=\"$status\" src=\"$smallIconDir/actions/process-stop.png\" alt=\"[unsuccessful]\"/>"; |
| } |
| |
| if ($lastDate) { |
| if ($lastDate != $date) { |
| echo "<tr><td colspan=\"2\"><hr/></td></tr>"; |
| } |
| } |
| $lastDate = $date; |
| |
| echo "<tr><td>$date</td><td>$name $description $icons</td></tr>\n"; |
| } |
| ?> |
| </tbody></table> |
| <? } ?> |