aboutsummaryrefslogtreecommitdiff
path: root/h-source/Library/Scaffold.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2012-02-18 00:07:50 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2012-02-18 00:07:50 +0000
commit14691cd854be3e9ee272c9619a6368c83d72267b (patch)
tree89215d53db8d6f01bb24a5c1d30d9dd4c8d7a5b9 /h-source/Library/Scaffold.php
parenta2c0b2c4f80463a94e2dd87b59f193ab3aa925eb (diff)
upload new EasyGiant library and added added a new filter for the model name (part 2)
Diffstat (limited to 'h-source/Library/Scaffold.php')
-rwxr-xr-xh-source/Library/Scaffold.php21
1 files changed, 15 insertions, 6 deletions
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 = "<div class='verticalMenu'>\n".$this->html['popup']."\n</div>\n";
}
- $this->html['all'] = "<div class='mainMenu'>".$this->html['menu']."</div>\n".$this->model->notice."\n $popupHtml \n<div class='recordsBox'>\n".$this->html['main']."\n</div>\n"."<div class='viewFooter'>\n<div class='pageList'>\n".$this->html['pageList']."</div>\n</div>\n\n";
+ $this->html['all'] = "<div class='mainMenu'>".$this->html['menu']."</div>\n".$this->model->notice."\n $popupHtml \n<div class='recordsBox'>\n".$this->html['main']."\n</div>\n"."<div class='viewFooter'>\n<div class='pageList'>\n<span class='page_list_legend'>".$this->strings->gtext('pages').":</span> ".$this->html['pageList']."</div>\n</div>\n\n";
}
else if ($this->_type === 'form')