openrat-cms

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

commit 50bfff66d197f2fb7d0e408ce4159d3d016e081f
parent 0ff6f12dfc350ba3c48941cbec78c05fe4d65fe3
Author: Jan Dankert <develop@jandankert.de>
Date:   Sat,  9 May 2020 08:10:50 +0200

New: A new titlekey attribute. This should be fixed sometimes in a new variable resolver which supports nested variables.

Diffstat:
modules/cms/ui/themes/default/html/views/user/rights.php | 2+-
modules/cms/ui/themes/default/html/views/user/rights.tpl.src.xml | 4++--
modules/template_engine/components/html/text/Text.class.php | 5+++++
3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/modules/cms/ui/themes/default/html/views/user/rights.php b/modules/cms/ui/themes/default/html/views/user/rights.php @@ -38,7 +38,7 @@ </td> <?php foreach($show as $list_key=>$t) { ?> <td class="help"> - <span title="message:acl<?php echo encodeHtml(htmlentities()) ?>"><?php echo encodeHtml(htmlentities(@lang(''.@$t.''))) ?> + <span title="<?php echo encodeHtml(htmlentities(@lang('acl_'.@$t.''))) ?>"><?php echo encodeHtml(htmlentities(@lang('acl_'.@$t.''))) ?> </span> </td> <?php } ?> diff --git a/modules/cms/ui/themes/default/html/views/user/rights.tpl.src.xml b/modules/cms/ui/themes/default/html/views/user/rights.tpl.src.xml @@ -22,7 +22,7 @@ </column> <list list="show" value="t"> <column class="help"> - <text key="${t}" prefix="acl_" suffix="_abbrev" title="message:acl_{t}"></text> + <text key="acl_${t}" prefix="acl_" suffix="_abbrev" titlekey="acl_${t}"></text> </column> </list> </row> @@ -57,7 +57,7 @@ <text var="languagename" maxlength="20"></text> </column> <list list="show"> - <column> + <column title=""> <set var="${list_value}" value="${bits}" key="${list_value}"></set> <checkbox name="${list_value}" readonly="true"></checkbox> </column> diff --git a/modules/template_engine/components/html/text/Text.class.php b/modules/template_engine/components/html/text/Text.class.php @@ -12,6 +12,7 @@ class TextComponent extends HtmlComponent public $prefix = ''; public $suffix = ''; public $title; + public $titlekey; public $type; public $escape = true; public $var; @@ -72,6 +73,10 @@ class TextComponent extends HtmlComponent if ( $this->title ) $text->addAttribute('title',$this->title); + elseif ( $this->titlekey ) + //$text->addAttribute('title', Value::createExpression(ValueExpression::TYPE_MESSAGE,$this->titlekey)); + //$text->addAttribute('title', $this->titlekey); + $text->addAttribute('title', new ValueExpression( ValueExpression::TYPE_MESSAGE,new Value($this->titlekey),0) ); //if ( $this->newline) // $functions[] = 'nl2br(@)';