Files
pmgr/site/views/maps/view.ctp
abijah 309512dde0 Added tooltips to the sitemap. At some point, we hope to incorporate a jquery plugin for nicer presentation, but this gets the basics.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@616 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-08-18 06:41:49 +00:00

64 lines
1.5 KiB
PHP

<?php /* -*- mode:PHP -*- */ ?>
<DIV class="map">
<MAP name="mapzones">
<?php
{// for indentation purposes
// Go through each unit, adding a clickable region for the unit
foreach ($info['units'] AS $unit){
echo(' <area shape="rect"' .
' coords="' .
$unit['left'] . ',' .
$unit['top'] . ',' .
$unit['right'] . ',' .
$unit['bottom'] .
'" href="' .
$html->url(array('controller' => 'units',
'action' => 'view',
$unit['id'])) .
'" alt="Unit #' .
$unit['name'] .
'" title="Unit #' .
$unit['name'] .
(empty($unit['data']['CurrentLease']['id'])
? ''
: ('; ' .
/* 'Lease #' . */
/* $unit['data']['CurrentLease']['id'] . */
/* '; ' . */
$unit['data']['Customer']['name'] .
'; Paid Through ' .
$unit['data']['CurrentLease']['paid_through_date'])
) .
'">' . "\n");
}
}// for indentation purposes
?>
</MAP>
<?php
echo $html->image(array('controller' => 'maps',
'action' => 'map',
$info['map_id'],
$info['width']),
array('alt' => 'Site Map',
'class' => 'map',
'border' => 0,
'usemap' => '#mapzones'));
?>
</DIV>
<DIV class="legend">
<?php
echo $html->image(array('controller' => 'maps',
'action' => 'legend',
$info['map_id'],
$info['width']/2),
array('alt' => 'Site Map Legend',
'class' => 'legend'));
?>
</DIV>