diff --git a/application/classes/Controller/TemplateDefault/View.php b/application/classes/Controller/TemplateDefault/View.php index d89c31c..dd7fd69 100644 --- a/application/classes/Controller/TemplateDefault/View.php +++ b/application/classes/Controller/TemplateDefault/View.php @@ -30,7 +30,14 @@ abstract class Controller_TemplateDefault_View extends Controller_TemplateDefaul $select[NULL] = ''; 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 .= sprintf('%s: %s',_('Choose to view'),Form::select('object_name',$select,NULL,array('id'=>'object_name'))); diff --git a/application/classes/Model/NODE.php b/application/classes/Model/NODE.php index 488b187..1dbbe78 100644 --- a/application/classes/Model/NODE.php +++ b/application/classes/Model/NODE.php @@ -512,7 +512,7 @@ class Model_NODE extends ORM_TSM { } 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() {