TreetitleAction.class.php

gehe zur Dokumentation dieser Datei
00001 <?php
00002 // $Id$
00003 
00004 // OpenRat Content Management System
00005 // Copyright (C) 2002 Jan Dankert, jandankert@jandankert.de
00006 //
00007 // This program is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2
00010 // of the License, or (at your option) any later version.
00011 //
00012 // This program is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with this program; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00020 
00028 define('PROJECTID_ADMIN',-1);
00029 
00030 class TreetitleAction extends Action
00031 {
00032      var $defaultSubAction = 'show';
00033 
00034      function show()
00035      {
00036           // Das aktuelle Projekt voreinstellen        
00037           $project = Session::getProject();
00038           
00039           if   ( $project->projectid == PROJECTID_ADMIN )
00040           {
00041                $this->setTemplateVar( 'text',lang('GLOBAL_ADMINISTRATION') );
00042                $this->setTemplateVar( 'type','administration' );
00043           }
00044           else
00045           {
00046                $this->setTemplateVar( 'text',$project->name );
00047                $this->setTemplateVar( 'type','project' );
00048                
00049 //             // Ermitteln Sprache
00050 //             $language = Session::getProjectLanguage();
00051 //             
00052 //             $windowMenu[] = array( 'text'=>lang('GLOBAL_LANGUAGE').' ('.$language->name.')',
00053 //                                    'url' =>Html::url('main','language'),
00054 //                                    'target'=>'cms_main' );
00055 //   
00056 //             // Ermitteln Projektmodell
00057 //             $model = Session::getProjectModel();
00058 //   
00059 //             $windowMenu[] = array( 'text'=>lang('GLOBAL_MODEL').' ('.$model->name.')',
00060 //                                    'url' =>Html::url('main','model'),
00061 //                                    'target'=>'cms_main' );
00062           }
00063      }
00064      
00065      
00066      function checkMenu( $name )
00067      {
00068           switch( $name )
00069           {
00070                case 'administration':
00071                     return $this->userIsAdmin();
00072                default:
00073                     return true;
00074           }
00075      }
00076 }
00077 
00078 ?>

Erzeugt am Thu May 14 00:55:48 2009 für OpenRat von  doxygen 1.5.8