openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit f66acdac13b4ff201fdfacec88b88d77a2230ce3
parent b3eb7b2295fe884d2e5af03657cec6ae58ea32bc
Author: dankert <devnull@localhost>
Date:   Tue,  8 May 2007 22:21:03 +0200

?berschreiben der Methode "checkmenu()"

Diffstat:
actionClasses/ModelAction.class.php | 34++++++++++++++++++++++++++++------
actionClasses/ModelAction.ini.php | 4+---
2 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/actionClasses/ModelAction.class.php b/actionClasses/ModelAction.class.php @@ -20,6 +20,9 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // --------------------------------------------------------------------------- // $Log$ +// Revision 1.9 2007-05-08 20:21:03 dankert +// ?berschreiben der Methode "checkmenu()" +// // Revision 1.8 2007-04-08 21:18:16 dankert // Korrektur URL in listing() // @@ -93,8 +96,16 @@ class ModelAction extends Action } + + /** + * Entfernen der Variante.<br> + * Es wird ein Bestätigungsdialog angezeigt. + */ function remove() { + $this->model->load(); + + $this->setTemplateVar( 'name',$this->model->name ); } @@ -169,16 +180,27 @@ class ModelAction extends Action } + /** + * Bearbeiten der Variante. + * Ermitteln aller Eigenschaften der Variante. + */ function edit() { - if ( count( $this->model->getAll() ) >= 2 ) - $this->setTemplateVar('delete',true ); - else $this->setTemplateVar('delete',false); - $this->model->load(); $this->setTemplateVars( $this->model->getProperties() ); - - $this->forward('model_edit'); + } + + + function checkmenu( $menu ) + { + switch( $menu ) + { + case 'remove': + return count( $this->model->getAll() ) >= 2; + + default: + return true; + } } } \ No newline at end of file diff --git a/actionClasses/ModelAction.ini.php b/actionClasses/ModelAction.ini.php @@ -12,9 +12,6 @@ menu=listing menu=edit target=save -[add] -menu=listing - [remove] menu=edit target=delete @@ -29,6 +26,7 @@ goto=edit goto=listing [add] +menu=listing target=addmodel [menu]