Merge in from pre_0.1 branch
git-svn-id: file:///svn-source/pmgr/trunk/site@847 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
88
views/unit_sizes/view.ctp
Normal file
88
views/unit_sizes/view.ctp
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php /* -*- mode:PHP -*- */
|
||||
|
||||
echo '<div class="unit-size view">' . "\n";
|
||||
|
||||
/**********************************************************************
|
||||
**********************************************************************
|
||||
**********************************************************************
|
||||
**********************************************************************
|
||||
* UnitSize Detail Main Section
|
||||
*/
|
||||
|
||||
$unit_type = $size['UnitType'];
|
||||
$unit_size = $size['UnitSize'];
|
||||
|
||||
$rows = array();
|
||||
$rows[] = array('Name', $unit_size['name']);
|
||||
$rows[] = array('Type', $unit_type['name']);
|
||||
$rows[] = array('Width', $unit_size['width'] . ' Feet');
|
||||
$rows[] = array('Depth', $unit_size['depth'] . ' Feet');
|
||||
if (!empty($unit_size['height']))
|
||||
$rows[] = array('Height', $unit_size['height'] . ' Feet');
|
||||
if (!empty($unit_size['sqft']))
|
||||
$rows[] = array('Area', ($unit_size['sqft'] . ' Square Feet'
|
||||
. ' ('. FormatHelper::currency($unit_size['rent'] / $unit_size['sqft'])
|
||||
. ' / Square Foot)'));
|
||||
if (!empty($unit_size['cuft']))
|
||||
$rows[] = array('Volume', ($unit_size['cuft'] . ' Cubic Feet'
|
||||
. ' ('. FormatHelper::currency($unit_size['rent'] / $unit_size['cuft'])
|
||||
. ' / Cubic Foot)'));
|
||||
$rows[] = array('Deposit', FormatHelper::currency($unit_size['deposit']));
|
||||
$rows[] = array('Rent', FormatHelper::currency($unit_size['rent']));
|
||||
$rows[] = array('Comment', $unit_size['comment']);
|
||||
|
||||
echo $this->element('table',
|
||||
array('class' => 'item unit_size detail',
|
||||
'caption' => 'Unit Size Detail',
|
||||
'rows' => $rows,
|
||||
'column_class' => array('field', 'value')));
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* UnitSize Info Box
|
||||
*/
|
||||
|
||||
echo '<div class="infobox">' . "\n";
|
||||
$rows = array();
|
||||
$rows[] = array($unit_size['name'] . ' Units:', $stats['all']);
|
||||
$rows[] = array('Unavailable:', $stats['unavailable']);
|
||||
$rows[] = array('Vacant:', $stats['vacant']);
|
||||
$rows[] = array('Occupied:', $stats['occupied']);
|
||||
echo $this->element('table',
|
||||
array('class' => 'summary',
|
||||
'rows' => $rows,
|
||||
'column_class' => array('field', 'value'),
|
||||
'suppress_alternate_rows' => true,
|
||||
));
|
||||
echo '</div>' . "\n";
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
**********************************************************************
|
||||
**********************************************************************
|
||||
**********************************************************************
|
||||
* Supporting Elements Section
|
||||
*/
|
||||
|
||||
echo '<div CLASS="detail supporting">' . "\n";
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Ledger Entries
|
||||
*/
|
||||
|
||||
echo $this->element('units', array
|
||||
(// Grid configuration
|
||||
'config' => array
|
||||
('caption' => $unit_size['name'] . " Units",
|
||||
'filter' => array('unit_size_id' => $unit_size['id']),
|
||||
'include' => array('Deposit', 'Comment'),
|
||||
'exclude' => array('Size', 'Area', 'Balance'),
|
||||
)));
|
||||
|
||||
|
||||
/* End "detail supporting" div */
|
||||
echo '</div>' . "\n";
|
||||
|
||||
/* End page div */
|
||||
echo '</div>' . "\n";
|
||||
Reference in New Issue
Block a user