openrat-cms

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

commit b7ede659702283d013b20bb48eba850918fc74e1
parent 8d0b02d0bc7f8a446544a4eadc4210ce17921591
Author: Jan Dankert <develop@jandankert.de>
Date:   Sun, 15 Nov 2020 00:26:57 +0100

New: Aliases are now openable in the navigation tree.

Diffstat:
Mmodules/cms/ui/themes/default/html/views/object/info.php | 6++++++
Mmodules/cms/ui/themes/default/html/views/object/info.tpl.src.xml | 5+++++
Mmodules/cms/ui/themes/default/html/views/page/info.php | 10++++++----
Mmodules/cms/ui/themes/default/html/views/page/info.tpl.src.xml | 8+++++---
Mmodules/util/Tree.class.php | 15+++++----------
5 files changed, 27 insertions(+), 17 deletions(-)

diff --git a/modules/cms/ui/themes/default/html/views/object/info.php b/modules/cms/ui/themes/default/html/views/object/info.php @@ -33,6 +33,12 @@ <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> <span><?php echo O::escapeHtml(''.@$description.'') ?> </span> + <div class="<?php echo O::escapeHtml('or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> + <a target="<?php echo O::escapeHtml('_self') ?>" data-type="<?php echo O::escapeHtml('edit') ?>" data-action="<?php echo O::escapeHtml('object') ?>" data-method="<?php echo O::escapeHtml('prop') ?>" data-id="<?php echo O::escapeHtml('') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" href="<?php echo O::escapeHtml('#/object') ?>" class="<?php echo O::escapeHtml('or-link or-btn') ?>"><?php echo O::escapeHtml('') ?> + <span><?php echo O::escapeHtml(''.@O::lang('edit').'') ?> + </span> + </a> + </div> </div> </section> </div> diff --git a/modules/cms/ui/themes/default/html/views/object/info.tpl.src.xml b/modules/cms/ui/themes/default/html/views/object/info.tpl.src.xml @@ -13,6 +13,11 @@ </fieldset> <fieldset label="${message:description}"> <text value="${description}"/> + <part class="act-clickable"> + <link class="btn" type="edit" action="object" subaction="prop"> + <text value="${message:edit}"/> + </link> + </part> </fieldset> </group> diff --git a/modules/cms/ui/themes/default/html/views/page/info.php b/modules/cms/ui/themes/default/html/views/page/info.php @@ -23,10 +23,12 @@ <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml('') ?> </h3> <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <a target="<?php echo O::escapeHtml('_self') ?>" data-type="<?php echo O::escapeHtml('dialog') ?>" data-action="<?php echo O::escapeHtml('') ?>" data-method="<?php echo O::escapeHtml('prop') ?>" data-id="<?php echo O::escapeHtml('') ?>" data-extra-dialogAction="<?php echo O::escapeHtml('') ?>" data-extra-dialogMethod="<?php echo O::escapeHtml('prop') ?>" data-extra="<?php echo O::escapeHtml('{\'dialogAction\':null,\'dialogMethod\':\'prop\'}') ?>" href="<?php echo O::escapeHtml('') ?>" class="<?php echo O::escapeHtml('or-link or-btn or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@O::lang('edit').'') ?> - </span> - </a> + <div class="<?php echo O::escapeHtml('or-') ?>"><?php echo O::escapeHtml('') ?> + <a target="<?php echo O::escapeHtml('_self') ?>" data-type="<?php echo O::escapeHtml('dialog') ?>" data-action="<?php echo O::escapeHtml('') ?>" data-method="<?php echo O::escapeHtml('prop') ?>" data-id="<?php echo O::escapeHtml('') ?>" data-extra-dialogAction="<?php echo O::escapeHtml('') ?>" data-extra-dialogMethod="<?php echo O::escapeHtml('prop') ?>" data-extra="<?php echo O::escapeHtml('{\'dialogAction\':null,\'dialogMethod\':\'prop\'}') ?>" href="<?php echo O::escapeHtml('') ?>" class="<?php echo O::escapeHtml('or-link or-btn or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> + <span><?php echo O::escapeHtml(''.@O::lang('edit').'') ?> + </span> + </a> + </div> </div> </section> </div> diff --git a/modules/cms/ui/themes/default/html/views/page/info.tpl.src.xml b/modules/cms/ui/themes/default/html/views/page/info.tpl.src.xml @@ -8,9 +8,11 @@ <text value="${filename}"/> </fieldset> <fieldset label=""> - <link clickable="true" subaction="prop" class="btn" type="dialog"> - <text value="${message:edit}"/> - </link> + <part> + <link clickable="true" subaction="prop" class="btn" type="dialog"> + <text value="${message:edit}"/> + </link> + </part> </fieldset> </group> <list list="${languages}" extract="true"> diff --git a/modules/util/Tree.class.php b/modules/util/Tree.class.php @@ -5,6 +5,7 @@ namespace util; use cms\action\RequestParams; use cms\base\Language as L; use cms\model\Acl; +use cms\model\Alias; use cms\model\Element; use cms\model\File; use cms\model\Link; @@ -436,7 +437,7 @@ class Tree $treeElement = new TreeElement(); $treeElement->id = $o->objectid; $treeElement->internalId = $o->objectid; - $treeElement->text = $o->name; + $treeElement->text = $o->getName(); $treeElement->description = L::lang('' . $o->getType()) . ' ' . $id; if ($o->desc != '') @@ -462,7 +463,7 @@ class Tree public function alias($id) { - $alias = new \cms\model\Alias($id); + $alias = new Alias($id); $alias->load(); $o = new BaseObject($alias->linkedObjectId); @@ -471,17 +472,11 @@ class Tree $treeElement = new TreeElement(); $treeElement->id = $o->objectid; $treeElement->internalId = $o->objectid; - $treeElement->text = $o->name; + $treeElement->text = $o->getName(); $treeElement->description = L::lang('' . $o->getType()) . ' ' . $id; - if ($o->desc != '') - $treeElement->description .= ': ' . $o->desc; - else - $treeElement->description .= ' - ' . L::lang('NO_DESCRIPTION_AVAILABLE'); - $treeElement->action = $o->getType(); - $treeElement->icon = $o->getType(); - $treeElement->extraId = array(RequestParams::PARAM_LANGUAGE_ID => $_REQUEST[RequestParams::PARAM_LANGUAGE_ID], RequestParams::PARAM_MODEL_ID => $_REQUEST[RequestParams::PARAM_MODEL_ID]); + $treeElement->icon = $o->getType(); // Besonderheiten fuer bestimmte Objekttypen if ($o->isPage) {