openrat-cms

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

commit 1817015577165b4c3cc98b05afb2bd0a020d1166
parent 8f939fcbddcf3515fd3f55aa8920c00e79c07a3f
Author: dankert <devnull@localhost>
Date:   Sat, 22 Dec 2007 00:21:41 +0100

Beim Aufruf von "Administration" oder "Projekt" mit leerer Seite starten.

Diffstat:
actionClasses/IndexAction.class.php | 99++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------
actionClasses/MainAction.class.php | 82+++++++++++--------------------------------------------------------------------
actionClasses/MainAction.ini.php | 34+++++++++++++++++-----------------
actionClasses/MainmenuAction.class.php | 20+++++++++++++++++---
actionClasses/MainmenuAction.ini.php | 3+++
themes/default/templates/empty/background.tpl.src.php | 2++
themes/default/templates/empty/blank.tpl.src.php | 2++
themes/default/templates/empty/border.tpl.src.php | 2++
themes/default/templates/mainmenu/show.tpl.src.php | 21++++++++++++---------
9 files changed, 131 insertions(+), 134 deletions(-)

diff --git a/actionClasses/IndexAction.class.php b/actionClasses/IndexAction.class.php @@ -906,10 +906,15 @@ class IndexAction extends Action } $object = Session::getObject(); - if ( !is_object($object) || $object->projectid != $project->projectid) - $object = new Object( $project->getRootObjectId() ); - $object->objectLoadRaw(); - Session::setObject( $object ); + if ( is_object($object) && $object->projectid == $project->projectid ) + { + $object->objectLoadRaw(); + Session::setObject( $object ); + } + else + { + Session::setObject( '' ); + } } elseif ( isset($vars[REQ_PARAM_MODEL_ID]) && Model::available($vars[REQ_PARAM_MODEL_ID]) ) { @@ -931,9 +936,15 @@ class IndexAction extends Action $object = Session::getObject(); $object->objectLoadRaw(); - if ( !is_object($object) || $object->projectid != $project->projectid) - $object = new Object( $project->getRootObjectId() ); - Session::setObject( $object ); + if ( is_object($object) && $object->projectid == $project->projectid ) + { + $object->objectLoadRaw(); + Session::setObject( $object ); + } + else + { + Session::setObject( '' ); + } } elseif ( isset($vars[REQ_PARAM_PROJECT_ID])&&Project::available($vars[REQ_PARAM_PROJECT_ID]) ) { @@ -951,10 +962,15 @@ class IndexAction extends Action Session::setProjectModel( $model ); $object = Session::getObject(); - if ( !is_object($object) || $object->projectid != $project->projectid) - $object = new Object( $project->getRootObjectId() ); - $object->objectLoadRaw(); - Session::setObject( $object ); + if ( is_object($object) && $object->projectid == $project->projectid ) + { + $object->objectLoadRaw(); + Session::setObject( $object ); + } + else + { + Session::setObject( '' ); + } } } @@ -1096,43 +1112,58 @@ class IndexAction extends Action $elementid = 0; - if ( is_object($object) ) + if ( is_object($project) ) { - $type = $object->getType(); - - if ( $type == 'page' ) - { - $page = new Page($object->objectid); - $page->load(); - $elementList = $page->getWritableElements(); - if ( count($elementList) == 1 ) - $elementid = current(array_keys($elementList)); + if ( is_object($object) ) + { + $type = $object->getType(); + + if ( $type == 'page' ) + { + $page = new Page($object->objectid); + $page->load(); + $elementList = $page->getWritableElements(); + if ( count($elementList) == 1 ) + $elementid = current(array_keys($elementList)); + } + + if ( $elementid > 0 ) + $this->setTemplateVar( 'frame_src_main',Html::url('main','pageelement',$object->objectid,array('elementid'=>$elementid,'targetSubAction'=>'advanced')) ); + else + $this->setTemplateVar( 'frame_src_main',Html::url('main',$type,$object->objectid) ); } - - if ( $elementid > 0 ) - $this->setTemplateVar( 'frame_src_main',Html::url('main','pageelement',$object->objectid,array('elementid'=>$elementid,'targetSubAction'=>'advanced')) ); else - $this->setTemplateVar( 'frame_src_main',Html::url('main',$type,$object->objectid) ); + { + $this->setTemplateVar( 'frame_src_main',Html::url('main','empty',0,array(REQ_PARAM_TARGETSUBACTION=>'blank')) ); + } } - elseif ( is_object($project) && $project->projectid == PROJECTID_ADMIN ) + elseif ( is_object($project) && $project->projectid == PROJECTID_ADMIN ) { - $this->setTemplateVar( 'frame_src_main',Html::url('main','project') ); + if ( $this->hasRequestVar('projectid') ) + $this->setTemplateVar( 'frame_src_main',Html::url('main','project',$this->getRequestVar('projectid')) ); + elseif ( $this->hasRequestVar('groupid') ) + $this->setTemplateVar( 'frame_src_main',Html::url('main','group' ,$this->getRequestVar('groupid' )) ); + elseif ( $this->hasRequestVar('userid') ) + $this->setTemplateVar( 'frame_src_main',Html::url('main','user' ,$this->getRequestVar('userid' )) ); + else + $this->setTemplateVar( 'frame_src_main',Html::url('main','empty',0,array(REQ_PARAM_TARGETSUBACTION=>'blank')) ); } else { $this->callSubAction( 'projectmenu' ); } - $this->setTemplateVar( 'frame_src_title' ,Html::url( 'title' ) ); $this->setTemplateVar( 'show_tree',(Session::get('showtree')==true) ); - $this->setTemplateVar( 'frame_src_tree_menu' ,Html::url( 'treemenu' ) ); - $this->setTemplateVar( 'frame_src_tree_title',Html::url( 'treetitle' ) ); - $this->setTemplateVar( 'frame_src_tree' ,Html::url( 'tree' ,'load') ); - $this->setTemplateVar( 'frame_src_clipboard' ,Html::url( 'clipboard' ) ); - $this->setTemplateVar( 'frame_src_border' ,Html::url( 'border' ) ); - $this->setTemplateVar( 'frame_src_background',Html::url( 'background' ) ); + $this->setTemplateVar( 'frame_src_title' ,Html::url( 'title' ) ); + $this->setTemplateVar( 'frame_src_tree_menu' ,Html::url( 'treemenu' ) ); + $this->setTemplateVar( 'frame_src_tree_title',Html::url( 'treetitle' ) ); + $this->setTemplateVar( 'frame_src_tree' ,Html::url( 'tree' ,'load' ) ); + $this->setTemplateVar( 'frame_src_clipboard' ,Html::url( 'clipboard' ) ); + $this->setTemplateVar( 'frame_src_border' ,Html::url( 'empty' ,'border' ) ); + $this->setTemplateVar( 'frame_src_background',Html::url( 'empty' ,'background') ); + $this->setTemplateVar( 'frame_src_status' ,Html::url( 'status' ) ); $this->setTemplateVar( 'tree_width',$conf['interface']['tree_width'] ); diff --git a/actionClasses/MainAction.class.php b/actionClasses/MainAction.class.php @@ -20,7 +20,10 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // --------------------------------------------------------------------------- // $Log$ -// Revision 1.10 2007-01-21 15:35:44 dankert +// Revision 1.11 2007-12-21 23:21:40 dankert +// Beim Aufruf von "Administration" oder "Projekt" mit leerer Seite starten. +// +// Revision 1.10 2007/01/21 15:35:44 dankert // Requestparameter-Namen aus Konstanten lesen. // // Revision 1.9 2006/02/27 19:17:50 dankert @@ -62,80 +65,17 @@ class MainAction extends Action { - var $defaultSubAction = 'show'; - - var $doActionName = ""; - var $doSubActionName = ""; - - - function element() - { - $this->doActionName = 'element'; - } - function folder() - { - $this->doActionName = 'folder'; - } - function file() - { - $this->doActionName = 'file'; - } - function group() - { - $this->doActionName = 'group'; - } - function language() - { - $this->doActionName = 'language'; - } - function link() - { - $this->doActionName = 'link'; - } - function model() - { - $this->doActionName = 'model'; - } - function page() - { - $this->doActionName = 'page'; - } - function pageelement() - { - $this->doActionName = 'pageelement'; - } - function project() - { - $this->doActionName = 'project'; - } - function search() - { - $this->doActionName = 'search'; - } - function template() - { - $this->doActionName = 'template'; - } - function transfer() - { - $this->doActionName = 'transfer'; - } - function user() - { - $this->doActionName = 'user'; - } - - - function show() - { + { + $doActionName = $this->subActionName; + $user = Session::getUser(); if ( is_object($user) && isset($user->loginDate) ) $this->lastModified( $user->loginDate ); - $this->doSubActionName = $this->getRequestVar( REQ_PARAM_TARGETSUBACTION ); + $doSubActionName = $this->getRequestVar( REQ_PARAM_TARGETSUBACTION ); - // Bestimmte Paramer weiterleiten + // Bestimmte Parameter weiterleiten $params = array(); foreach( array('elementid') as $p ) @@ -145,8 +85,8 @@ class MainAction extends Action } // Variablen fuellen - $this->setTemplateVar('frame_src_main_menu' ,Html::url( 'mainmenu' ,$this->doActionName ,$this->getRequestId(),$params ) ); - $this->setTemplateVar('frame_src_main_main' ,Html::url( $this->doActionName,$this->doSubActionName,$this->getRequestId(),$params ) ); + $this->setTemplateVar('frame_src_main_menu' ,Html::url( 'mainmenu' ,$doActionName ,$this->getRequestId(),$params ) ); + $this->setTemplateVar('frame_src_main_main' ,Html::url( $doActionName,$doSubActionName,$this->getRequestId(),$params ) ); $this->setTemplateVar('frame_src_border' ,Html::url( 'border' ) ); $this->setTemplateVar('frame_src_background',Html::url( 'background' ) ); } diff --git a/actionClasses/MainAction.ini.php b/actionClasses/MainAction.ini.php @@ -1,47 +1,47 @@ -[default] -goto=show - [element] -goto=show +alias=show [file] -goto=show +alias=show + +[empty] +alias=show [folder] -goto=show +alias=show [group] -goto=show +alias=show [language] -goto=show +alias=show [link] -goto=show +alias=show [model] -goto=show +alias=show [page] -goto=show +alias=show [pageelement] -goto=show +alias=show [project] -goto=show +alias=show [search] -goto=show +alias=show [show] [template] -goto=show +alias=show [transfer] -goto=show +alias=show [user] -goto=show +alias=show diff --git a/actionClasses/MainmenuAction.class.php b/actionClasses/MainmenuAction.class.php @@ -32,6 +32,7 @@ class MainmenuAction extends Action var $subActionList = array(); var $path = array(); + var $search = false; var $obj; @@ -54,13 +55,15 @@ class MainmenuAction extends Action $this->addSubAction( 'pub' ,-1 ); $this->addSubAction( 'prop' ,-1 ); $this->addSubAction( 'src' ,-1 ); - $this->addSubAction( 'rights',-1 ); + $this->addSubAction( 'rights',-1 ); + $this->search = true; break; case 'language': case 'model': $this->addSubAction( 'listing',-1 ); $this->addSubAction( 'edit' ,-1 ); + $this->search = true; break; case 'project': @@ -81,9 +84,13 @@ class MainmenuAction extends Action $this->addSubAction( 'el' ,-1 ); $this->addSubAction( 'src' ,-1 ); $this->addSubAction( 'prop' ,-1 ); + $this->search = true; break; + case 'blank': default: + $this->setTemplateVar('windowMenu',array() ); + $this->setTemplateVar('text' ,'' ); } } @@ -476,15 +483,22 @@ class MainmenuAction extends Action 'type' =>'close') ) ); $this->setTemplateVar('actionid',$this->getRequestId() ); - $this->setTemplateVar('action' ,$this->subActionName ); if ( $this->subActionName == 'pageelement') - $this->setTemplateVar('action','page'); + $this->setTemplateVar('action','page'); + else + $this->setTemplateVar('action',$this->subActionName ); $this->setTemplateVar('name' ,$this->subActionName); $this->setTemplateVar('css_body_class','menu' ); $this->setTemplateVar('path' ,$this->path ); + } + + + + function blank() + { } } diff --git a/actionClasses/MainmenuAction.ini.php b/actionClasses/MainmenuAction.ini.php @@ -2,6 +2,9 @@ [default] goto=show +[empty] +alias=show + [element] goto=show diff --git a/themes/default/templates/empty/background.tpl.src.php b/themes/default/templates/empty/background.tpl.src.php @@ -0,0 +1 @@ +page class:background+ \ No newline at end of file diff --git a/themes/default/templates/empty/blank.tpl.src.php b/themes/default/templates/empty/blank.tpl.src.php @@ -0,0 +1 @@ +page+ \ No newline at end of file diff --git a/themes/default/templates/empty/border.tpl.src.php b/themes/default/templates/empty/border.tpl.src.php @@ -0,0 +1 @@ +page class:border+ \ No newline at end of file diff --git a/themes/default/templates/mainmenu/show.tpl.src.php b/themes/default/templates/mainmenu/show.tpl.src.php @@ -4,7 +4,8 @@ page if true:!config:interface/application_mode row cell class:menu - image type:var:type + if not:true value:var:type equals:empty + image type:var:type list list:path extract:true value:xy @@ -14,14 +15,15 @@ page text text:var:text title:var:text class:title cell class:menu style::text-align:right; - form action:search subaction:quicksearch target:cms_main_main - input class:search name:search size:15 - // button class:searchbutton type:ok src:search - if true:config:search/quicksearch/show_button - button class:searchbutton type:ok text:search - // list list:windowIcons extract:true - // link url:var:url target:_top - // image type:var:type align:middle + if true:property:search + form action:search subaction:quicksearch target:cms_main_main + input class:search name:search size:15 + // button class:searchbutton type:ok src:search + if true:config:search/quicksearch/show_button + button class:searchbutton type:ok text:search + // list list:windowIcons extract:true + // link url:var:url target:_top + // image type:var:type align:middle row cell class:subaction colspan:2 @@ -38,3 +40,4 @@ page # Trenner zwischen Menüpunkten text raw:__ + text raw:_