openrat-cms

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

commit bc42ea4e60a3bd1448f31751a24eb18e827a2348
parent 81583c6da09908f5bc4966096668bc4b007f2b4d
Author: Jan Dankert <develop@jandankert.de>
Date:   Wed, 11 Dec 2019 00:51:02 +0100

Refactoring: Moving up the action method infoView() to ObjectAction, because the output is nearly the same.

Diffstat:
modules/cms-core/action/AliasAction.class.php | 4----
modules/cms-core/action/FileAction.class.php | 48+++++++++++-------------------------------------
modules/cms-core/action/FolderAction.class.php | 29+++++++++++++----------------
modules/cms-core/action/ImageAction.class.php | 444++++++++++++++++++++++++++++++++++++++++---------------------------------------
modules/cms-core/action/LinkAction.class.php | 20++++++++++++--------
modules/cms-core/action/ObjectAction.class.php | 53++++++++++++++++++++++++++++++++++++++++++++++++++---
modules/cms-core/action/PageAction.class.php | 28++++++++++++++++++----------
modules/cms-core/action/TextAction.class.php | 191+++++++++++++++++++++++++++++++++++++++++--------------------------------------
modules/cms-core/action/UrlAction.class.php | 18+++++++++---------
modules/cms-core/model/BaseObject.class.php | 16+++++++++++++++-
modules/cms-core/model/File.class.php | 7+++++++
modules/cms-ui/themes/default/html/views/alias/info.php | 64----------------------------------------------------------------
modules/cms-ui/themes/default/html/views/alias/info.tpl.src.xml | 69---------------------------------------------------------------------
modules/cms-ui/themes/default/html/views/configuration/src.tpl.src.xml | 6++++--
modules/cms-ui/themes/default/html/views/folder/info.php | 81-------------------------------------------------------------------------------
modules/cms-ui/themes/default/html/views/folder/info.tpl.src.xml | 83-------------------------------------------------------------------------------
modules/cms-ui/themes/default/html/views/image/info.php | 147-------------------------------------------------------------------------------
modules/cms-ui/themes/default/html/views/image/info.tpl.src.xml | 150-------------------------------------------------------------------------------
modules/cms-ui/themes/default/html/views/link/info.php | 64----------------------------------------------------------------
modules/cms-ui/themes/default/html/views/link/info.tpl.src.xml | 69---------------------------------------------------------------------
modules/cms-ui/themes/default/html/views/object/info.php | 182+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
modules/cms-ui/themes/default/html/views/object/info.tpl.src.xml | 187+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
modules/cms-ui/themes/default/html/views/url/info.php | 64----------------------------------------------------------------
modules/cms-ui/themes/default/html/views/url/info.tpl.src.xml | 69---------------------------------------------------------------------
modules/template-engine/components/html/part/Part.class.php | 6++----
modules/util/.htaccess | 6+++---
26 files changed, 836 insertions(+), 1269 deletions(-)

