openrat-cms

# OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs

commit bdd15cb0d58eea0f013febc5d92deac67f26c8c0
parent 657bac11748d1e4881b1d66922d8cfc6f0c1ffd6
Author: Jan Dankert <develop@jandankert.de>
Date:   Tue, 15 Oct 2019 22:25:54 +0200

New: Show name of links while editing the link.

Diffstat:
modules/cms-core/action/PageelementAction.class.php | 14++++++++++++--
modules/template-engine/components/html/selector/Selector.class.php | 2+-
2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/modules/cms-core/action/PageelementAction.class.php b/modules/cms-core/action/PageelementAction.class.php @@ -402,9 +402,19 @@ class PageelementAction extends Action else $types = array($type); // gew├╝nschten Typ verwenden + $oid = $this->value->linkToObjectId; + $name = ''; + + if ( $oid ) { + $o = new BaseObject($oid); + $o->load(); + $name = $o->filename; + } + $this->setTemplateVar('objects' ,array() ); - $this->setTemplateVar('linkobjectid',$this->value->linkToObjectId); - + $this->setTemplateVar('linkobjectid',$oid ); + $this->setTemplateVar('linkname' ,$name); + $this->setTemplateVar('types',implode(',',$types)); if ( $this->getSessionVar('pageaction') != '' ) diff --git a/modules/template-engine/components/html/selector/Selector.class.php b/modules/template-engine/components/html/selector/Selector.class.php @@ -27,7 +27,7 @@ class SelectorComponent extends Component <div class="selector"> <div class="inputholder or-droppable"> <input type="hidden" class="or-selector-link-value" name="{$param}" value="{$id}" /> -<input type="text" class="or-selector-link-name" value="{$name}" /> +<input type="text" class="or-selector-link-name" value="{$name}" placeholder="{$name}" /> </div> <div class="dropdown"></div> <div class="tree selector" data-types="{types}" data-init-id="{$id}" data-init-folderid="{$folderid}">