Changed field last_key to key_last

git-svn-id: file:///svn-source/pmgr/branches/v0.3_work@1047 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
Abijah
2014-03-04 00:47:16 +00:00
parent d903fcb9e3
commit bda18fc78a
3 changed files with 11 additions and 11 deletions

View File

@@ -38,7 +38,7 @@ class Lock extends AppModel {
$this->pr(5, compact('oldkey'));
if ($this->field('key') != $data['Lock']['key']) {
$data['Lock']['last_key'] = $this->field('key');
$data['Lock']['key_last'] = $this->field('key');
$data['Lock']['key_ts'] = date('Y-m-d G:i:s');
}

View File

@@ -4,11 +4,11 @@
$cols = array();
$cols['Name'] = array('index' => 'name', 'formatter' => 'name');
$cols['Comment'] = array('index' => 'comment', 'formatter' => 'comment');
$cols['Key'] = array('index' => 'key', 'formatter' => 'number');
$cols['Last Key'] = array('index' => 'last_key', 'formatter' => 'number');
$cols['Key/Combo'] = array('index' => 'key', 'formatter' => 'number');
$cols['Previous Key'] = array('index' => 'key_last', 'formatter' => 'number');
$cols['Quantity'] = array('index' => 'qty', 'formatter' => 'number');
$cols['In Use'] = array('index' => 'inuse', 'formatter' => 'number');
$cols['Available']= array('index' => 'avail', 'formatter' => 'number');
$cols['Available'] = array('index' => 'avail', 'formatter' => 'number');
// Render the grid
$grid
@@ -17,4 +17,4 @@ $grid
->defaultFields(array('Name'))
->searchFields(array('Name'))
->render($this, isset($config) ? $config : null,
array_diff(array_keys($cols), array('Last Key')));
array_diff(array_keys($cols), array('Previous Key')));

View File

@@ -16,8 +16,8 @@ $rows[] = array('Name', $lock['name']);
if ($lock['qty'] > 1)
$rows[] = array('Quantity', $lock['qty']);
$rows[] = array('Key', $lock['key']);
if (!empty($lock['last_key'])) {
$rows[] = array('Last Key', $lock['last_key'] . " (Changed on " . FormatHelper::datetime($lock['key_ts']) . ")");
if (!empty($lock['key_last'])) {
$rows[] = array('Previous Key', $lock['key_last'] . " (Changed on " . FormatHelper::datetime($lock['key_ts']) . ")");
}
$rows[] = array('Comment', $lock['comment']);