diff --git a/modules/cms-core/action/AliasAction.class.php b/modules/cms-core/action/AliasAction.class.php @@ -65,10 +65,6 @@ class AliasAction extends ObjectAction - function infoView() - { - $this->setTemplateVars( $this->alias->getProperties() ); - } } diff --git a/modules/cms-core/action/FileAction.class.php b/modules/cms-core/action/FileAction.class.php @@ -57,11 +57,18 @@ class FileAction extends ObjectAction public function init() { - $this->file = new File( $this->getRequestId() ); - $this->file->languageid = $this->getRequestVar(REQ_PARAM_LANGUAGE_ID); - $this->file->load(); + $file = new File( $this->getRequestId() ); + $file->languageid = $this->getRequestVar(REQ_PARAM_LANGUAGE_ID); + $file->load(); - parent::init(); + $this->setBaseObject( $file ); + } + + + protected function setBaseObject( $file ) { + $this->file = $file; + + parent::setBaseObject( $file ); } @@ -251,39 +258,6 @@ class FileAction extends ObjectAction } - public function infoView() - { - - global $conf; - - if ( $this->file->filename == $this->file->objectid ) - $this->file->filename = ''; - - // Eigenschaften der Datei uebertragen - $this->setTemplateVars( $this->file->getProperties() ); - - $this->setTemplateVar('size',number_format($this->file->size/1000,0,',','.').' kB' ); - $this->setTemplateVar('full_filename',$this->file->full_filename()); - - $this->setTemplateVar('cache_filename' ,$this->file->getCache()->getFilename()); - $this->setTemplateVar('cache_filemtime',@filemtime($this->file->getCache()->getFilename())); - - // Alle Seiten mit dieser Datei ermitteln - $pages = $this->file->getDependentObjectIds(); - - $list = array(); - foreach( $pages as $id ) - { - $o = new BaseObject( $id ); - $o->load(); - $list[$id] = array(); - $list[$id]['url' ] = Html::url('main','page',$id); - $list[$id]['name'] = $o->name; - } - asort( $list ); - $this->setTemplateVar('pages',$list); - $this->setTemplateVar('edit_filename',$conf['filename']['edit']); - } /** diff --git a/modules/cms-core/action/FolderAction.class.php b/modules/cms-core/action/FolderAction.class.php @@ -46,18 +46,25 @@ class FolderAction extends ObjectAction public function init() { - $this->folder = new Folder( $this->getRequestId() ); - $this->folder->languageid = $this->request->getLanguageId(); - $this->folder->load(); + $folder = new Folder( $this->getRequestId() ); + $folder->languageid = $this->request->getLanguageId(); + $folder->load(); - $this->lastModified( $this->folder->lastchangeDate); + $this->lastModified( $folder->lastchangeDate); - parent::init(); + $this->setBaseObject($folder); } + protected function setBaseObject($folder ) { - public function createfolderPost() + $this->folder = $folder; + + parent::setBaseObject( $folder ); + } + + + public function createfolderPost() { $name = $this->getRequestVar('name' ); $description = $this->getRequestVar('description'); @@ -1249,16 +1256,6 @@ class FolderAction extends ObjectAction - /** - * Infos anzeigen. - */ - public function infoView() - { - $this->setTemplateVars( $this->folder->getProperties() ); - $this->setTemplateVar( 'full_filename',$this->folder->full_filename() ); - } - - /** * Liefert die Struktur zu diesem Ordner: diff --git a/modules/cms-core/action/ImageAction.class.php b/modules/cms-core/action/ImageAction.class.php @@ -1,220 +1,224 @@ -<?php - -namespace cms\action; - -use cms\model\Folder; -use cms\model\Image; -use cms\model\BaseObject; -use cms\model\File; - -use Http; -use \Html; -use Upload; - - -/** - * Action-Klasse zum Bearbeiten eines Bildes. - * @author Jan Dankert - * @version $Revision$ - * @package openrat.actions - */ -class ImageAction extends FileAction -{ - public $security = Action::SECURITY_USER; - - var $image; - - /** - * Konstruktor - */ - public function __construct() - { - parent::__construct(); - - } - - - public function init() - { - $this->image = new Image( $this->getRequestId() ); - $this->image->load(); - - $this->file = $this->image; - - parent::init(); - - } - - - - /** - * Anzeigen des Inhaltes - */ - public function sizeView() - { - $this->setTemplateVars( $this->image->getProperties() ); - - $format = $this->imageFormat(); - - if ( $format == 0 ) - { - $this->addNotice( 'image','','IMAGE_RESIZING_UNKNOWN_TYPE',OR_NOTICE_WARN); - } - - $formats = $this->imageFormats(); - - if ( empty($formats) ) - $this->addNotice( 'image','','IMAGE_RESIZING_NOT_AVAILABLE',OR_NOTICE_WARN); - - $sizes = array(); - foreach( array(10,25,50,75,100,125,150,175,200,250,300,350,400,500,600,800) as $s ) - $sizes[strval($s/100)] = $s.'%'; - - $jpeglist = array(); - for ($i=10; $i<=95; $i+=5) - $jpeglist[$i]=$i.'%'; - - $this->setTemplateVar('factors' ,$sizes ); - $this->setTemplateVar('jpeglist' ,$jpeglist ); - $this->setTemplateVar('formats' ,$formats ); - $this->setTemplateVar('format' ,$format ); - $this->setTemplateVar('factor' ,1 ); - - $this->image->getImageSize(); - $this->setTemplateVar('width' ,$this->image->width ); - $this->setTemplateVar('height',$this->image->height ); - $this->setTemplateVar('type' ,'input' ); - } - - - - - /** - * Bildgroesse eines Bildes aendern - */ - public function sizePost() - { - $width = intval($this->getRequestVar('width' )); - $height = intval($this->getRequestVar('height' )); - $jpegcompression = $this->getRequestVar('jpeg_compression') ; - $format = $this->getRequestVar('format' ) ; - $factor = $this->getRequestVar('factor' ) ; - - if ( $this->getRequestVar('type') == 'input' && - ! $this->hasRequestVar('width' ) && - ! $this->hasRequestVar('height') ) - { - $this->addValidationError('width','INPUT_NEW_IMAGE_SIZE' ); - $this->addValidationError('height',''); - $this->callSubAction('size'); - return; - } - - if ( $this->hasRequestVar('copy') ) - { - // Datei neu anlegen. - $imageFile = new Image($this->image->objectid); - $imageFile->load(); - $imageFile->name = lang('copy_of').' '.$imageFile->name; - $imageFile->desription = lang('copy_of').' '.$imageFile->description; - $imageFile->filename = $imageFile->filename.'_resized_'.time(); - $imageFile->add(); - $imageFile->copyValueFromFile( $this->image->objectid ); - } - else - { - $imageFile = $this->image; - } - - if ( $this->getRequestVar('type') == 'factor') - { - $width = 0; - $height = 0; - } - else - { - $factor = 1; - } - - $imageFile->write(); - - $imageFile->imageResize( intval($width),intval($height),$factor,$this->imageFormat(),$format,$jpegcompression ); - $imageFile->setTimestamp(); - $imageFile->save(); // Um z.B. Groesse abzuspeichern - $imageFile->saveValue(); - - $this->addNotice($imageFile->getType(),$imageFile->name,'IMAGE_RESIZED','ok'); - } - - - - private function imageFormat() - { - if ( ! function_exists( 'imagetypes' ) ) - return 0; - - $ext = strtolower($this->image->getRealExtension()); - $types = imagetypes(); - $formats = array( 'gif' =>IMG_GIF, - 'jpg' =>IMG_JPG, - 'jpeg'=>IMG_JPG, - 'png' =>IMG_PNG ); - - if ( !isset($formats[$ext]) ) - return 0; - - if ( $types & $formats[$ext] ) - return $formats[$ext]; - - return 0; - } - - - - private function imageExt() - { - switch( $this->imageFormat() ) - { - case IMG_GIF: - return 'GIF'; - case IMG_JPG: - return 'JPEG'; - case IMG_PNG: - return 'PNG'; - } - } - - - - private function imageFormats() - { - if ( ! function_exists( 'imagetypes' ) ) - return array(); - - $types = imagetypes(); - $formats = array( IMG_GIF => 'gif', - IMG_JPG => 'jpeg', - IMG_PNG => 'png' ); - $formats2 = $formats; - - foreach( $formats as $b=>$f ) - if ( !($types & $b) ) - unset( $formats2[$b] ); - - return $formats2; - } - - - /** - * Anzeigen des Inhaltes, der Inhalt wird samt Header direkt - * auf die Standardausgabe geschrieben - */ - public function previewView() - { - parent::previewView(); - } - - - - -} +<?php + +namespace cms\action; + +use cms\model\Folder; +use cms\model\Image; +use cms\model\BaseObject; +use cms\model\File; + +use Http; +use \Html; +use Upload; + + +/** + * Action-Klasse zum Bearbeiten eines Bildes. + * @author Jan Dankert + * @version $Revision$ + * @package openrat.actions + */ +class ImageAction extends FileAction +{ + public $security = Action::SECURITY_USER; + + var $image; + + /** + * Konstruktor + */ + public function __construct() + { + parent::__construct(); + + } + + + public function init() + { + $image = new Image( $this->getRequestId() ); + $image->load(); + + $this->setBaseObject( $image ); + + } + + + protected function setBaseObject( $image ) { + $this->image = $image; + + parent::setBaseObject($image); + } + + + /** + * Anzeigen des Inhaltes + */ + public function sizeView() + { + $this->setTemplateVars( $this->image->getProperties() ); + + $format = $this->imageFormat(); + + if ( $format == 0 ) + { + $this->addNotice( 'image','','IMAGE_RESIZING_UNKNOWN_TYPE',OR_NOTICE_WARN); + } + + $formats = $this->imageFormats(); + + if ( empty($formats) ) + $this->addNotice( 'image','','IMAGE_RESIZING_NOT_AVAILABLE',OR_NOTICE_WARN); + + $sizes = array(); + foreach( array(10,25,50,75,100,125,150,175,200,250,300,350,400,500,600,800) as $s ) + $sizes[strval($s/100)] = $s.'%'; + + $jpeglist = array(); + for ($i=10; $i<=95; $i+=5) + $jpeglist[$i]=$i.'%'; + + $this->setTemplateVar('factors' ,$sizes ); + $this->setTemplateVar('jpeglist' ,$jpeglist ); + $this->setTemplateVar('formats' ,$formats ); + $this->setTemplateVar('format' ,$format ); + $this->setTemplateVar('factor' ,1 ); + + $this->image->getImageSize(); + $this->setTemplateVar('width' ,$this->image->width ); + $this->setTemplateVar('height',$this->image->height ); + $this->setTemplateVar('type' ,'input' ); + } + + + + + /** + * Bildgroesse eines Bildes aendern + */ + public function sizePost() + { + $width = intval($this->getRequestVar('width' )); + $height = intval($this->getRequestVar('height' )); + $jpegcompression = $this->getRequestVar('jpeg_compression') ; + $format = $this->getRequestVar('format' ) ; + $factor = $this->getRequestVar('factor' ) ; + + if ( $this->getRequestVar('type') == 'input' && + ! $this->hasRequestVar('width' ) && + ! $this->hasRequestVar('height') ) + { + $this->addValidationError('width','INPUT_NEW_IMAGE_SIZE' ); + $this->addValidationError('height',''); + $this->callSubAction('size'); + return; + } + + if ( $this->hasRequestVar('copy') ) + { + // Datei neu anlegen. + $imageFile = new Image($this->image->objectid); + $imageFile->load(); + $imageFile->name = lang('copy_of').' '.$imageFile->name; + $imageFile->desription = lang('copy_of').' '.$imageFile->description; + $imageFile->filename = $imageFile->filename.'_resized_'.time(); + $imageFile->add(); + $imageFile->copyValueFromFile( $this->image->objectid ); + } + else + { + $imageFile = $this->image; + } + + if ( $this->getRequestVar('type') == 'factor') + { + $width = 0; + $height = 0; + } + else + { + $factor = 1; + } + + $imageFile->write(); + + $imageFile->imageResize( intval($width),intval($height),$factor,$this->imageFormat(),$format,$jpegcompression ); + $imageFile->setTimestamp(); + $imageFile->save(); // Um z.B. Groesse abzuspeichern + $imageFile->saveValue(); + + $this->addNotice($imageFile->getType(),$imageFile->name,'IMAGE_RESIZED','ok'); + } + + + + private function imageFormat() + { + if ( ! function_exists( 'imagetypes' ) ) + return 0; + + $ext = strtolower($this->image->getRealExtension()); + $types = imagetypes(); + $formats = array( 'gif' =>IMG_GIF, + 'jpg' =>IMG_JPG, + 'jpeg'=>IMG_JPG, + 'png' =>IMG_PNG ); + + if ( !isset($formats[$ext]) ) + return 0; + + if ( $types & $formats[$ext] ) + return $formats[$ext]; + + return 0; + } + + + + private function imageExt() + { + switch( $this->imageFormat() ) + { + case IMG_GIF: + return 'GIF'; + case IMG_JPG: + return 'JPEG'; + case IMG_PNG: + return 'PNG'; + } + } + + + + private function imageFormats() + { + if ( ! function_exists( 'imagetypes' ) ) + return array(); + + $types = imagetypes(); + $formats = array( IMG_GIF => 'gif', + IMG_JPG => 'jpeg', + IMG_PNG => 'png' ); + $formats2 = $formats; + + foreach( $formats as $b=>$f ) + if ( !($types & $b) ) + unset( $formats2[$b] ); + + return $formats2; + } + + + /** + * Anzeigen des Inhaltes, der Inhalt wird samt Header direkt + * auf die Standardausgabe geschrieben + */ + public function previewView() + { + parent::previewView(); + } + + + + +} diff --git a/modules/cms-core/action/LinkAction.class.php b/modules/cms-core/action/LinkAction.class.php @@ -55,10 +55,18 @@ class LinkAction extends ObjectAction public function init() { - $this->link = new Link( $this->getRequestId() ); - $this->link->load(); + $link = new Link( $this->getRequestId() ); + $link->load(); - parent::init(); + $this->setBaseObject( $link ); + } + + + protected function setBaseObject( $link ) { + + $this->link = $link; + + parent::setBaseObject( $link ); } @@ -88,11 +96,7 @@ class LinkAction extends ObjectAction - function infoView() - { - $this->setTemplateVars( $this->link->getProperties() ); - } - + /** * Liefert die Struktur zu diesem Ordner: diff --git a/modules/cms-core/action/ObjectAction.class.php b/modules/cms-core/action/ObjectAction.class.php @@ -2,6 +2,7 @@ namespace cms\action; +use ArrayUtils; use cms\model\Acl; use cms\model\Project; use cms\model\User; @@ -12,6 +13,7 @@ use cms\model\BaseObject; use cms\model\Language; use cms\model\File; use cms\model\Link; +use Html; use Http; use Session; @@ -42,11 +44,20 @@ class ObjectAction extends BaseAction public function init() { - $this->baseObject = new BaseObject( $this->getRequestId() ); - $this->baseObject->objectLoad(); + $baseObject = new BaseObject( $this->getRequestId() ); + $baseObject->objectLoad(); + + $this->setBaseObject( $baseObject ); } - public function copyView() + + protected function setBaseObject( $baseObject ) { + + $this->baseObject = $baseObject; + } + + + public function copyView() { $sourceObject = new BaseObject( $this->getRequestId()); $sourceObject->load(); @@ -612,4 +623,40 @@ class ObjectAction extends BaseAction return $rootFolder->hasRight(Acl::ACL_PROP); } + + + /** + * Show infos. + */ + public function infoView() + { + $this->setTemplateVars( $this->baseObject->getProperties() ); + + $this->setTemplateVar( 'full_filename',$this->baseObject->full_filename() ); + $this->setTemplateVar( 'extension' , '' ); + $this->setTemplateVar( 'mimetype' , $this->baseObject->mimeType() ); + + // Read all objects linking to us. + $pages = $this->baseObject->getDependentObjectIds(); + + $list = array(); + foreach( $pages as $id ) + { + $o = new BaseObject( $id ); + $o->load(); + $list[$id] = array(); + $list[$id]['name'] = $o->filename; + $list[$id]['type'] = $o->getType(); + } + + asort( $list ); + + $this->setTemplateVar('pages',$list); + + $this->setTemplateVar('size',number_format($this->baseObject->getSize()/1000,0,',','.').' kB' ); + + $pad = str_repeat("\xC2\xA0",5); // Hard spaces + $this->setTemplateVar('settings', ArrayUtils::dryFlattenArray( $this->baseObject->getTotalSettings(),$pad ) ); + } + } \ No newline at end of file diff --git a/modules/cms-core/action/PageAction.class.php b/modules/cms-core/action/PageAction.class.php @@ -46,22 +46,21 @@ class PageAction extends ObjectAction public function init() { - $this->page = new Page( $this->getRequestId() ); + $page = new Page( $this->getRequestId() ); if ( $this->request->hasLanguageId()) - $this->page->languageid = $this->request->getLanguageId(); + $page->languageid = $this->request->getLanguageId(); if ( $this->request->hasModelId()) - $this->page->modelid = $this->request->getModelId(); + $page->modelid = $this->request->getModelId(); - $this->page->load(); + $page->load(); - if ( !$this->page->languageid ) - $this->page->languageid = $this->page->getProject()->getDefaultLanguageId(); + if ( !$page->languageid ) + $page->languageid = $page->getProject()->getDefaultLanguageId(); - if ( !$this->page->modelid ) - $this->page->modelid = $this->page->getProject()->getDefaultModelId(); - //$this->baseObject = & $this->page; + if ( !$page->modelid ) + $page->modelid = $page->getProject()->getDefaultModelId(); // Hier kann leider nicht das Datum der letzten Ă„nderung verwendet werden, // da sich die Seite auch danach ändern kann, z.B. durch Includes anderer @@ -69,10 +68,19 @@ class PageAction extends ObjectAction // verlinkten Datei. $this->lastModified( time() ); - parent::init(); + $this->setBaseObject($page); } + + protected function setBaseObject($folder ) { + + $this->page = $folder; + + parent::setBaseObject( $folder ); + } + + /** * Alle Daten aus dem Formular speichern */ diff --git a/modules/cms-core/action/TextAction.class.php b/modules/cms-core/action/TextAction.class.php @@ -1,92 +1,99 @@ -<?php - -namespace { - - define('OR_FILE_FILTER_LESS',1); -} - -namespace cms\action -{ - use cms\model\BaseObject; - - use cms\model\Text; - use \Html; - -// OpenRat Content Management System -// Copyright (C) 2002-2012 Jan Dankert, cms@jandankert.de -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - - /** - * Action-Klasse zum Bearbeiten einer Datei - * @author Jan Dankert - * @package openrat.actions - */ - class TextAction extends FileAction - { - public $security = Action::SECURITY_USER; - - var $text; - - /** - * Konstruktor - */ - function __construct() - { - parent::__construct(); - } - - - public function init() - { - - $this->text = new Text($this->getRequestId()); - $this->text->load(); - - parent::init(); - - $this->file = $this->text; - } - - - public function valuePost() - { - $this->file->value = $this->getRequestVar('value', OR_FILTER_RAW); - $this->file->saveValue(); - - $this->addNotice($this->file->getType(), $this->file->name, 'VALUE_SAVED', 'ok'); - $this->file->setTimestamp(); - } - - - public function valueView() - { - parent::valueView(); - } - - - public function showView() { - $this->file = $this->text; - - parent::showView(); - } - - public function previewView() - { - parent::previewView(); - } - } -} +<?php + +namespace { + + define('OR_FILE_FILTER_LESS',1); +} + +namespace cms\action +{ + use cms\model\BaseObject; + + use cms\model\Text; + use \Html; + +// OpenRat Content Management System +// Copyright (C) 2002-2012 Jan Dankert, cms@jandankert.de +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + + /** + * Action-Klasse zum Bearbeiten einer Datei + * @author Jan Dankert + * @package openrat.actions + */ + class TextAction extends FileAction + { + public $security = Action::SECURITY_USER; + + var $text; + + /** + * Konstruktor + */ + function __construct() + { + parent::__construct(); + } + + + public function init() + { + + $text = new Text($this->getRequestId()); + $text->load(); + + $this->setBaseObject(text); + } + + + + protected function setBaseObject($text ) { + + $this->text = $text; + + parent::setBaseObject( $text ); + } + + + public function valuePost() + { + $this->file->value = $this->getRequestVar('value', OR_FILTER_RAW); + $this->file->saveValue(); + + $this->addNotice($this->file->getType(), $this->file->name, 'VALUE_SAVED', 'ok'); + $this->file->setTimestamp(); + } + + + public function valueView() + { + parent::valueView(); + } + + + public function showView() { + $this->file = $this->text; + + parent::showView(); + } + + public function previewView() + { + parent::previewView(); + } + } +} diff --git a/modules/cms-core/action/UrlAction.class.php b/modules/cms-core/action/UrlAction.class.php @@ -55,12 +55,18 @@ class UrlAction extends ObjectAction public function init() { - $this->url = new Url( $this->getRequestId() ); - $this->url->load(); + $url = new Url( $this->getRequestId() ); + $url->load(); - parent::init(); + $this->setBaseObject( $url ); } + protected function setBaseObject( $url ) { + + $this->url = $url; + + parent::setBaseObject( $url ); + } function remove() @@ -127,12 +133,6 @@ class UrlAction extends ObjectAction - public function infoView() - { - $this->setTemplateVars( $this->url->getProperties() ); - } - - /** * Liefert die Struktur zu diesem Ordner: * - Mit den Ă¼bergeordneten Ordnern und diff --git a/modules/cms-core/model/BaseObject.class.php b/modules/cms-core/model/BaseObject.class.php @@ -1750,8 +1750,22 @@ SQL return intval( $this->objectid ) > 0; } -} + /** + * Gets the file size + * @return int + */ + public function getSize() + { + return 0; + } + + + public function mimeType() + { + return ""; + } +} diff --git a/modules/cms-core/model/File.class.php b/modules/cms-core/model/File.class.php @@ -603,6 +603,13 @@ SQL // Store in cache. $this->getCache()->invalidate(); } + + + + public function getSize() + { + return $this->size; + } } ?> \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/alias/info.php b/modules/cms-ui/themes/default/html/views/alias/info.php @@ -1,63 +0,0 @@ -<?php if (!defined('OR_TITLE')) die('Forbidden'); ?> - <form name="" target="_self" data-target="view" action="./" data-method="info" data-action="alias" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="or-form alias" data-async="false" data-autosave="false"><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="alias" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="info" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> - <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('global_prop') ?></legend><div class="closable"> - <div class="line"> - <div class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_name')))); ?></span> - </div> - <div class="input"> - <span class="name,focus"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> - </div> - </div> - <div class="line"> - <div class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_description')))); ?></span> - </div> - <div class="input"> - <span class="description"><?php echo nl2br(encodeHtml(htmlentities($description))); ?></span> - </div> - </div> - </div></fieldset> - <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('additional_info') ?></legend><div class="closable"> - <div class="line"> - <div class="label"> - <label for="<?php echo REQUEST_ID ?>_objectid" class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang(''.'id'.'')))); ?></span> - </label> - </div> - <div class="input"> - <span><?php echo nl2br(encodeHtml(htmlentities($objectid))); ?></span> - </div> - </div> - </div></fieldset> - <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('prop_userinfo') ?></legend><div class="closable"> - <div class="line"> - <div class="label"> - <label class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_created')))); ?></span> - </label> - </div> - <div class="input"> - <img src="./modules/cms-ui/themes/default/images/icon/el_date.png" /> - <?php include_once( 'modules/template-engine/components/html/date/component-date.php') ?><?php component_date($create_date) ?> - <br/> - <img src="./modules/cms-ui/themes/default/images/icon/user.png" /> - <?php include_once( 'modules/template-engine/components/html/user/component-user.php') ?><?php component_user($create_user) ?> - </div> - </div> - <div class="line"> - <div class="label"> - <label class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_lastchange')))); ?></span> - </label> - </div> - <div class="input"> - <img src="./modules/cms-ui/themes/default/images/icon/el_date.png" /> - <?php include_once( 'modules/template-engine/components/html/date/component-date.php') ?><?php component_date($lastchange_date) ?> - <br/> - <img src="./modules/cms-ui/themes/default/images/icon/user.png" /> - <?php include_once( 'modules/template-engine/components/html/user/component-user.php') ?><?php component_user($lastchange_user) ?> - </div> - </div> - </div></fieldset> - <div class="or-form-actionbar"><input type="button" class="or-form-btn or-form-btn--secondary or-form-btn--cancel" value="<?php echo lang("CANCEL") ?>" /><input type="submit" class="or-form-btn or-form-btn--primary or-form-btn--save" value="<?php echo lang('BUTTON_OK') ?>" /></div></form>- \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/alias/info.tpl.src.xml b/modules/cms-ui/themes/default/html/views/alias/info.tpl.src.xml @@ -1,68 +0,0 @@ -<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd"> - <form> - <group title="message:global_prop"> - <part class="line"> - <part class="label"> - <text text="GLOBAL_name"></text> - </part> - <part class="input"> - <text var="name" class="name,focus" /> - </part> - </part> - - <part class="line"> - <part class="label"> - <text text="GLOBAL_description"></text> - </part> - <part class="input"> - <text var="description" class="description" /> - </part> - </part> - </group> - - <group title="message:additional_info"> - <part class="line"> - <part class="label"> - <label for="objectid"> - <text key="id"></text> - </label> - </part> - <part class="input"> - <text var="objectid"></text> - </part> - </part> - </group> - - <group title="message:prop_userinfo"> - <part class="line"> - <part class="label"> - <label for=""> - <text text="global_created"></text> - </label> - </part> - <part class="input"> - <image icon="el_date"></image> - <date date="var:create_date"></date> - <newline></newline> - <image icon="user"></image> - <user user="var:create_user"></user> - </part> - </part> - <part class="line"> - <part class="label"> - <label for=""> - <text text="global_lastchange"></text> - </label> - </part> - <part class="input"> - <image icon="el_date"></image> - <date date="var:lastchange_date"></date> - <newline></newline> - <image icon="user"></image> - <user user="var:lastchange_user"></user> - </part> - </part> - </group> - </form> -</output>- \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/configuration/src.tpl.src.xml b/modules/cms-ui/themes/default/html/views/configuration/src.tpl.src.xml @@ -1 +1,3 @@ -<editor type="code" mode="yaml" name="source" />- \ No newline at end of file +<editor xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd" + type="code" mode="yaml" name="source"/>+ \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/folder/info.php b/modules/cms-ui/themes/default/html/views/folder/info.php @@ -1,80 +0,0 @@ -<?php if (!defined('OR_TITLE')) die('Forbidden'); ?> - <form name="" target="_self" data-target="view" action="./" data-method="info" data-action="folder" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="or-form folder" data-async="false" data-autosave="false"><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="folder" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="info" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> - <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('GLOBAL_PROP') ?></legend><div class="closable"> - <div class="line"> - <div class="label"> - <label for="<?php echo REQUEST_ID ?>_name" class="label"><?php echo lang('global_name') ?> - </label> - </div> - <div class="input"> - <span class="name,focus"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> - </div> - </div> - <div class="line"> - <div class="label"> - <label for="<?php echo REQUEST_ID ?>_filename" class="label"><?php echo lang('global_filename') ?> - </label> - </div> - <div class="input"> - <span><?php echo nl2br(encodeHtml(htmlentities($filename))); ?></span> - </div> - </div> - <div class="line"> - <div class="label"> - <label for="<?php echo REQUEST_ID ?>_description" class="label"><?php echo lang('global_description') ?> - </label> - </div> - <div class="input"> - <span class="description"><?php echo nl2br(encodeHtml(htmlentities($description))); ?></span> - </div> - </div> - </div></fieldset> - <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('additional_info') ?></legend><div class="closable"> - <div class="line"> - <div class="label"> - <label for="<?php echo REQUEST_ID ?>_full_filename" class="label"><?php echo lang('FULL_FILENAME') ?> - </label> - </div> - <div class="input"> - <span><?php echo nl2br(encodeHtml(htmlentities($full_filename))); ?></span> - </div> - </div> - <div class="line"> - <div class="label"> - <label for="<?php echo REQUEST_ID ?>_objectid" class="label"><?php echo lang('id') ?> - </label> - </div> - <div class="input"> - <span><?php echo nl2br(encodeHtml(htmlentities($objectid))); ?></span> - </div> - </div> - </div></fieldset> - <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('PROP_USERINFO') ?></legend><div class="closable"> - <div class="line"> - <div class="label"> - <label for="<?php echo REQUEST_ID ?>_create_user" class="label"><?php echo lang('global_created') ?> - </label> - </div> - <div class="input"> - <i class="image-icon image-icon--action-el_date"></i> - <?php include_once( 'modules/template-engine/components/html/date/component-date.php') ?><?php component_date($create_date) ?> - <br/> - <i class="image-icon image-icon--action-user"></i> - <?php include_once( 'modules/template-engine/components/html/user/component-user.php') ?><?php component_user($create_user) ?> - </div> - </div> - <div class="line"> - <div class="label"> - <label for="<?php echo REQUEST_ID ?>_lastchange_user" class="label"><?php echo lang('global_lastchange') ?> - </label> - </div> - <div class="input"> - <i class="image-icon image-icon--action-el_date"></i> - <?php include_once( 'modules/template-engine/components/html/date/component-date.php') ?><?php component_date($lastchange_date) ?> - <br/> - <i class="image-icon image-icon--action-user"></i> - <?php include_once( 'modules/template-engine/components/html/user/component-user.php') ?><?php component_user($lastchange_user) ?> - </div> - </div> - </div></fieldset> - <div class="or-form-actionbar"><input type="button" class="or-form-btn or-form-btn--secondary or-form-btn--cancel" value="<?php echo lang("CANCEL") ?>" /><input type="submit" class="or-form-btn or-form-btn--primary or-form-btn--save" value="<?php echo lang('BUTTON_OK') ?>" /></div></form>- \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/folder/info.tpl.src.xml b/modules/cms-ui/themes/default/html/views/folder/info.tpl.src.xml @@ -1,82 +0,0 @@ -<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd"> - <form> - - <group title="message:GLOBAL_PROP"> - <part class="line"> - <part class="label"> - <label for="name" key="global_name" /> - </part> - <part class="input"> - <text var="name" class="name,focus" /> - </part> - </part> - <part class="line"> - <part class="label"> - <label for="filename" key="global_filename" /> - </part> - <part class="input"> - <text var="filename" /> - </part> - </part> - <part class="line"> - <part class="label"> - <label for="description" key="global_description" /> - </part> - <part class="input"> - <text var="description" class="description" /> - </part> - </part> - </group> - - <group title="message:additional_info"> - <part class="line"> - <part class="label"> - <label for="full_filename" key="FULL_FILENAME" /> - </part> - <part class="input"> - <text var="full_filename"></text> - </part> - </part> - - <part class="line"> - <part class="label"> - <label for="objectid" key="id"></label> - </part> - <part class="input"> - <text var="objectid"></text> - </part> - </part> - </group> - - <group title="message:PROP_USERINFO"> - <part class="line"> - <part class="label"> - <label for="create_user" key="global_created"> - </label> - </part> - <part class="input"> - <image elementtype="date"></image> - <date date="var:create_date"></date> - <newline></newline> - <image action="user"></image> - <user user="var:create_user"></user> - </part> - </part> - - <part class="line"> - <part class="label"> - <label for="lastchange_user" key="global_lastchange"> - </label> - </part> - <part class="input"> - <image elementtype="date"></image> - <date date="var:lastchange_date"></date> - <newline></newline> - <image action="user"></image> - <user user="var:lastchange_user"></user> - </part> - </part> - </group> - </form> -</output> - \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/image/info.php b/modules/cms-ui/themes/default/html/views/image/info.php @@ -1,146 +0,0 @@ -<?php if (!defined('OR_TITLE')) die('Forbidden'); ?> - <form name="" target="_self" data-target="view" action="./" data-method="info" data-action="image" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="or-form image" data-async="false" data-autosave="false"><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="image" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="info" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> - <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><div class="closable"> - <div class="line"> - <div class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_name')))); ?></span> - </div> - <div class="input"> - <span class="name"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> - </div> - </div> - <div class="line"> - <div class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_filename')))); ?></span> - </div> - <div class="input"> - <span class="filename"><?php echo nl2br(encodeHtml(htmlentities($filename))); ?></span> - </div> - </div> - <div class="line"> - <div class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('file_extension')))); ?></span> - </div> - <div class="input"> - <span class="extension"><?php echo nl2br(encodeHtml(htmlentities($extension))); ?></span> - </div> - </div> - <div class="line"> - <div class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_description')))); ?></span> - </div> - <div class="input"> - <span><?php echo nl2br(encodeHtml(htmlentities($description))); ?></span> - </div> - </div> - </div></fieldset> - <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('additional_info') ?></legend><div class="closable"> - <div class="line"> - <div class="label"> - <label for="<?php echo REQUEST_ID ?>_full_filename" class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_full_filename')))); ?></span> - </label> - </div> - <div class="input"> - <span><?php echo nl2br(encodeHtml(htmlentities($full_filename))); ?></span> - </div> - </div> - <div class="line"> - <div class="label"> - <label for="<?php echo REQUEST_ID ?>_size" class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('FILE_SIZE')))); ?></span> - </label> - </div> - <div class="input"> - </div> - <span><?php echo nl2br(encodeHtml(htmlentities($size))); ?></span> - </div> - <div class="line"> - <div class="label"> - <label for="<?php echo REQUEST_ID ?>_mimetype" class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('FILE_mimetype')))); ?></span> - </label> - </div> - <div class="input"> - <span><?php echo nl2br(encodeHtml(htmlentities($mimetype))); ?></span> - <br/> - <a class="action" target="_self" data-action="file" data-method="size" data-id="<?php echo OR_ID ?>" data-extra="[]" href="./#/file/"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang(''.'menu_file_size'.'')))); ?></span> - </a> - </div> - </div> - <div class="line"> - <div class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang(lang('id'))))); ?></span> - </div> - <div class="input"> - <span><?php echo nl2br(encodeHtml(htmlentities($objectid))); ?></span> - </div> - </div> - <?php $if4=(isset($cache_filename)); if($if4){?> - <div class="line"> - <div class="label"> - <label for="<?php echo REQUEST_ID ?>_cache_filename" class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('CACHE_FILENAME')))); ?></span> - </label> - </div> - <div class="input"> - <span><?php echo nl2br(encodeHtml(htmlentities($cache_filename))); ?></span> - <br/> - <img src="./modules/cms-ui/themes/default/images/icon/el_date.png" /> - <?php include_once( 'modules/template-engine/components/html/date/component-date.php') ?><?php component_date($cache_filemtime) ?> - </div> - </div> - <?php } ?> - <div class="line"> - <div class="label"> - <label for="<?php echo REQUEST_ID ?>_pages" class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('FILE_PAGES')))); ?></span> - </label> - </div> - <div class="input"> - <div class="or-table-wrapper"><div class="or-table-filter"><input type="search" name="filter" placeholder="<?php echo lang('SEARCH_FILTER') ?>" /></div><div class="or-table-area"><table width="100%"> - <?php foreach($pages as $list_key=>$list_value){ ?><?php extract($list_value) ?> - <tr> - <td> - <a target="_self" data-url="<?php echo $url ?>" data-action="" data-method="info" data-id="<?php echo OR_ID ?>" data-extra="[]" href="./#//"> - <img src="./modules/cms-ui/themes/default/images/icon_page.png" /> - <span><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> - </a> - </td> - </tr> - <?php } ?> - </table></div></div> - <?php $if6=(($pages)==FALSE); if($if6){?> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NOT_FOUND')))); ?></span> - <?php } ?> - </div> - </div> - </div></fieldset> - <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('prop_userinfo') ?></legend><div class="closable"> - <div class="line"> - <div class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_created')))); ?></span> - </div> - <div class="input"> - <i class="image-icon image-icon--action-el_date"></i> - <?php include_once( 'modules/template-engine/components/html/date/component-date.php') ?><?php component_date($create_date) ?> - <br/> - <i class="image-icon image-icon--action-user"></i> - <?php include_once( 'modules/template-engine/components/html/user/component-user.php') ?><?php component_user($create_user) ?> - </div> - </div> - <div class="line"> - <div class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_lastchange')))); ?></span> - </div> - <div class="input"> - <i class="image-icon image-icon--action-el_date"></i> - <?php include_once( 'modules/template-engine/components/html/date/component-date.php') ?><?php component_date($lastchange_date) ?> - <br/> - <i class="image-icon image-icon--action-user"></i> - <?php include_once( 'modules/template-engine/components/html/user/component-user.php') ?><?php component_user($lastchange_user) ?> - </div> - </div> - </div></fieldset> - <div class="or-form-actionbar"><input type="button" class="or-form-btn or-form-btn--secondary or-form-btn--cancel" value="<?php echo lang("CANCEL") ?>" /><input type="submit" class="or-form-btn or-form-btn--primary or-form-btn--save" value="<?php echo lang('BUTTON_OK') ?>" /></div></form>- \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/image/info.tpl.src.xml b/modules/cms-ui/themes/default/html/views/image/info.tpl.src.xml @@ -1,149 +0,0 @@ -<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd"> - <form> - <group> - <part class="line"> - <part class="label"> - <text text="global_name"></text> - </part> - <part class="input"> - <text var="name" class="name" /> - </part> - </part> - <part class="line"> - <part class="label"> - <text text="global_filename"></text> - </part> - <part class="input"> - <text var="filename" class="filename" /> - </part> - </part> - <part class="line"> - <part class="label"> - <text text="file_extension"></text> - </part> - <part class="input"> - <text var="extension" class="extension" /> - </part> - </part> - <part class="line"> - <part class="label"> - <text text="global_description"></text> - </part> - <part class="input"> - <text var="description" /> - </part> - </part> - </group> - - <group title="message:additional_info"> - <part class="line"> - <part class="label"> - <label for="full_filename"> - <text text="global_full_filename"></text> - </label> - </part> - <part class="input"> - <text var="full_filename"></text> - </part> - </part> - <part class="line"> - <part class="label"> - <label for="size"> - <text text="FILE_SIZE"></text> - </label> - </part> - <part class="input"> - </part> - <text var="size"></text> - </part> - <part class="line"> - <part class="label"> - <label for="mimetype"> - <text text="FILE_mimetype"></text> - </label> - </part> - <part class="input"> - <text var="mimetype"></text> - <newline></newline> - <link class="action" action="file" subaction="size"> - <text key="menu_file_size"></text> - </link> - </part> - </part> - <part class="line"> - <part class="label"> - <text text="message:id"></text> - </part> - <part class="input"> - <text var="objectid"></text> - </part> - </part> - <if present="cache_filename"> - <part class="line"> - <part class="label"> - <label for="cache_filename"> - <text text="CACHE_FILENAME"></text> - </label> - </part> - <part class="input"> - <text var="cache_filename"></text> - <newline></newline> - <image icon="el_date"></image> - <date date="var:cache_filemtime"></date> - </part> - </part> - </if> - <part class="line"> - <part class="label"> - <label for="pages"> - <text text="FILE_PAGES"></text> - </label> - </part> - <part class="input"> - <table> - <list list="pages" extract="true"> - <row> - <column> - <link url="var:url" target="cms_main"> - <image type="page"></image> - <text var="name"></text> - </link> - </column> - </row> - </list> - </table> - <if empty="pages"> - <text text="GLOBAL_NOT_FOUND"></text> - </if> - </part> - </part> - </group> - <group title="message:prop_userinfo"> - <part class="line"> - <part class="label"> - <text text="global_created"></text> - </part> - <part class="input"> - <image elementtype="date"></image> - <date date="var:create_date"></date> - <newline></newline> - <image action="user"></image> - <user user="var:create_user"></user> - </part> - </part> - <part class="line"> - <part class="label"> - <text text="global_lastchange"></text> - </part> - <part class="input"> - <image elementtype="date"></image> - <date date="var:lastchange_date"></date> - <newline></newline> - <image action="user"></image> - <user user="var:lastchange_user"></user> - </part> - </part> - </group> - </form> -</output>- \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/link/info.php b/modules/cms-ui/themes/default/html/views/link/info.php @@ -1,63 +0,0 @@ -<?php if (!defined('OR_TITLE')) die('Forbidden'); ?> - <form name="" target="_self" data-target="view" action="./" data-method="info" data-action="link" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="or-form link" data-async="false" data-autosave="false"><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="link" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="info" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> - <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('global_prop') ?></legend><div class="closable"> - <div class="line"> - <div class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_name')))); ?></span> - </div> - <div class="input"> - <span class="name,focus"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> - </div> - </div> - <div class="line"> - <div class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_description')))); ?></span> - </div> - <div class="input"> - <span class="description"><?php echo nl2br(encodeHtml(htmlentities($description))); ?></span> - </div> - </div> - </div></fieldset> - <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('additional_info') ?></legend><div class="closable"> - <div class="line"> - <div class="label"> - <label for="<?php echo REQUEST_ID ?>_objectid" class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang(''.'id'.'')))); ?></span> - </label> - </div> - <div class="input"> - <span><?php echo nl2br(encodeHtml(htmlentities($objectid))); ?></span> - </div> - </div> - </div></fieldset> - <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('prop_userinfo') ?></legend><div class="closable"> - <div class="line"> - <div class="label"> - <label class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_created')))); ?></span> - </label> - </div> - <div class="input"> - <img src="./modules/cms-ui/themes/default/images/icon/el_date.png" /> - <?php include_once( 'modules/template-engine/components/html/date/component-date.php') ?><?php component_date($create_date) ?> - <br/> - <img src="./modules/cms-ui/themes/default/images/icon/user.png" /> - <?php include_once( 'modules/template-engine/components/html/user/component-user.php') ?><?php component_user($create_user) ?> - </div> - </div> - <div class="line"> - <div class="label"> - <label class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_lastchange')))); ?></span> - </label> - </div> - <div class="input"> - <img src="./modules/cms-ui/themes/default/images/icon/el_date.png" /> - <?php include_once( 'modules/template-engine/components/html/date/component-date.php') ?><?php component_date($lastchange_date) ?> - <br/> - <img src="./modules/cms-ui/themes/default/images/icon/user.png" /> - <?php include_once( 'modules/template-engine/components/html/user/component-user.php') ?><?php component_user($lastchange_user) ?> - </div> - </div> - </div></fieldset> - <div class="or-form-actionbar"><input type="button" class="or-form-btn or-form-btn--secondary or-form-btn--cancel" value="<?php echo lang("CANCEL") ?>" /><input type="submit" class="or-form-btn or-form-btn--primary or-form-btn--save" value="<?php echo lang('BUTTON_OK') ?>" /></div></form>- \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/link/info.tpl.src.xml b/modules/cms-ui/themes/default/html/views/link/info.tpl.src.xml @@ -1,68 +0,0 @@ -<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd"> - <form> - <group title="message:global_prop"> - <part class="line"> - <part class="label"> - <text text="GLOBAL_name"></text> - </part> - <part class="input"> - <text var="name" class="name,focus" /> - </part> - </part> - - <part class="line"> - <part class="label"> - <text text="GLOBAL_description"></text> - </part> - <part class="input"> - <text var="description" class="description" /> - </part> - </part> - </group> - - <group title="message:additional_info"> - <part class="line"> - <part class="label"> - <label for="objectid"> - <text key="id"></text> - </label> - </part> - <part class="input"> - <text var="objectid"></text> - </part> - </part> - </group> - - <group title="message:prop_userinfo"> - <part class="line"> - <part class="label"> - <label for=""> - <text text="global_created"></text> - </label> - </part> - <part class="input"> - <image icon="el_date"></image> - <date date="var:create_date"></date> - <newline></newline> - <image icon="user"></image> - <user user="var:create_user"></user> - </part> - </part> - <part class="line"> - <part class="label"> - <label for=""> - <text text="global_lastchange"></text> - </label> - </part> - <part class="input"> - <image icon="el_date"></image> - <date date="var:lastchange_date"></date> - <newline></newline> - <image icon="user"></image> - <user user="var:lastchange_user"></user> - </part> - </part> - </group> - </form> -</output>- \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/object/info.php b/modules/cms-ui/themes/default/html/views/object/info.php @@ -0,0 +1,181 @@ +<?php if (!defined('OR_TITLE')) die('Forbidden'); ?> + <form name="" target="_self" data-target="view" action="./" data-method="info" data-action="object" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="or-form object" data-async="false" data-autosave="false"><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="object" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="info" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><div class="closable"> + <div class="line"> + <div class="label"> + <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_name')))); ?></span> + </div> + <div class="input"> + <span class="name"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> + </div> + </div> + <div class="line"> + <div class="label"> + <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_filename')))); ?></span> + </div> + <div class="input"> + <span class="filename"><?php echo nl2br(encodeHtml(htmlentities($filename))); ?></span> + </div> + </div> + <div class="line"> + <div class="label"> + <span><?php echo nl2br(encodeHtml(htmlentities(lang('file_extension')))); ?></span> + </div> + <div class="input"> + <span class="extension"><?php echo nl2br(encodeHtml(htmlentities($extension))); ?></span> + </div> + </div> + <div class="line"> + <div class="label"> + <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_description')))); ?></span> + </div> + <div class="input"> + <span><?php echo nl2br(encodeHtml(htmlentities($description))); ?></span> + </div> + </div> + </div></fieldset> + <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('additional_info') ?></legend><div class="closable"> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_full_filename" class="label"> + <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_full_filename')))); ?></span> + </label> + </div> + <div class="input"> + <span><?php echo nl2br(encodeHtml(htmlentities($full_filename))); ?></span> + </div> + </div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_size" class="label"> + <span><?php echo nl2br(encodeHtml(htmlentities(lang('FILE_SIZE')))); ?></span> + </label> + </div> + <div class="input"> + </div> + <span><?php echo nl2br(encodeHtml(htmlentities($size))); ?></span> + </div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_mimetype" class="label"> + <span><?php echo nl2br(encodeHtml(htmlentities(lang('FILE_mimetype')))); ?></span> + </label> + </div> + <div class="input"> + <span><?php echo nl2br(encodeHtml(htmlentities($mimetype))); ?></span> + </div> + </div> + <div class="line"> + <div class="label"> + </div> + <div class="input clickable"> + <a class="action" target="_self" data-type="dialog" data-action="" data-method="size" data-id="<?php echo OR_ID ?>" data-extra="{'dialogAction':null,'dialogMethod':'size'}" href="./#//"> + <span><?php echo nl2br(encodeHtml(htmlentities(lang(''.'menu_file_size'.'')))); ?></span> + </a> + </div> + </div> + <div class="line"> + <div class="label"> + <span><?php echo nl2br(encodeHtml(htmlentities(lang(lang('id'))))); ?></span> + </div> + <div class="input"> + <span><?php echo nl2br(encodeHtml(htmlentities($objectid))); ?></span> + </div> + </div> + <?php $if4=(isset($cache_filename)); if($if4){?> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_cache_filename" class="label"> + <span><?php echo nl2br(encodeHtml(htmlentities(lang('CACHE_FILENAME')))); ?></span> + </label> + </div> + <div class="input"> + <span><?php echo nl2br(encodeHtml(htmlentities($cache_filename))); ?></span> + <br/> + <img src="./modules/cms-ui/themes/default/images/icon/el_date.png" /> + <?php include_once( 'modules/template-engine/components/html/date/component-date.php') ?><?php component_date($cache_filemtime) ?> + </div> + </div> + <?php } ?> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_pages" class="label"> + <span><?php echo nl2br(encodeHtml(htmlentities(lang('FILE_PAGES')))); ?></span> + </label> + </div> + <div class="input"> + <div class="or-table-wrapper"><div class="or-table-filter"><input type="search" name="filter" placeholder="<?php echo lang('SEARCH_FILTER') ?>" /></div><div class="or-table-area"><table width="100%"> + <?php foreach($pages as $list_key=>$list_value){ ?><?php extract($list_value) ?> + <tr> + <td> + <a target="_self" data-url="<?php echo $url ?>" data-action="" data-method="info" data-id="<?php echo OR_ID ?>" data-extra="[]" href="./#//"> + <img src="./modules/cms-ui/themes/default/images/icon_page.png" /> + <span><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> + </a> + </td> + </tr> + <?php } ?> + </table></div></div> + <?php $if6=(($pages)==FALSE); if($if6){?> + <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NOT_FOUND')))); ?></span> + <?php } ?> + </div> + </div> + </div></fieldset> + <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('prop_userinfo') ?></legend><div class="closable"> + <div class="line"> + <div class="label"> + <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_created')))); ?></span> + </div> + <div class="input"> + <i class="image-icon image-icon--action-el_date"></i> + <?php include_once( 'modules/template-engine/components/html/date/component-date.php') ?><?php component_date($create_date) ?> + <br/> + <i class="image-icon image-icon--action-user"></i> + <?php include_once( 'modules/template-engine/components/html/user/component-user.php') ?><?php component_user($create_user) ?> + </div> + </div> + <div class="line"> + <div class="label"> + <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_lastchange')))); ?></span> + </div> + <div class="input"> + <i class="image-icon image-icon--action-el_date"></i> + <?php include_once( 'modules/template-engine/components/html/date/component-date.php') ?><?php component_date($lastchange_date) ?> + <br/> + <i class="image-icon image-icon--action-user"></i> + <?php include_once( 'modules/template-engine/components/html/user/component-user.php') ?><?php component_user($lastchange_user) ?> + </div> + </div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_published_date" class="label"> + <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_published')))); ?></span> + </label> + </div> + <div class="input"> + <i class="image-icon image-icon--action-el_date"></i> + <?php include_once( 'modules/template-engine/components/html/date/component-date.php') ?><?php component_date($published_date) ?> + <br/> + <i class="image-icon image-icon--action-user"></i> + <?php include_once( 'modules/template-engine/components/html/user/component-user.php') ?><?php component_user($published_user) ?> + </div> + </div> + </div></fieldset> + <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('settings') ?></legend><div class="closable"> + <div class="or-table-wrapper"><div class="or-table-filter"><input type="search" name="filter" placeholder="<?php echo lang('SEARCH_FILTER') ?>" /></div><div class="or-table-area"><table width="100%"> + <?php foreach($settings as $name=>$value){ ?> + <tr class="data"> + <td> + <span><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> + </td> + <td class="clickable"> + <a target="_self" data-type="dialog" data-action="" data-method="settings" data-id="<?php echo OR_ID ?>" data-extra="{'dialogAction':null,'dialogMethod':'settings'}" href="./#//"> + <span><?php echo nl2br(encodeHtml(htmlentities($value))); ?></span> + </a> + </td> + </tr> + <?php } ?> + </table></div></div> + </div></fieldset> + <div class="or-form-actionbar"><input type="button" class="or-form-btn or-form-btn--secondary or-form-btn--cancel" value="<?php echo lang("CANCEL") ?>" /></div></form>+ \ No newline at end of file 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 @@ -0,0 +1,186 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd"> + <form readonly="true"> + <group> + <part class="line"> + <part class="label"> + <text text="global_name"></text> + </part> + <part class="input"> + <text var="name" class="name" /> + </part> + </part> + <part class="line"> + <part class="label"> + <text text="global_filename"></text> + </part> + <part class="input"> + <text var="filename" class="filename" /> + </part> + </part> + <part class="line"> + <part class="label"> + <text text="file_extension"></text> + </part> + <part class="input"> + <text var="extension" class="extension" /> + </part> + </part> + <part class="line"> + <part class="label"> + <text text="global_description"></text> + </part> + <part class="input"> + <text var="description" /> + </part> + </part> + </group> + + <group title="message:additional_info"> + <part class="line"> + <part class="label"> + <label for="full_filename"> + <text text="global_full_filename"></text> + </label> + </part> + <part class="input"> + <text var="full_filename"></text> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="size"> + <text text="FILE_SIZE"></text> + </label> + </part> + <part class="input"> + </part> + <text var="size" /> + </part> + <part class="line"> + <part class="label"> + <label for="mimetype"> + <text text="FILE_mimetype"></text> + </label> + </part> + <part class="input"> + <text var="mimetype"></text> + </part> + </part> + <part class="line"> + <part class="label"> + </part> + <part class="input,clickable"> + <link class="action" type="dialog" subaction="size"> + <text key="menu_file_size"></text> + </link> + </part> + </part> + <part class="line"> + <part class="label"> + <text text="message:id"></text> + </part> + <part class="input"> + <text var="objectid"></text> + </part> + </part> + <if present="cache_filename"> + <part class="line"> + <part class="label"> + <label for="cache_filename"> + <text text="CACHE_FILENAME"></text> + </label> + </part> + <part class="input"> + <text var="cache_filename"></text> + <newline></newline> + <image icon="el_date"></image> + <date date="var:cache_filemtime"></date> + </part> + </part> + </if> + <part class="line"> + <part class="label"> + <label for="pages"> + <text text="FILE_PAGES"></text> + </label> + </part> + <part class="input"> + <table> + <list list="pages" extract="true"> + <row> + <column> + <link url="var:url" target="cms_main"> + <image type="page"></image> + <text var="name"></text> + </link> + </column> + </row> + </list> + </table> + <if empty="pages"> + <text text="GLOBAL_NOT_FOUND"></text> + </if> + </part> + </part> + </group> + <group title="message:prop_userinfo"> + <part class="line"> + <part class="label"> + <text text="global_created"></text> + </part> + <part class="input"> + <image elementtype="date"></image> + <date date="var:create_date"></date> + <newline></newline> + <image action="user"></image> + <user user="var:create_user"></user> + </part> + </part> + <part class="line"> + <part class="label"> + <text text="global_lastchange"></text> + </part> + <part class="input"> + <image elementtype="date"></image> + <date date="var:lastchange_date"></date> + <newline></newline> + <image action="user"></image> + <user user="var:lastchange_user"></user> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="published_date"> + <text text="global_published"></text> + </label> + </part> + <part class="input"> + <image elementtype="date"></image> + <date date="var:published_date"></date> + <newline></newline> + <image action="user"></image> + <user user="var:published_user"></user> + </part> + </part> + </group> + + <group title="message:settings"> + <table filter="true"> + <list list="settings" key="name" value="value" > + <row class="data"> + <column> + <text var="name" /> + </column> + <column class="clickable"> + <link subaction="settings" type="dialog"> + <text var="value" /> + </link> + </column> + </row> + </list> + </table> + </group> + + </form> +</output>+ \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/url/info.php b/modules/cms-ui/themes/default/html/views/url/info.php @@ -1,63 +0,0 @@ -<?php if (!defined('OR_TITLE')) die('Forbidden'); ?> - <form name="" target="_self" data-target="view" action="./" data-method="info" data-action="url" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="or-form url" data-async="false" data-autosave="false"><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="url" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="info" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> - <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('global_prop') ?></legend><div class="closable"> - <div class="line"> - <div class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_name')))); ?></span> - </div> - <div class="input"> - <span class="name,focus"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> - </div> - </div> - <div class="line"> - <div class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_description')))); ?></span> - </div> - <div class="input"> - <span class="description"><?php echo nl2br(encodeHtml(htmlentities($description))); ?></span> - </div> - </div> - </div></fieldset> - <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('additional_info') ?></legend><div class="closable"> - <div class="line"> - <div class="label"> - <label for="<?php echo REQUEST_ID ?>_objectid" class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang(''.'id'.'')))); ?></span> - </label> - </div> - <div class="input"> - <span><?php echo nl2br(encodeHtml(htmlentities($objectid))); ?></span> - </div> - </div> - </div></fieldset> - <fieldset class="toggle-open-close<?php echo true?" open":" closed" ?><?php echo true?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('prop_userinfo') ?></legend><div class="closable"> - <div class="line"> - <div class="label"> - <label class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_created')))); ?></span> - </label> - </div> - <div class="input"> - <img src="./modules/cms-ui/themes/default/images/icon/el_date.png" /> - <?php include_once( 'modules/template-engine/components/html/date/component-date.php') ?><?php component_date($create_date) ?> - <br/> - <img src="./modules/cms-ui/themes/default/images/icon/user.png" /> - <?php include_once( 'modules/template-engine/components/html/user/component-user.php') ?><?php component_user($create_user) ?> - </div> - </div> - <div class="line"> - <div class="label"> - <label class="label"> - <span><?php echo nl2br(encodeHtml(htmlentities(lang('global_lastchange')))); ?></span> - </label> - </div> - <div class="input"> - <img src="./modules/cms-ui/themes/default/images/icon/el_date.png" /> - <?php include_once( 'modules/template-engine/components/html/date/component-date.php') ?><?php component_date($lastchange_date) ?> - <br/> - <img src="./modules/cms-ui/themes/default/images/icon/user.png" /> - <?php include_once( 'modules/template-engine/components/html/user/component-user.php') ?><?php component_user($lastchange_user) ?> - </div> - </div> - </div></fieldset> - <div class="or-form-actionbar"><input type="button" class="or-form-btn or-form-btn--secondary or-form-btn--cancel" value="<?php echo lang("CANCEL") ?>" /><input type="submit" class="or-form-btn or-form-btn--primary or-form-btn--save" value="<?php echo lang('BUTTON_OK') ?>" /></div></form>- \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/url/info.tpl.src.xml b/modules/cms-ui/themes/default/html/views/url/info.tpl.src.xml @@ -1,68 +0,0 @@ -<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd"> - <form> - <group title="message:global_prop"> - <part class="line"> - <part class="label"> - <text text="GLOBAL_name"></text> - </part> - <part class="input"> - <text var="name" class="name,focus" /> - </part> - </part> - - <part class="line"> - <part class="label"> - <text text="GLOBAL_description"></text> - </part> - <part class="input"> - <text var="description" class="description" /> - </part> - </part> - </group> - - <group title="message:additional_info"> - <part class="line"> - <part class="label"> - <label for="objectid"> - <text key="id"></text> - </label> - </part> - <part class="input"> - <text var="objectid"></text> - </part> - </part> - </group> - - <group title="message:prop_userinfo"> - <part class="line"> - <part class="label"> - <label for=""> - <text text="global_created"></text> - </label> - </part> - <part class="input"> - <image icon="el_date"></image> - <date date="var:create_date"></date> - <newline></newline> - <image icon="user"></image> - <user user="var:create_user"></user> - </part> - </part> - <part class="line"> - <part class="label"> - <label for=""> - <text text="global_lastchange"></text> - </label> - </part> - <part class="input"> - <image icon="el_date"></image> - <date date="var:lastchange_date"></date> - <newline></newline> - <image icon="user"></image> - <user user="var:lastchange_user"></user> - </part> - </part> - </group> - </form> -</output>- \ No newline at end of file diff --git a/modules/template-engine/components/html/part/Part.class.php b/modules/template-engine/components/html/part/Part.class.php @@ -10,6 +10,8 @@ class PartComponent extends Component public function begin() { echo '<div'; + + $this->class = strtr($this->class,[','=>' ']); if ( !empty($this->class)) echo ' class="'.$this->htmlvalue($this->class).'"'; @@ -25,6 +27,3 @@ class PartComponent extends Component echo '</div>'; } } - - -?>- \ No newline at end of file diff --git a/modules/util/.htaccess b/modules/util/.htaccess @@ -1,2 +1,2 @@ -order deny,allow -deny from all- \ No newline at end of file +# order deny,allow +# deny from all+ \ No newline at end of file