Widgitized the output
This commit is contained in:
@@ -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.
|
||||
|
@@ -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 '';
|
||||
}
|
||||
|
Reference in New Issue
Block a user