Minor fixes for VOLUMEs and NODE
This commit is contained in:
parent
e7e3e42ba2
commit
c4409598be
@ -30,7 +30,14 @@ abstract class Controller_TemplateDefault_View extends Controller_TemplateDefaul
|
|||||||
$select[NULL] = '';
|
$select[NULL] = '';
|
||||||
|
|
||||||
foreach ($o->find_all() as $oo)
|
foreach ($o->find_all() as $oo)
|
||||||
$select[$oo->pk()] = $oo->pk();
|
// For some tables, are ID is base_64 encoded.
|
||||||
|
switch ($this->orm) {
|
||||||
|
case 'VOLUME': $select[base64_encode($oo->pk())] = $oo->pk();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$select[$oo->pk()] = $oo->pk();
|
||||||
|
}
|
||||||
|
|
||||||
$output .= Form::open(sprintf('%s/detail',strtolower($this->request->controller())),array('id'=>'object_detail'));
|
$output .= Form::open(sprintf('%s/detail',strtolower($this->request->controller())),array('id'=>'object_detail'));
|
||||||
$output .= sprintf('%s: %s',_('Choose to view'),Form::select('object_name',$select,NULL,array('id'=>'object_name')));
|
$output .= sprintf('%s: %s',_('Choose to view'),Form::select('object_name',$select,NULL,array('id'=>'object_name')));
|
||||||
|
@ -512,7 +512,7 @@ class Model_NODE extends ORM_TSM {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function file_mediaprotection() {
|
public function file_mediaprotection() {
|
||||||
return (int)$this->file_byptype('COPY')/(int)$this->file_byptype('PRIMARY');
|
return number_format((int)$this->file_byptype('COPY')/(int)$this->file_byptype('PRIMARY')*100,2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fs() {
|
public function fs() {
|
||||||
|
Reference in New Issue
Block a user