openrat-cms

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

commit 2af42e810d8cecef6ed638e11fdac296547a5d79
parent afd8ebd2103d51269fb58f7855b06dcaa2bf39cb
Author: dankert <devnull@localhost>
Date:   Sun,  5 Feb 2006 12:30:12 +0100

Hinzuf?gen: Methode "select()"

Diffstat:
actionClasses/FolderAction.class.php | 57++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
actionClasses/FolderAction.ini.php | 6+++++-
2 files changed, 61 insertions(+), 2 deletions(-)

diff --git a/actionClasses/FolderAction.class.php b/actionClasses/FolderAction.class.php @@ -20,7 +20,10 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // --------------------------------------------------------------------------- // $Log$ -// Revision 1.33 2006-01-29 17:18:58 dankert +// Revision 1.34 2006-02-05 11:30:12 dankert +// Hinzuf?gen: Methode "select()" +// +// Revision 1.33 2006/01/29 17:18:58 dankert // Steuerung der Aktionsklasse ?ber .ini-Datei, dazu umbenennen einzelner Methoden // // Revision 1.32 2006/01/23 23:08:52 dankert @@ -674,6 +677,55 @@ class FolderAction extends ObjectAction } } + $this->setTemplateVar('object' ,$list ); + } + + + + function select() + { + global $conf_php; + + $this->setTemplateVar('writable',$this->folder->hasRight(ACL_WRITE) ); + + $list = array(); + + // Schleife ueber alle Objekte in diesem Ordner + foreach( $this->folder->getObjects() as $o ) + { + $id = $o->objectid; + + if ( $o->hasRight(ACL_READ) ) + { + $list[$id]['name'] = Text::maxLaenge( 30,$o->name ); + $list[$id]['filename'] = Text::maxLaenge( 20,$o->filename ); + $list[$id]['desc'] = Text::maxLaenge( 30,$o->desc ); + if ( $list[$id]['desc'] == '' ) + $list[$id]['desc'] = lang('GLOBAL_NO_DESCRIPTION_AVAILABLE'); + $list[$id]['desc'] = 'ID '.$id.' - '.$list[$id]['desc']; + + $list[$id]['type'] = $o->getType(); + + $list[$id]['icon'] = $o->getType(); + + if ( $o->getType() == 'file' ) + { + $file = new File( $id ); + $file->load(); + $list[$id]['desc'] .= ' - '.intval($file->size/1000).'kB'; + + if ( substr($file->mimeType(),0,6) == 'image/' ) + $list[$id]['icon'] = 'image'; +// if ( substr($file->mimeType(),0,5) == 'text/' ) +// $list[$id]['icon'] = 'text'; + } + + $list[$id]['url' ] = Html::url('main',$o->getType(),$id); + $list[$id]['date'] = date( lang('DATE_FORMAT'),$o->lastchangeDate ); + $list[$id]['user'] = $o->lastchangeUser; + } + } + if ( $this->folder->hasRight(ACL_WRITE) ) { // Alle anderen Ordner ermitteln @@ -698,6 +750,9 @@ class FolderAction extends ObjectAction + + + function order() { global $conf_php; diff --git a/actionClasses/FolderAction.ini.php b/actionClasses/FolderAction.ini.php @@ -5,6 +5,10 @@ goto=show [show] menu=show +[select] +target=multiple +menu=show + [prop] menu=prop target=saveprop @@ -86,7 +90,7 @@ goto=order [menu] pub=pub -show=show,order +show=show,select,order new=createfolder,createfile,createpage,createlink prop=showprop,prop,remove rights=rights,aclform \ No newline at end of file