Widgitized the output

This commit is contained in:
Deon George
2012-11-30 09:58:15 +11:00
parent 808730e1e3
commit 4b51fc2727
40 changed files with 1139 additions and 1165 deletions

View File

@@ -56,7 +56,14 @@ class Model_LIBRARY extends TSM_ORM {
// Return the number of slots that are empty.
public function numemptyslot() {
return $this->slots->Slots-$this->slots->Changers-count($this->slots);
$return = array();
foreach ($this->slots() as $slot)
if ($slot->status == 'Empty')
array_push($return,$slot->LIBVOLUME->VOLUME);
return count($return);
//return $this->slots->Slots-$this->slots->Changers-count($this->slots);
}
// Return the slots that are used, but not checked in.

View File

@@ -25,7 +25,9 @@ class Model_LIBVOLUME extends TSM_ORM {
public function usage() {
switch (strtolower($this->STATUS)) {
case NULL: return 'empty';
case 'scratch': return strtolower($this->STATUS);
case 'private':
if ($this->VOLUME->STATUS == 'EMPTY')
return 'empty';
@@ -58,7 +60,6 @@ class Model_LIBVOLUME extends TSM_ORM {
switch ($this->usage()) {
case 'data': return sprintf('%s/%s',$this->VOLUME->display('STATUS'),$this->VOLUME->display('ACCESS'));
case 'dbbackup': return $this->VOLHISTORY->lastuse()->backupid();
case 'empty': return _('Empty');
default: return '';
}