openrat-cms

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

commit 18d18d1747f9af3e601cca0d3b49a53ebc71232b
parent f723cd175465bd7488bd43d364378b1f99b76f11
Author: Jan Dankert <devnull@localhost>
Date:   Tue, 23 Oct 2012 22:18:15 +0200

Bei Auswahl des Linkzieles den neuen Selektor verwenden.

Diffstat:
action/LinkAction.class.php | 29++++-------------------------
themes/default/templates/link/edit.tpl.src.xml | 2+-
2 files changed, 5 insertions(+), 26 deletions(-)

diff --git a/action/LinkAction.class.php b/action/LinkAction.class.php @@ -154,36 +154,15 @@ class LinkAction extends ObjectAction - function editView() + public function editView() { $this->setTemplateVars( $this->link->getProperties() ); - // Typ der Verkn?pfung + // Typ der Verknuepfung $this->setTemplateVar('type' ,$this->link->getType() ); - $this->setTemplateVar('targetobjectid',$this->link->linkedObjectId); + $this->setTemplateVar('targetobjectid' ,$this->link->linkedObjectId); + $this->setTemplateVar('targetobjectname',$this->link->name ); $this->setTemplateVar('url' ,$this->link->url ); - - // Alle verlinkbaren Objekte anzeigen - $list = array(); - - foreach( Object::getAllObjectIds() as $oid ) - { - $o = new Object( $oid ); - $o->load(); - - if ( $o->isFile || - $o->isPage ) - { - $folder = new Folder( $o->parentid ); - $folder->linknames = false; - $folder->load(); - $list[$oid] = lang( $o->getType() ).': '; - $list[$oid] .= implode( FILE_SEP,$folder->parentObjectNames( false,true ) ); - $list[$oid] .= FILE_SEP.$o->name; - } - } - asort( $list ); - $this->setTemplateVar('objects',$list); } diff --git a/themes/default/templates/link/edit.tpl.src.xml b/themes/default/templates/link/edit.tpl.src.xml @@ -22,7 +22,7 @@ </label> </part> <part class="input"> - <selectbox list="objects" name="targetobjectid"></selectbox> + <selector id="var:targetobjectid" name="var:targetobjectname" types="page,file" param="targetobjectid" /> </part> </part>