Created a page to view the maps for an interment
git-svn-id: https://rosehill.googlecode.com/svn/branches/php@20 100bd78a-fc82-11de-b5bc-ffd2847a4b57
This commit is contained in:
parent
9545bd18d7
commit
1d469ec267
|
@ -4,7 +4,7 @@
|
||||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
|
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
|
||||||
* @param Interment $this->interment
|
* @param Interment $this->interment
|
||||||
*/
|
*/
|
||||||
$mapURL = BASE_URL.'/interments/map.php?interment_id='.$this->interment->getId();
|
$mapURL = BASE_URL.'/interments/maps.php?interment_id='.$this->interment->getId();
|
||||||
$cemetery = $this->interment->getCemetery();
|
$cemetery = $this->interment->getCemetery();
|
||||||
$name = View::escape($cemetery->getName());
|
$name = View::escape($cemetery->getName());
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?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>
|
||||||
|
* @param Interment $this->interment
|
||||||
|
*/
|
||||||
|
echo "
|
||||||
|
<p class=\"back\">
|
||||||
|
<a href=\"{$this->interment->getURL()}\">Back to Interment Details</a>
|
||||||
|
</p>
|
||||||
|
";
|
||||||
|
|
||||||
|
$highlighted_map = $this->interment->getSection()->getMap();
|
||||||
|
if ($highlighted_map) {
|
||||||
|
echo "
|
||||||
|
<h2>Entire Cemetery with Section Highlighted</h2>
|
||||||
|
<div><img src=\"$highlighted_map\" /></div>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "
|
||||||
|
<h2>Entire Cemetery </h2>
|
||||||
|
<div><img src=\"{$this->interment->getCemetery()->getMap()}\" /></div>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
|
$zoomed_map = $this->interment->getSection()->getMap('zoom');
|
||||||
|
if ($zoomed_map) {
|
||||||
|
echo "
|
||||||
|
<h2>Close-up of Section</h2>
|
||||||
|
<div><img src=\"$zoomed_map\" /></div>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "
|
||||||
|
<p>
|
||||||
|
We do not have information for this burial or we do not have the section currently mapped.
|
||||||
|
</p>
|
||||||
|
";
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @copyright 2010 City of Bloomington, Indiana
|
||||||
|
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
|
||||||
|
* @author Cliff Ingham <inghamn@bloomington.in.gov>
|
||||||
|
* @param GET interment_id
|
||||||
|
*/
|
||||||
|
try {
|
||||||
|
if (!isset($_GET['interment_id']) || !$_GET['interment_id']) {
|
||||||
|
throw new Exception('interments/unknownInterment');
|
||||||
|
}
|
||||||
|
$interment = new Interment($_GET['interment_id']);
|
||||||
|
}
|
||||||
|
catch (Exception $e) {
|
||||||
|
$_SESSION['errorMessages'][] = $e;
|
||||||
|
header('Location: '.BASE_URL.'/interments');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
$template = new Template('full-width');
|
||||||
|
$template->blocks[] = new Block('interments/maps.inc',array('interment'=>$interment));
|
||||||
|
echo $template->render();
|
Loading…
Reference in New Issue