openrat-cms

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

commit c04c6ee1012454b754787fc31d451312f2382e82
parent 9c3d2ded82752e230a9b69028573447fb68a245b
Author: dankert <devnull@localhost>
Date:   Sat, 10 Nov 2007 02:47:29 +0100

Archiv-Links nur anzeigen, wenn Archiv vorhanden.

Diffstat:
actionClasses/PageAction.class.php | 9++++-----
actionClasses/PageelementAction.ini.php | 1+
themes/default/templates/page/el.tpl.src.php | 22+++++++++++++---------
3 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/actionClasses/PageAction.class.php b/actionClasses/PageAction.class.php @@ -411,7 +411,6 @@ class PageAction extends ObjectAction $this->page->public = true; $this->page->simple = true; $this->page->generate_elements(); -// Html::debug($this->page,'Seite'); $list = array(); @@ -423,13 +422,13 @@ class PageAction extends ObjectAction { $list[$id] = array(); $list[$id]['name'] = $value->element->name; + $list[$id]['url' ] = Html::url( 'pageelement','edit' ,$this->page->id,array('elementid'=>$id) ); $list[$id]['desc'] = $value->element->desc; $list[$id]['type'] = $value->element->type; - $list[$id]['date' ] = date( lang('DATE_FORMAT'),$value->lastchangeTimeStamp); - $list[$id]['archive_count'] = $value->getCountVersions(); - $list[$id]['archive_url' ] = Html::url( 'pageelement','archive',$this->page->id,array('elementid'=>$id) ); - $list[$id]['url' ] = Html::url( 'pageelement','edit' ,$this->page->id,array('elementid'=>$id) ); + $list[$id]['archive_count'] = intval($value->getCountVersions()); + if ( $list[$id]['archive_count'] > 0 ) + $list[$id]['archive_url'] = Html::url( 'pageelement','archive',$this->page->id,array('elementid'=>$id) ); // Maximal 50 Stellen des Inhaltes anzeigen $list[$id]['value'] = Text::maxLaenge( 50,$value->value ); diff --git a/actionClasses/PageelementAction.ini.php b/actionClasses/PageelementAction.ini.php @@ -24,6 +24,7 @@ menu=edit [diff] menu=edit +target=archive [archive] menu=edit diff --git a/themes/default/templates/page/el.tpl.src.php b/themes/default/templates/page/el.tpl.src.php @@ -15,19 +15,23 @@ page text text:GLOBAL_NOT_FOUND list list:el extract:true row - cell class:fx - link url:var:url title:desc + cell + link url:var:url title:var:desc image elementtype:var:type align:left text var:name - cell class:fx + cell text var:value text raw:_ - cell class:fx - link url:var:archive_url - text text:GLOBAL_ARCHIVE - text raw:_( - text text:var:archive_count - text raw:) + cell + if present:archive_url + link url:var:archive_url title:message:GLOBAL_ARCHIVE_DESC + text text:GLOBAL_ARCHIVE + text raw:_(_ + text text:var:archive_count + text raw:_) + else + text text:GLOBAL_NO_ARCHIVE type:emphatic title:message:GLOBAL_NO_ARCHIVE_DESC + set var:archive_url row cell class:help colspan:3 text text:PAGE_ELEMENTS_DESC