Adding mapping ability. Incomplete as of yet, but coming along nicely.

git-svn-id: file:///svn-source/pmgr/branches/initial_20090526/site@32 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-05-29 01:47:12 +00:00
parent 8f4f3c054e
commit 23ec1b6b20
5 changed files with 492 additions and 0 deletions

61
views/elements/maps.ctp Normal file
View File

@@ -0,0 +1,61 @@
<?php /* -*- mode:PHP -*- */ ?>
<p>
<?php
if (isset($heading))
echo $heading;
else
echo '<h2>'.__('Maps',true).'</h2>';
?>
</p>
<table cellpadding="0" cellspacing="0">
<?php
{
if (isset($paginator)) {
echo $paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records (%start% - %end%) of %count% total', true)));
$rows = array($paginator->sort('id'),
$paginator->sort('name'),
$paginator->sort('site_area_id'),
$paginator->sort('width'),
$paginator->sort('depth'),
$paginator->sort('comment'));
} else {
$rows = array('Id', 'Name', 'Area', 'Width', 'Depth', 'Comment');
}
echo $html->tableHeaders($rows);
$rows = array();
foreach ($maps as $map) {
$rows[] = array($html->link($map['Map']['id'],
array('controller' => 'maps',
'action' => 'view',
$map['Map']['id'])),
$html->link($map['Map']['name'],
array('controller' => 'maps',
'action' => 'view',
$map['Map']['id'])),
$map['SiteArea']['name'],
$map['Map']['width'] / 12,
$map['Map']['depth'] / 12,
$map['Map']['comment']);
}
echo $html->tableCells($rows, null, array('class' => "altrow"), false, false);
}
?>
</table>
<?php
if (isset($paginator)) {
echo('<div class="paging">' . "\n");
echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));
echo(' | ');
echo $paginator->numbers();
echo(' | ');
echo $paginator->next(__('next', true).' >>', array(), null, array('class'=>'disabled'));
echo('</div>' . "\n");
}
?>