| <?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/Review.class.php"); |
| require_once (dirname ( __FILE__ ) . '/../classes/debug.php'); |
| |
| $activities = getReviews ( 'upcoming' ); |
| |
| print '<div class="block-box"><h3>Upcoming Reviews <a href="/projects/reviews-rss.php"><i class="fa fa-rss"></i></a></h3><div class="content">'; |
| |
| if (! $activities) { |
| print '<p>There are no reviews scheduled at this time.</p>'; |
| } else { |
| print '<p>The following reviews are scheduled, or have recently completed.</p>'; |
| $lastDate = null; |
| print '<ul class="list-unstyled reset">'; |
| /** @var \Review $activity */ |
| foreach ( $activities as $activity ) { |
| $date = $App->getFormattedDate ( $activity->getReviewDate(), 'long' ); |
| $date = str_replace ( ' ', ' ', $date ); |
| |
| $html_date = '<span class="orange date">' . $date . ' </span>'; |
| if ($lastDate) { |
| if ($lastDate != $date) { |
| echo '</ul><hr class="reset"/><br/><ul class="list-unstyled reset">'; |
| } else { |
| // Only print unique dates. |
| $html_date = ""; |
| } |
| } |
| |
| $lastDate = $date; |
| |
| print '<li>' . $activity->asHtml() . '</li>'; |
| } |
| print '</ul>'; |
| } |
| print '</div></div>'; |