2009-12-18 12:56:12 +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 15:01:46 +00:00
|
|
|
* @param DeedList $this->deedList
|
2009-12-18 12:56:12 +00:00
|
|
|
*/
|
|
|
|
?>
|
|
|
|
<div class="interfaceBox">
|
2010-01-06 18:10:10 +00:00
|
|
|
<h2>
|
2009-12-18 12:56:12 +00:00
|
|
|
<?php
|
|
|
|
if (userIsAllowed('Deeds')) {
|
|
|
|
echo "
|
|
|
|
<button type=\"button\" class=\"add\" onclick=\"document.location.href='".BASE_URL."/deeds/addDeed.php';\">
|
|
|
|
Add
|
|
|
|
</button>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
Deeds
|
2010-01-06 18:10:10 +00:00
|
|
|
</h2>
|
2009-12-18 12:56:12 +00:00
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr><th></th>
|
|
|
|
<th>Section, Lot</th>
|
|
|
|
<th>Owner 1</th>
|
|
|
|
<th>Owner 2</th>
|
|
|
|
<th>Issue Date</th>
|
|
|
|
<th>Cemetery</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
|
|
|
foreach ($this->deedList as $deed) {
|
|
|
|
$editButton = '';
|
|
|
|
if (userIsAllowed('Deeds')) {
|
|
|
|
$url = new URL(BASE_URL.'/deeds/updateDeed.php');
|
2009-12-18 14:28:25 +00:00
|
|
|
$url->deed_id = $deed->getId();
|
2009-12-18 12:56:12 +00:00
|
|
|
$editButton = "
|
|
|
|
<button type=\"button\" class=\"edit\" onclick=\"document.location.href='$url';\">
|
|
|
|
Edit
|
|
|
|
</button>
|
|
|
|
";
|
2010-01-29 18:33:16 +00:00
|
|
|
|
|
|
|
$url = new URL(BASE_URL.'/deeds/deleteDeed.php');
|
|
|
|
$url->deed_id = $deed->getId();
|
|
|
|
$url->return_url = "http://$_SERVER[SERVER_NAME]$_SERVER[REQUEST_URI]";
|
|
|
|
$deleteButton = "
|
|
|
|
<button type=\"button\" class=\"delete\" onclick=\"COB.deleteConfirmation('$url');\">
|
|
|
|
Delete
|
|
|
|
</button>
|
|
|
|
";
|
2009-12-18 12:56:12 +00:00
|
|
|
}
|
|
|
|
$section = View::escape($deed->getSection());
|
|
|
|
$lot = View::escape($deed->getLot());
|
|
|
|
$owner1 = View::escape($deed->getOwner(1));
|
|
|
|
$owner2 = View::escape($deed->getOwner(2));
|
|
|
|
$date = $deed->getIssueDate('n/j/Y');
|
2009-12-18 14:28:25 +00:00
|
|
|
$cemetery = $deed->getCemetery() ? View::escape($deed->getCemetery()->getName()) : '';
|
2009-12-18 12:56:12 +00:00
|
|
|
echo "
|
2010-01-29 18:33:16 +00:00
|
|
|
<tr><td>$editButton $deleteButton</td>
|
2009-12-18 12:56:12 +00:00
|
|
|
<td>{$deed->getSection()}, {$deed->getLot()}</td>
|
2009-12-18 14:28:25 +00:00
|
|
|
<td>$owner1</td>
|
|
|
|
<td>$owner2</td>
|
|
|
|
<td>$date</td>
|
|
|
|
<td>$cemetery</td>
|
|
|
|
</tr>
|
2009-12-18 12:56:12 +00:00
|
|
|
";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2009-12-18 14:28:25 +00:00
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
if ($this->deedList->getPaginator()) {
|
|
|
|
$pageNavigation = new Block('pageNavigation.inc',
|
|
|
|
array('pages'=>$this->deedList->getPaginator()->getPages()));
|
|
|
|
echo $pageNavigation->render('html');
|
|
|
|
}
|
|
|
|
?>
|