From 14691cd854be3e9ee272c9619a6368c83d72267b Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Sat, 18 Feb 2012 00:07:50 +0000 Subject: upload new EasyGiant library and added added a new filter for the model name (part 2) --- h-source/Library/Scaffold.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'h-source/Library/Scaffold.php') diff --git a/h-source/Library/Scaffold.php b/h-source/Library/Scaffold.php index ec0dc49..7e43134 100755 --- a/h-source/Library/Scaffold.php +++ b/h-source/Library/Scaffold.php @@ -51,6 +51,9 @@ class Scaffold //the list of fields of the select query public $fields = null; + //instance of Lang_{language}_Generic + public $strings = null; + public function __construct($type,$controller,$model,$viewArgs,$params = null) { $this->_type = $type; @@ -58,6 +61,9 @@ class Scaffold $this->model = $model; $this->viewArgs = $viewArgs; + //get the generic language class + $this->strings = Factory_Strings::generic(Params::$language); + $autoParams = array( 'mainAction' => 'main', 'modifyAction' => 'form/update', @@ -120,19 +126,22 @@ class Scaffold switch ($el) { case 'moveup': - $this->itemList->addItem('moveupForm',$this->_controller.'/'.$this->params['mainAction'],$primaryKey); + $this->itemList->addItem('moveupForm',$this->_controller.'/'.$this->params['mainAction'],";".$primaryKey.";"); break; case 'movedown': - $this->itemList->addItem('movedownForm',$this->_controller.'/'.$this->params['mainAction'],$primaryKey); + $this->itemList->addItem('movedownForm',$this->_controller.'/'.$this->params['mainAction'],";".$primaryKey.";"); break; case 'link': - $this->itemList->addItem('associateForm',$this->_controller.'/'.$this->params['associateAction'],$primaryKey); + $this->itemList->addItem('associateForm',$this->_controller.'/'.$this->params['associateAction'],";".$primaryKey.";"); break; case 'edit': - $this->itemList->addItem('editForm',$this->_controller.'/'.$this->params['modifyAction'],$primaryKey); + $this->itemList->addItem('editForm',$this->_controller.'/'.$this->params['modifyAction'],";".$primaryKey.";"); break; case 'del': - $this->itemList->addItem('delForm',$this->_controller.'/'.$this->params['mainAction'],$primaryKey); + $this->itemList->addItem('delForm',$this->_controller.'/'.$this->params['mainAction'],";".$primaryKey.";"); + break; + case 'ledit': + $this->itemList->addItem('ledit',$this->_controller.'/'.$this->params['mainAction'].'/;'.$primaryKey.';','Edit','Edit'); break; } } @@ -274,7 +283,7 @@ class Scaffold $popupHtml = "
\n".$this->html['popup']."\n
\n"; } - $this->html['all'] = "\n".$this->model->notice."\n $popupHtml \n
\n".$this->html['main']."\n
\n"."
\n
\n".$this->html['pageList']."
\n
\n\n"; + $this->html['all'] = "\n".$this->model->notice."\n $popupHtml \n
\n".$this->html['main']."\n
\n"."
\n
\n".$this->strings->gtext('pages').": ".$this->html['pageList']."
\n
\n\n"; } else if ($this->_type === 'form') -- cgit v1.2.3