2009-12-18 16:54:06 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @copyright 2009 City of Bloomington, Indiana
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
|
|
|
|
* @author Cliff Ingham <inghamn@bloomington.in.gov>
|
2009-12-18 17:40:05 +00:00
|
|
|
* @param IntermentList $this->intermentList
|
2009-12-18 16:54:06 +00:00
|
|
|
*/
|
|
|
|
?>
|
|
|
|
<div class="interfaceBox">
|
|
|
|
<h1>
|
|
|
|
<?php
|
2009-12-18 17:40:05 +00:00
|
|
|
if (userIsAllowed('Interments')) {
|
2009-12-18 16:54:06 +00:00
|
|
|
echo "
|
2009-12-18 17:40:05 +00:00
|
|
|
<button type=\"button\" class=\"add\" onclick=\"document.location.href='".BASE_URL."/interments/addInterment.php';\">
|
2009-12-18 16:54:06 +00:00
|
|
|
Add
|
|
|
|
</button>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
?>
|
2009-12-18 17:40:05 +00:00
|
|
|
Interments
|
2009-12-18 16:54:06 +00:00
|
|
|
</h1>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr><th></th>
|
|
|
|
<th>Last Name</th>
|
|
|
|
<th>First Name</th>
|
|
|
|
<th>Date of Death</th>
|
|
|
|
<th>Cemetery</th>
|
|
|
|
<th>Section & Lot</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
2009-12-18 17:40:05 +00:00
|
|
|
foreach ($this->intermentList as $interment) {
|
2009-12-18 16:54:06 +00:00
|
|
|
$editButton = '';
|
2009-12-18 17:40:05 +00:00
|
|
|
if (userIsAllowed('Interments')) {
|
|
|
|
$url = new URL(BASE_URL.'/interments/updateInterment.php');
|
|
|
|
$url->interment_id = $interment->getId();
|
2009-12-18 16:54:06 +00:00
|
|
|
$editButton = "
|
|
|
|
<button type=\"button\" class=\"edit\" onclick=\"document.location.href='$url';\">
|
|
|
|
Edit
|
|
|
|
</button>
|
|
|
|
";
|
|
|
|
}
|
2009-12-18 17:40:05 +00:00
|
|
|
$last = View::escape($interment->getLastname());
|
|
|
|
$first = View::escape($interment->getFirstname());
|
|
|
|
$date = $interment->getDeceasedDate('n/j/Y');
|
|
|
|
$cemetery = View::escape($interment->getCemetery());
|
2009-12-18 16:54:06 +00:00
|
|
|
|
|
|
|
$section_lot = array();
|
2009-12-18 17:40:05 +00:00
|
|
|
if ($interment->getSection()) {
|
|
|
|
$section_lot[] = $interment->getSection();
|
2009-12-18 16:54:06 +00:00
|
|
|
}
|
2009-12-18 17:40:05 +00:00
|
|
|
if ($interment->getLot()) {
|
|
|
|
$section_lot[] = $interment->getLot();
|
2009-12-18 16:54:06 +00:00
|
|
|
}
|
|
|
|
$section_lot = View::escape(implode(', ',$section_lot));
|
|
|
|
|
|
|
|
echo "
|
|
|
|
<tr><td>$editButton</td>
|
2009-12-18 20:57:41 +00:00
|
|
|
<td><a href=\"{$interment->getURL()}\">$last</a></td>
|
2009-12-18 16:54:06 +00:00
|
|
|
<td>$first</td>
|
|
|
|
<td>$date</td>
|
|
|
|
<td>$cemetery</td>
|
|
|
|
<td>$section_lot</td>
|
|
|
|
</tr>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<?php
|
2009-12-18 17:40:05 +00:00
|
|
|
if ($this->intermentList->getPaginator()) {
|
2009-12-18 16:54:06 +00:00
|
|
|
$pageNavigation = new Block('pageNavigation.inc',
|
2009-12-18 17:40:05 +00:00
|
|
|
array('pages'=>$this->intermentList->getPaginator()->getPages()));
|
2009-12-18 16:54:06 +00:00
|
|
|
echo $pageNavigation->render('html');
|
|
|
|
}
|
|
|
|
?>
|