openrat-cms

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

commit 3839e6a3f60105bece78cce610d3716c7f94de2a
parent b7d156552b94d80cea50f3a7fa5b756f78539b96
Author: dankert <devnull@localhost>
Date:   Fri,  6 Nov 2009 20:36:34 +0100

Funktion für Projekte überarbeitet.

Diffstat:
actionClasses/ProjectAction.class.php | 73+++++++++++++++++++++++++++++++++++++++++++++++++++----------------------
actionClasses/ProjectAction.ini.php | 23+++++++----------------
2 files changed, 58 insertions(+), 38 deletions(-)

diff --git a/actionClasses/ProjectAction.class.php b/actionClasses/ProjectAction.class.php @@ -104,7 +104,7 @@ class ProjectAction extends Action } - function save() + function editAction() { if ( $this->getRequestVar('name') != '') { @@ -128,7 +128,7 @@ class ProjectAction extends Action - function add() + function addView() { $this->setTemplateVar( 'projects',Project::getAll() ); } @@ -138,7 +138,7 @@ class ProjectAction extends Action * Projekt hinzufuegen. * */ - function addproject() + function addAction() { if ( !$this->hasRequestVar('type') ) { @@ -198,6 +198,9 @@ class ProjectAction extends Action } + /** + * Auswaehlen und starten eines Projektes. + */ function select() { $user = Session::getUser(); @@ -220,7 +223,10 @@ class ProjectAction extends Action } - function edit() + /** + * Anzeige der Eigenschaften des Projektes. + */ + function editView() { // Projekt laden $this->setTemplateVars( $this->project->getProperties() ); @@ -228,39 +234,53 @@ class ProjectAction extends Action } - function remove() + function removeView() { $this->setTemplateVar( 'name',$this->project->name ); } - function delete() + function removeAction() { - if ( $this->getRequestVar('delete') != '' ) - { - // Gesamtes Projekt loeschen - $this->project->delete(); - - $this->setTemplateVar('tree_refresh',true); - $this->addNotice('project',$this->project->name,'DELETED'); - } - else + if ( !$this->hasRequestVar('delete') ) { $this->addValidationError('delete'); - $this->callSubAction('remove'); + return; } + + // Gesamtes Projekt loeschen + $this->project->delete(); + + $this->setTemplateVar('tree_refresh',true); + $this->addNotice('project',$this->project->name,'DELETED'); } - function maintenance() + /** + * Anzeige View fuer Wartung. + */ + function maintenanceView() { - if ( $this->hasRequestVar('ok') ) + } + + + + /** + * Wartung durchfuehren. + * @return unknown_type + */ + function maintenanceAction() + { + if ( !$this->hasRequestVar('ok') ) { - $this->project->checkLostFiles(); - $this->addNotice('project',$this->project->name,'DONE'); - $this->setTemplateVar('done',true); + $this->addValidationError('ok'); + return; } + + $this->project->checkLostFiles(); + $this->addNotice('project',$this->project->name,'DONE'); + $this->setTemplateVar('done',true); } @@ -268,7 +288,16 @@ class ProjectAction extends Action /** * Projekt exportieren. */ - function export() + function exportView() + { + + } + + + /** + * Projekt exportieren. + */ + function exportAction() { $db = db_connection(); $this->setTemplateVar( 'dbid',$db->id ); diff --git a/actionClasses/ProjectAction.ini.php b/actionClasses/ProjectAction.ini.php @@ -1,4 +1,5 @@ +; Only admins are allowed to change project settings admin=true [phpinfo] @@ -12,34 +13,25 @@ menu=list [remove] menu=edit -target=delete - -[delete] -goto=listing +write=true [maintenance] menu=edit -target=maintenance +write=true [export] menu=edit -target=export +write=true [edit] -target=save menu=edit editable=true - -[addproject] -goto=listing - -[save] -goto=edit +write=true [add] menu=list -target=addproject +write=true [menu] list=listing,add -edit=edit,remove,export,maintenance- \ No newline at end of file +edit=edit,remove,export,maintenance