Added more lock functionality, and fixed a couple bugs

git-svn-id: file:///svn-source/pmgr/branches/v0.3_work@1039 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
Abijah
2014-03-03 06:04:00 +00:00
parent e08afdd8b1
commit ec0363325c
8 changed files with 58 additions and 12 deletions

View File

@@ -135,8 +135,3 @@ echo $form->submit('Cancel', array('name' => 'cancel')) . "\n";
echo $form->end() . "\n";
echo '</div>' . "\n";
echo "\n<PRE>\n";
echo print_r($this->data, true);
echo print_r($this->varstore, true);
echo "\n</PRE>\n";

View File

@@ -13,12 +13,25 @@ $leases = $unit['Lease'];
$current_lease = $unit['CurrentLease'];
$unit_size = $unit['UnitSize'];
if (isset($unit['Lock']))
$locks = $unit['Lock'];
if (isset($unit['Unit']))
$unit = $unit['Unit'];
$rows = array();
$rows[] = array('Name', $unit['name']);
$rows[] = array('Status', $unit['status']);
if (count($locks) > 0) {
$links = array();
foreach ($locks AS $lock) {
$links[] = $html->link($lock['name'],
array('controller' => 'locks',
'action' => 'view',
$lock['id']));
}
$rows[] = array('Locks', count($locks) . ": " . implode(", ", $links));
}
$rows[] = array('Size', $html->link($unit_size['name'],
array('controller' => 'unit_sizes',
'action' => 'view',