openrat-cms

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

commit db499f59ac856c6b0c8ad21f789551b288590f44
parent d78f066dbc5fdd419eafa738196867d8216088af
Author: Jan Dankert <devnull@localhost>
Date:   Tue, 19 Dec 2017 22:12:55 +0100

Der Dateityp "File" kann nun als "Image" und "Text" näher spezifiziert werden. DB-Update im nächsten Commit.

Diffstat:
dispatcher.php | 1-
functions/config.inc.php | 25-------------------------
functions/request.inc.php | 11+----------
modules/cms-core/action/FileAction.class.php | 161+------------------------------------------------------------------------------
modules/cms-core/action/ImageAction.class.php | 195+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
modules/cms-core/action/TextAction.class.php | 55+++++++++++++++++++++++++++++++++++++++++++++++++++++++
modules/cms-core/model/File.class.php | 203-------------------------------------------------------------------------------
modules/cms-core/model/Image.class.php | 253+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
modules/cms-core/model/Text.class.php | 48++++++++++++++++++++++++++++++++++++++++++++++++
modules/cms-core/model/include.inc.php | 2++
themes/default/templates/file/size.tpl.out.php | 0
themes/default/templates/file/size.tpl.src.xml | 83-------------------------------------------------------------------------------
themes/default/templates/image/compress.tpl.out.php | 0
themes/default/templates/image/compress.tpl.src.xml | 27+++++++++++++++++++++++++++
themes/default/templates/image/edit.tpl.out.php | 30++++++++++++++++++++++++++++++
themes/default/templates/image/edit.tpl.src.xml | 16++++++++++++++++
themes/default/templates/image/extract.tpl.out.php | 0
themes/default/templates/image/extract.tpl.src.xml | 4++++
themes/default/templates/image/info.tpl.out.php | 198+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/templates/image/info.tpl.src.xml | 150+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/templates/image/preview.tpl.out.php | 17+++++++++++++++++
themes/default/templates/image/preview.tpl.src.xml | 15+++++++++++++++
themes/default/templates/image/prop.tpl.out.php | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/templates/image/prop.tpl.src.xml | 48++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/templates/image/pub.tpl.out.php | 0
themes/default/templates/image/pub.tpl.src.xml | 26++++++++++++++++++++++++++
themes/default/templates/image/remove.tpl.out.php | 0
themes/default/templates/image/remove.tpl.src.xml | 4++++
themes/default/templates/image/show.tpl.out.php | 0
themes/default/templates/image/show.tpl.src.xml | 4++++
themes/default/templates/image/size.tpl.out.php | 0
themes/default/templates/image/size.tpl.src.xml | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/templates/image/structure.tpl.out.php | 8++++++++
themes/default/templates/image/structure.tpl.src.xml | 8++++++++
themes/default/templates/image/uncompress.tpl.out.php | 0
themes/default/templates/image/uncompress.tpl.src.xml | 23+++++++++++++++++++++++
themes/default/templates/image/value.tpl.out.php | 36++++++++++++++++++++++++++++++++++++
themes/default/templates/image/value.tpl.src.xml | 23+++++++++++++++++++++++
themes/default/templates/text/compress.tpl.out.php | 0
themes/default/templates/text/compress.tpl.src.xml | 27+++++++++++++++++++++++++++
themes/default/templates/text/edit.tpl.out.php | 30++++++++++++++++++++++++++++++
themes/default/templates/text/edit.tpl.src.xml | 16++++++++++++++++
themes/default/templates/text/extract.tpl.out.php | 0
themes/default/templates/text/extract.tpl.src.xml | 4++++
themes/default/templates/text/info.tpl.out.php | 198+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/templates/text/info.tpl.src.xml | 150+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/templates/text/preview.tpl.out.php | 17+++++++++++++++++
themes/default/templates/text/preview.tpl.src.xml | 15+++++++++++++++
themes/default/templates/text/prop.tpl.out.php | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/templates/text/prop.tpl.src.xml | 48++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/templates/text/pub.tpl.out.php | 0
themes/default/templates/text/pub.tpl.src.xml | 26++++++++++++++++++++++++++
themes/default/templates/text/remove.tpl.out.php | 0
themes/default/templates/text/remove.tpl.src.xml | 4++++
themes/default/templates/text/show.tpl.out.php | 0
themes/default/templates/text/show.tpl.src.xml | 4++++
themes/default/templates/text/size.tpl.out.php | 0
themes/default/templates/text/size.tpl.src.xml | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/templates/text/structure.tpl.out.php | 8++++++++
themes/default/templates/text/structure.tpl.src.xml | 8++++++++
themes/default/templates/text/uncompress.tpl.out.php | 0
themes/default/templates/text/uncompress.tpl.src.xml | 23+++++++++++++++++++++++
themes/default/templates/text/value.tpl.out.php | 36++++++++++++++++++++++++++++++++++++
themes/default/templates/text/value.tpl.src.xml | 23+++++++++++++++++++++++
64 files changed, 2123 insertions(+), 482 deletions(-)

diff --git a/dispatcher.php b/dispatcher.php @@ -163,7 +163,6 @@ try define('PRODUCTION' ,$conf['production']); define('DEVELOPMENT' ,!PRODUCTION); - require_once( "functions/config.inc.php" ); require_once( "functions/language.inc.".PHP_EXT ); require_once( "functions/db.inc.".PHP_EXT ); diff --git a/functions/config.inc.php b/functions/config.inc.php @@ -1,24 +0,0 @@ -<?php -// 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. - - -$conf_logfile = $conf['log']['file']; -$conf_loglevel = $conf['log']['level']; -$conf_themedir = OR_THEMES_DIR.$conf['interface']['theme']; - -?>- \ No newline at end of file diff --git a/functions/request.inc.php b/functions/request.inc.php @@ -29,19 +29,10 @@ if ( ini_get('register_globals') ) if ( get_magic_quotes_gpc() == 1 ) { - foreach( $REQ as $p=>$v ) + foreach( $REQ as $p=>$v ) if ( !is_array($v) ) $REQ[$p] = stripslashes($v); } -function request_into_session( $name ) -{ - global $REQ,$SESS; - - if (isset($REQ[$name])) - { - $SESS[$name] = $REQ[$name]; - } -} ?> \ No newline at end of file diff --git a/modules/cms-core/action/FileAction.class.php b/modules/cms-core/action/FileAction.class.php @@ -8,6 +8,7 @@ use cms\model\File; use Http; use \Html; +use Upload; // OpenRat Content Management System // Copyright (C) 2002-2012 Jan Dankert, cms@jandankert.de @@ -183,164 +184,6 @@ class FileAction extends ObjectAction } - function imageFormat() - { - if ( ! function_exists( 'imagetypes' ) ) - return 0; - - $ext = strtolower($this->file->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; - } - - - - function imageExt() - { - switch( $this->imageFormat() ) - { - case IMG_GIF: - return 'GIF'; - case IMG_JPG: - return 'JPEG'; - case IMG_PNG: - return 'PNG'; - } - } - - - - 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 - */ - function sizeView() - { - $this->setTemplateVars( $this->file->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->file->getImageSize(); - $this->setTemplateVar('width' ,$this->file->width ); - $this->setTemplateVar('height',$this->file->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 File($this->file->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->file->objectid ); - } - else - { - $imageFile = $this->file; - } - - 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'); - } - - function propView() { @@ -454,8 +297,6 @@ class FileAction extends ObjectAction function extractView() { $this->setTemplateVars( $this->file->getProperties() ); - - $imageFormat = $this->imageFormat(); } diff --git a/modules/cms-core/action/ImageAction.class.php b/modules/cms-core/action/ImageAction.class.php @@ -0,0 +1,195 @@ +<?php + +namespace cms\action; + +use cms\model\Folder; +use cms\model\Image; +use cms\model\Object; +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 = SECURITY_USER; + + var $image; + + /** + * Konstruktor + */ + public function __construct() + { + $this->image = new Image( $this->getRequestId() ); + $this->image->load(); + } + + + + /** + * 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; + } + + +} diff --git a/modules/cms-core/action/TextAction.class.php b/modules/cms-core/action/TextAction.class.php @@ -0,0 +1,54 @@ +<?php + +namespace cms\action; + +use cms\model\Folder; +use cms\model\Object; +use cms\model\File; + +use cms\model\Text; +use Http; +use \Html; +use Upload; + +// 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 = SECURITY_USER; + + var $text; + + /** + * Konstruktor + */ + function __construct() + { + $this->text = new Text( $this->getRequestId() ); + $this->text->load(); + } + +} + +?>+ \ No newline at end of file diff --git a/modules/cms-core/model/File.class.php b/modules/cms-core/model/File.class.php @@ -40,18 +40,6 @@ class File extends Object var $publish = null; var $mime_type = ''; - /** - * Breite eines Bildes. Ist nur verfuegbar, wenn vorher - * #getImageSize() aufgerufen wurde. - */ - var $width = null; - - /** - * Hoehe eines Bildes. Ist nur verfuegbar, wenn vorher - * #getImageSize() aufgerufen wurde. - */ - var $height = null; - var $tmpfile; var $content_negotiation = false; @@ -224,197 +212,6 @@ class File extends Object } - - /** - * Ermittelt Breite und H�he des Bildes.<br> - * Die Werte lassen sich anschlie�end �ber die Eigenschaften "width" und "height" ermitteln. - */ - function getImageSize() - { - if ( is_null($this->width) ) - { - $this->write(); // Datei schreiben - - // Bildinformationen ermitteln - $size = getimagesize( $this->tmpfile() ); - - // Breite und Hoehe des aktuellen Bildes - $this->width = $size[0]; - $this->height = $size[1]; - } - } - - - - /** - * Veraendert die Bildgroesse eines Bildes - * - * Diese Methode sollte natuerlich nur bei Bildern ausgefuehrt werden. - * - * @param Neue Breite - * @param Neue Hoehe - * @param Bildgr��enfaktor - * @param Altes Format als Integer-Konstante IMG_xxx - * @param Neues Format als Integer-Konstante IMG_xxx - * @param Jpeg-Qualitaet (sofern neues Format = Jpeg) - */ - function imageResize( $newWidth,$newHeight,$factor,$oldformat,$newformat,$jpegquality ) - { - global $conf; - - $this->write(); // Datei schreiben - - // Bildinformationen ermitteln - $size = getimagesize( $this->tmpfile() ); - - // Breite und Hoehe des aktuellen Bildes - $oldWidth = $size[0]; - $oldHeight = $size[1]; - $aspectRatio = $oldHeight / $oldWidth; // Seitenverhaeltnis - - // Wenn Breite und Hoehe fehlen, dann Bildgroesse beibehalten - if ( $newWidth == 0 && $newHeight == 0) - { - if ( $factor != 0 && $factor != 1 ) - { - $newWidth = $oldWidth * $factor; - $newHeight = $oldHeight * $factor; - $resizing = true; - } - else - { - $newWidth = $oldWidth; - $newHeight = $oldHeight; - $resizing = false; - } - } - else - { - $resizing = true; - } - - // Wenn nur Breite oder Hoehe angegeben ist, dann - // das Seitenverhaeltnis beibehalten - if ( $newWidth == 0 ) - $newWidth = $newHeight / $aspectRatio; - - if ( $newHeight == 0 ) - $newHeight = $newWidth * $aspectRatio; - - - switch( $oldformat ) - { - case IMG_GIF: // GIF - - $oldImage = ImageCreateFromGIF( $this->tmpfile ); - break; - - case IMG_JPG: // JPEG - - $oldImage = ImageCreateFromJPEG($this->tmpfile); - break; - - case IMG_PNG: // PNG - - $oldImage = imagecreatefrompng($this->tmpfile); - break; - - default: - die('unsupported image format "'.$this->extension.'", cannot load image. resize failed'); - } - - // Ab Version 2 der GD-Bibliothek sind TrueColor-Umwandlungen moeglich. - global $conf; - $hasTrueColor = $conf['image']['truecolor']; - - switch( $newformat ) - { - case IMG_GIF: // GIF - - if ( $resizing ) - { - $newImage = ImageCreate($newWidth,$newHeight); - ImageCopyResized($newImage,$oldImage,0,0,0,0,$newWidth, - $newHeight,$oldWidth,$oldHeight); - } - else - { - $newImage = &$oldImage; - } - - ImageGIF($newImage, $this->tmpfile() ); - $this->extension = 'gif'; - - break; - - case IMG_JPG: // JPEG - - if ( !$resizing ) - { - $newImage = &$oldImage; - } - elseif ( $hasTrueColor ) - { - // Verwende TrueColor (GD2) - $newImage = imageCreateTrueColor( $newWidth,$newHeight ); - ImageCopyResampled($newImage,$oldImage,0,0,0,0,$newWidth, - $newHeight,$oldWidth,$oldHeight); - } - else - { - // GD Version 1.x unterstuetzt kein TrueColor - $newImage = ImageCreate($newWidth,$newHeight); - - ImageCopyResized($newImage,$oldImage,0,0,0,0,$newWidth, - $newHeight,$oldWidth,$oldHeight); - } - - ImageJPEG($newImage, $this->tmpfile,$jpegquality ); - $this->extension = 'jpeg'; - - break; - - case IMG_PNG: // PNG - - if ( !$resizing ) - { - $newImage = &$oldImage; - } - elseif ( $hasTrueColor ) - { - // Verwende TrueColor (GD2) - $newImage = imageCreateTrueColor( $newWidth,$newHeight ); - - ImageCopyResampled($newImage,$oldImage,0,0,0,0,$newWidth, - $newHeight,$oldWidth,$oldHeight); - } - else - { - // GD Version 1.x unterstuetzt kein TrueColor - $newImage = ImageCreate($newWidth,$newHeight); - - ImageCopyResized($newImage,$oldImage,0,0,0,0,$newWidth, - $newHeight,$oldWidth,$oldHeight); - } - - imagepng( $newImage,$this->tmpfile() ); - $this->extension = 'png'; - - break; - - default: - die('unsupported image format "'.$newformat.'", cannot resize'); - } - - $f = fopen( $this->tmpfile(), "r" ); - $this->value = fread( $f,filesize($this->tmpfile()) ); - fclose( $f ); - - imagedestroy( $oldImage ); - //imagedestroy( $newImage ); - } - - /** * Lesen der Datei aus der Datenbank. * diff --git a/modules/cms-core/model/Image.class.php b/modules/cms-core/model/Image.class.php @@ -0,0 +1,252 @@ +<?php +namespace cms\model; +// 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. + + +// Standard Mime-Type +define('OR_FILE_DEFAULT_MIMETYPE','application/octet-stream'); + + +/** + * Datei. + * + * @author Jan Dankert + * @package openrat.objects + */ +class Image extends File +{ + var $fileid; + + /** + * Breite eines Bildes. Ist nur verfuegbar, wenn vorher + * #getImageSize() aufgerufen wurde. + */ + var $width = null; + + /** + * Hoehe eines Bildes. Ist nur verfuegbar, wenn vorher + * #getImageSize() aufgerufen wurde. + */ + var $height = null; + + + /** + * Konstruktor + * + * @param Objekt-Id + */ + function __construct( $objectid='' ) + { + parent::__construct($objectid); + } + + + + + /** + * Ermittelt Breite und H�he des Bildes.<br> + * Die Werte lassen sich anschlie�end �ber die Eigenschaften "width" und "height" ermitteln. + */ + function getImageSize() + { + if ( is_null($this->width) ) + { + $this->write(); // Datei schreiben + + // Bildinformationen ermitteln + $size = getimagesize( $this->tmpfile() ); + + // Breite und Hoehe des aktuellen Bildes + $this->width = $size[0]; + $this->height = $size[1]; + } + } + + + + /** + * Veraendert die Bildgroesse eines Bildes + * + * Diese Methode sollte natuerlich nur bei Bildern ausgefuehrt werden. + * + * @param Neue Breite + * @param Neue Hoehe + * @param Bildgr��enfaktor + * @param Altes Format als Integer-Konstante IMG_xxx + * @param Neues Format als Integer-Konstante IMG_xxx + * @param Jpeg-Qualitaet (sofern neues Format = Jpeg) + */ + function imageResize( $newWidth,$newHeight,$factor,$oldformat,$newformat,$jpegquality ) + { + global $conf; + + $this->write(); // Datei schreiben + + // Bildinformationen ermitteln + $size = getimagesize( $this->tmpfile() ); + + // Breite und Hoehe des aktuellen Bildes + $oldWidth = $size[0]; + $oldHeight = $size[1]; + $aspectRatio = $oldHeight / $oldWidth; // Seitenverhaeltnis + + // Wenn Breite und Hoehe fehlen, dann Bildgroesse beibehalten + if ( $newWidth == 0 && $newHeight == 0) + { + if ( $factor != 0 && $factor != 1 ) + { + $newWidth = $oldWidth * $factor; + $newHeight = $oldHeight * $factor; + $resizing = true; + } + else + { + $newWidth = $oldWidth; + $newHeight = $oldHeight; + $resizing = false; + } + } + else + { + $resizing = true; + } + + // Wenn nur Breite oder Hoehe angegeben ist, dann + // das Seitenverhaeltnis beibehalten + if ( $newWidth == 0 ) + $newWidth = $newHeight / $aspectRatio; + + if ( $newHeight == 0 ) + $newHeight = $newWidth * $aspectRatio; + + + switch( $oldformat ) + { + case IMG_GIF: // GIF + + $oldImage = ImageCreateFromGIF( $this->tmpfile ); + break; + + case IMG_JPG: // JPEG + + $oldImage = ImageCreateFromJPEG($this->tmpfile); + break; + + case IMG_PNG: // PNG + + $oldImage = imagecreatefrompng($this->tmpfile); + break; + + default: + die('unsupported image format "'.$this->extension.'", cannot load image. resize failed'); + } + + // Ab Version 2 der GD-Bibliothek sind TrueColor-Umwandlungen moeglich. + global $conf; + $hasTrueColor = $conf['image']['truecolor']; + + switch( $newformat ) + { + case IMG_GIF: // GIF + + if ( $resizing ) + { + $newImage = ImageCreate($newWidth,$newHeight); + ImageCopyResized($newImage,$oldImage,0,0,0,0,$newWidth, + $newHeight,$oldWidth,$oldHeight); + } + else + { + $newImage = &$oldImage; + } + + ImageGIF($newImage, $this->tmpfile() ); + $this->extension = 'gif'; + + break; + + case IMG_JPG: // JPEG + + if ( !$resizing ) + { + $newImage = &$oldImage; + } + elseif ( $hasTrueColor ) + { + // Verwende TrueColor (GD2) + $newImage = imageCreateTrueColor( $newWidth,$newHeight ); + ImageCopyResampled($newImage,$oldImage,0,0,0,0,$newWidth, + $newHeight,$oldWidth,$oldHeight); + } + else + { + // GD Version 1.x unterstuetzt kein TrueColor + $newImage = ImageCreate($newWidth,$newHeight); + + ImageCopyResized($newImage,$oldImage,0,0,0,0,$newWidth, + $newHeight,$oldWidth,$oldHeight); + } + + ImageJPEG($newImage, $this->tmpfile,$jpegquality ); + $this->extension = 'jpeg'; + + break; + + case IMG_PNG: // PNG + + if ( !$resizing ) + { + $newImage = &$oldImage; + } + elseif ( $hasTrueColor ) + { + // Verwende TrueColor (GD2) + $newImage = imageCreateTrueColor( $newWidth,$newHeight ); + + ImageCopyResampled($newImage,$oldImage,0,0,0,0,$newWidth, + $newHeight,$oldWidth,$oldHeight); + } + else + { + // GD Version 1.x unterstuetzt kein TrueColor + $newImage = ImageCreate($newWidth,$newHeight); + + ImageCopyResized($newImage,$oldImage,0,0,0,0,$newWidth, + $newHeight,$oldWidth,$oldHeight); + } + + imagepng( $newImage,$this->tmpfile() ); + $this->extension = 'png'; + + break; + + default: + die('unsupported image format "'.$newformat.'", cannot resize'); + } + + $f = fopen( $this->tmpfile(), "r" ); + $this->value = fread( $f,filesize($this->tmpfile()) ); + fclose( $f ); + + imagedestroy( $oldImage ); + //imagedestroy( $newImage ); + } + +} + +?>+ \ No newline at end of file diff --git a/modules/cms-core/model/Text.class.php b/modules/cms-core/model/Text.class.php @@ -0,0 +1,47 @@ +<?php +namespace cms\model; +// 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. + + +// Standard Mime-Type +define('OR_FILE_DEFAULT_MIMETYPE','application/octet-stream'); + + +/** + * Datei. + * + * @author Jan Dankert + * @package openrat.objects + */ +class Text extends File +{ + + + /** + * Konstruktor + * + * @param string $objectid + */ + function __construct( $objectid='' ) + { + parent::__construct( $objectid ); + } + +} + +?>+ \ No newline at end of file diff --git a/modules/cms-core/model/include.inc.php b/modules/cms-core/model/include.inc.php @@ -11,6 +11,8 @@ require_once( __DIR__."/Folder.class.".PHP_EXT ); require_once( __DIR__."/Link.class.".PHP_EXT ); require_once( __DIR__."/Url.class.".PHP_EXT ); require_once( __DIR__."/File.class.".PHP_EXT ); +require_once( __DIR__."/Image.class.".PHP_EXT ); +require_once( __DIR__."/Text.class.".PHP_EXT ); require_once( __DIR__."/User.class.".PHP_EXT ); require_once( __DIR__."/Group.class.".PHP_EXT ); require_once( __DIR__."/Project.class.".PHP_EXT ); diff --git a/themes/default/templates/file/size.tpl.out.php b/themes/default/templates/file/size.tpl.out.php diff --git a/themes/default/templates/file/size.tpl.src.xml b/themes/default/templates/file/size.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.xsd"> - <form> - <part class="line"> - <part class="label"> - <text text="IMAGE_OLD_SIZE"></text> - </part> - <part class="input"> - <text var="width"></text> - <text raw="_*_"></text> - <text var="height"></text> - </part> - </part> - <if not="" empty="formats"> - <group title="message:IMAGE_NEW_SIZE"> - <part class="line"> - <part class="label"></part> - - <part class="input"> - - <radio name="type" value="factor"></radio> - <label for="type_factor"> - <text text="FILE_IMAGE_SIZE_FACTOR"></text> - </label> - - - <selectbox name="factor" list="factors"></selectbox> - <set var="factor" value="1"></set> - </part> - </part> - <part class="line"> - <part class="label"></part> - <part class="input"> - <radio name="type" value="input"></radio> - <label for="type_input"> - <text text="FILE_IMAGE_NEW_WIDTH_HEIGHT"></text> - </label> - </part> - <part class="label"></part> - <part class="input"> - <input name="width" size="10"></input> - <text raw="_*_"></text> - <input name="height" size="10"></input> - </part> - </part> - </group> - <group title="message:options"> - <part class="line"> - <part class="label"> - <label for="format"> - <text text="FILE_IMAGE_FORMAT"></text> - </label> - </part> - <part class="input"> - <selectbox name="format" list="formats"></selectbox> - </part> - </part> - <part class="line"> - <part class="label"> - <label for="jpeglist_compression"> - <text text="FILE_IMAGE_JPEG_COMPRESSION"></text> - </label> - </part> - <part class="input"> - <set var="jpeg_compression" value="70"></set> - <selectbox list="jpeglist" name="jpeg_compression"></selectbox> - </part> - </part> - <part class="line"> - <part class="label"> - </part> - <part class="input"> - <checkbox name="copy"></checkbox> - <label for="copy"> - <text key="copy"></text> - </label> - </part> - </part> - </group> - </if> - </form> -</output>- \ No newline at end of file diff --git a/themes/default/templates/image/compress.tpl.out.php b/themes/default/templates/image/compress.tpl.out.php diff --git a/themes/default/templates/image/compress.tpl.src.xml b/themes/default/templates/image/compress.tpl.src.xml @@ -0,0 +1,26 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <form> + <group title="message:OPTIONS"> + <part class="line"> + <part class="label"> + <text text="type"></text> + </part> + <part class="input"> + <set var="gz" value="gz"></set> + <selectbox list="formats" name="format" default="gz"></selectbox> + <set var="replace" value="1"></set> + <radio name="replace" value="1"></radio> + <label for="replace_1"> + <text key="replace"></text> + </label> + <newline></newline> + <radio name="replace" value="0"></radio> + <label for="replace_0"> + <text key="new"></text> + </label> + </part> + </part> + </group> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/image/edit.tpl.out.php b/themes/default/templates/image/edit.tpl.out.php @@ -0,0 +1,29 @@ + + + <form name="" target="_self" action="<?php echo OR_ACTION ?>" data-method="<?php echo OR_METHOD ?>" data-action="<?php echo OR_ACTION ?>" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="<?php echo OR_ACTION ?>" data-async="" data-autosave="" onSubmit="formSubmit( $(this) ); return false;"><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo OR_ACTION ?>" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo OR_METHOD ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <div class="headermenu"><div class="toolbar-icon clickable"><a href="javascript:void(0);" title="<?php echo lang('MENU_VALUE') ?>" data-type="dialog" data-name="<?php echo lang('MENU_VALUE') ?>" data-method="value"><img src="./themes/default/images/icon/action/value.svg" title="<?php echo lang('MENU_value_DESC') ?>" /><?php echo lang('MENU_value') ?></a></div></div> + + <div class="label"> + </div> + <div class="line"> + <div class="input"> + <br/> + + <input size="40" id="req15134694791873034748_file" type="file" name="file" class="upload" /> + + <br/> + + <br/> + + </div> + </div> + +<div class="bottom"> + <div class="command "> + + <input type="button" class="submit ok" value="OK" onclick="$(this).closest('div.sheet').find('form').submit(); " /> + + <!-- Cancel-Button nicht anzeigen, wenn cancel==false. --> </div> +</div> +</form> + + \ No newline at end of file diff --git a/themes/default/templates/image/edit.tpl.src.xml b/themes/default/templates/image/edit.tpl.src.xml @@ -0,0 +1,15 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <form> + <header views="value" /> + <part class="label" /> + <part class="line"> + <part class="input"> + <newline></newline> + <upload name="file"></upload> + <newline></newline> + <newline></newline> + </part> + </part> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/image/extract.tpl.out.php b/themes/default/templates/image/extract.tpl.out.php diff --git a/themes/default/templates/image/extract.tpl.src.xml b/themes/default/templates/image/extract.tpl.src.xml @@ -0,0 +1,3 @@ +<output xmlns="http://www.openrat.de/template" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><form><window name="asdf" title="asdfdfs"><row><column colspan="2" class="act"><button type="ok"></button></column></row></window></form></dummy></output>+ \ No newline at end of file diff --git a/themes/default/templates/image/info.tpl.out.php b/themes/default/templates/image/info.tpl.out.php @@ -0,0 +1,197 @@ + + + <form name="" target="_self" action="<?php echo OR_ACTION ?>" data-method="<?php echo OR_METHOD ?>" data-action="<?php echo OR_ACTION ?>" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="<?php echo OR_ACTION ?>" data-async="" data-autosave="" onSubmit="formSubmit( $(this) ); return false;"><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo OR_ACTION ?>" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo OR_METHOD ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><div> + <div class="line"> + <div class="label"> + <span class="text"><?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 class="text"><?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 class="text"><?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 class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('global_description')))); ?></span> + + </div> + <div class="input"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($description))); ?></span> + + </div> + </div> + </div></fieldset> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><legend><div class="arrow-right closed" /><div class="arrow-down open" /><?php echo lang('additional_info') ?></legend><div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_full_filename" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('global_full_filename')))); ?></span> + + </label> + </div> + <div class="input"> + <span class="text"><?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 class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('FILE_SIZE')))); ?></span> + + </label> + </div> + <div class="input"> + </div> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($size))); ?></span> + + </div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_mimetype" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('FILE_mimetype')))); ?></span> + + </label> + </div> + <div class="input"> + <span class="text"><?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 ?>" href="javascript:void(0);"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'menu_file_size'.'')))); ?></span> + + </a> + + </div> + </div> + <div class="line"> + <div class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(lang('id'))))); ?></span> + + </div> + <div class="input"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($objectid))); ?></span> + + </div> + </div> + <?php $if4=(!empty($cache_filename)); if($if4){?> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_cache_filename" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('CACHE_FILENAME')))); ?></span> + + </label> + </div> + <div class="input"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($cache_filename))); ?></span> + + <br/> + + <img class="" title="" src="./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 class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('FILE_PAGES')))); ?></span> + + </label> + </div> + <div class="input"> + <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="<?php echo OR_ACTION ?>" data-method="<?php echo OR_METHOD ?>" data-id="<?php echo OR_ID ?>" href="javascript:void(0);"> + <img class="" title="" src="./themes/default/images/icon_page.png" /> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> + + </a> + + </td> + </tr> + <?php } ?> + </table> + <?php $if6=(empty($pages)); if($if6){?> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NOT_FOUND')))); ?></span> + + <?php } ?> + </div> + </div> + </div></fieldset> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><legend><div class="arrow-right closed" /><div class="arrow-down open" /><?php echo lang('prop_userinfo') ?></legend><div> + <div class="line"> + <div class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('global_created')))); ?></span> + + </div> + <div class="input"> + <img class="" title="" src="./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 class="" title="" src="./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"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('global_lastchange')))); ?></span> + + </div> + <div class="input"> + <img class="" title="" src="./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 class="" title="" src="./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="bottom"> + <div class="command "> + + <input type="button" class="submit ok" value="OK" onclick="$(this).closest('div.sheet').find('form').submit(); " /> + + <!-- Cancel-Button nicht anzeigen, wenn cancel==false. --> </div> +</div> +</form> + + \ No newline at end of file diff --git a/themes/default/templates/image/info.tpl.src.xml b/themes/default/templates/image/info.tpl.src.xml @@ -0,0 +1,149 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../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 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"> + <text text="global_lastchange"></text> + </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/themes/default/templates/image/preview.tpl.out.php b/themes/default/templates/image/preview.tpl.out.php @@ -0,0 +1,16 @@ + + + <?php $if2=($image); if($if2){?> + <iframe src="<?php echo $preview_url ?>"></iframe> + + <?php } ?> + <?php if(!$if2){?> + <div class="clickable"> + <a class="action" target="_self" data-url="<?php echo $preview_url ?>" data-type="popup" data-action="<?php echo OR_ACTION ?>" data-method="<?php echo OR_METHOD ?>" data-id="<?php echo OR_ID ?>" href="javascript:void(0);"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'LINK_OPEN_IN_NEW_WINDOW'.'')))); ?></span> + + </a> + + </div> + <?php } ?> + + \ No newline at end of file diff --git a/themes/default/templates/image/preview.tpl.src.xml b/themes/default/templates/image/preview.tpl.src.xml @@ -0,0 +1,14 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + + <if true="var:image"> + <insert url="var:preview_url"></insert> + </if> + <else> + <part class="clickable"> + <link type="popup" url="var:preview_url" class="action"> + <text key="LINK_OPEN_IN_NEW_WINDOW" /> + </link> + </part> + </else> +</output> + \ No newline at end of file diff --git a/themes/default/templates/image/prop.tpl.out.php b/themes/default/templates/image/prop.tpl.out.php @@ -0,0 +1,63 @@ + + + <div class="headermenu"><div class="toolbar-icon clickable"><a href="javascript:void(0);" title="<?php echo lang('MENU_SIZE') ?>" data-type="dialog" data-name="<?php echo lang('MENU_SIZE') ?>" data-method="size"><img src="./themes/default/images/icon/action/size.svg" title="<?php echo lang('MENU_size_DESC') ?>" /><?php echo lang('MENU_size') ?></a></div><div class="toolbar-icon clickable"><a href="javascript:void(0);" title="<?php echo lang('MENU_COMPRESS') ?>" data-type="dialog" data-name="<?php echo lang('MENU_COMPRESS') ?>" data-method="compress"><img src="./themes/default/images/icon/action/compress.svg" title="<?php echo lang('MENU_compress_DESC') ?>" /><?php echo lang('MENU_compress') ?></a></div><div class="toolbar-icon clickable"><a href="javascript:void(0);" title="<?php echo lang('MENU_UNCOMPRESS') ?>" data-type="dialog" data-name="<?php echo lang('MENU_UNCOMPRESS') ?>" data-method="uncompress"><img src="./themes/default/images/icon/action/uncompress.svg" title="<?php echo lang('MENU_uncompress_DESC') ?>" /><?php echo lang('MENU_uncompress') ?></a></div><div class="toolbar-icon clickable"><a href="javascript:void(0);" title="<?php echo lang('MENU_EXTRACT') ?>" data-type="dialog" data-name="<?php echo lang('MENU_EXTRACT') ?>" data-method="extract"><img src="./themes/default/images/icon/action/extract.svg" title="<?php echo lang('MENU_extract_DESC') ?>" /><?php echo lang('MENU_extract') ?></a></div></div> + + <form name="" target="_self" action="<?php echo OR_ACTION ?>" data-method="<?php echo OR_METHOD ?>" data-action="<?php echo OR_ACTION ?>" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="<?php echo OR_ACTION ?>" data-async="" data-autosave="" onSubmit="formSubmit( $(this) ); return false;"><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo OR_ACTION ?>" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo OR_METHOD ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_name" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('global_name')))); ?></span> + + </label> + </div> + <div class="input"> + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="name" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> + + </div> + </div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_filename" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('global_filename')))); ?></span> + + </label> + </div> + <div class="input"> + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_filename" name="filename<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="filename" value="<?php echo Text::encodeHtml(@$filename) ?>" /><?php if ('') { ?><input type="hidden" name="filename" value="<?php $filename ?>"/><?php } ?></div> + + </div> + </div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_extension" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('file_extension')))); ?></span> + + </label> + </div> + <div class="input"> + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_extension" name="extension<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="extension" value="<?php echo Text::encodeHtml(@$extension) ?>" /><?php if ('') { ?><input type="hidden" name="extension" value="<?php $extension ?>"/><?php } ?></div> + + </div> + </div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_description" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('global_description')))); ?></span> + + </label> + </div> + <div class="input"> + <div class="inputholder"><textarea class="description" name="description"><?php echo Text::encodeHtml($description) ?></textarea></div> + + </div> + </div> + +<div class="bottom"> + <div class="command "> + + <input type="button" class="submit ok" value="OK" onclick="$(this).closest('div.sheet').find('form').submit(); " /> + + <!-- Cancel-Button nicht anzeigen, wenn cancel==false. --> </div> +</div> +</form> + + \ No newline at end of file diff --git a/themes/default/templates/image/prop.tpl.src.xml b/themes/default/templates/image/prop.tpl.src.xml @@ -0,0 +1,47 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <header views="size,compress,uncompress,extract"></header> + <form> + <part class="line"> + <part class="label"> + <label for="name"> + <text text="global_name"></text> + </label> + </part> + <part class="input"> + <input name="name" size="50" class="name"></input> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="filename"> + <text text="global_filename"></text> + </label> + </part> + <part class="input"> + <input name="filename" class="filename"></input> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="extension"> + <text text="file_extension"></text> + </label> + </part> + <part class="input"> + <input name="extension" size="10" class="extension"></input> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="description"> + <text text="global_description"></text> + </label> + </part> + <part class="input"> + <inputarea name="description" class="description"></inputarea> + </part> + </part> + + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/image/pub.tpl.out.php b/themes/default/templates/image/pub.tpl.out.php diff --git a/themes/default/templates/image/pub.tpl.src.xml b/themes/default/templates/image/pub.tpl.src.xml @@ -0,0 +1,25 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + + <!-- + Falls das Veroeffentlichen deaktiviert ist, eine Warnmeldung anzeigen. + --> + <if true="config:security/nopublish"> + <part class="message warn"> + <text key="GLOBAL_NOPUBLISH_DESC" class="help"></text> + </part> + </if> + + <form cancel="false" visible="true" label="message:publish" async="true"> + <row> + <column> + <newline></newline> + </column> + </row> + <row> + <column class="act"> + <button type="ok"></button> + </column> + </row> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/image/remove.tpl.out.php b/themes/default/templates/image/remove.tpl.out.php diff --git a/themes/default/templates/image/remove.tpl.src.xml b/themes/default/templates/image/remove.tpl.src.xml @@ -0,0 +1,3 @@ +<output xmlns="http://www.openrat.de/template" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><form><window icon="group" name="GLOBAL_GROUPS"><row><column><text text="GLOBAL_NAME"></text></column><column><text var="name"></text></column></row><row><column><text text="GLOBAL_DELETE"></text></column><column><checkbox name="delete"></checkbox></column></row><row><column colspan="2"><button type="ok"></button></column></row></window></form><focus field="delete"></focus></dummy></output>+ \ No newline at end of file diff --git a/themes/default/templates/image/show.tpl.out.php b/themes/default/templates/image/show.tpl.out.php diff --git a/themes/default/templates/image/show.tpl.src.xml b/themes/default/templates/image/show.tpl.src.xml @@ -0,0 +1,3 @@ +<output xmlns="http://www.openrat.de/template" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><window icon="folder"><row><column colspan="2"><insert url="var:preview_url"></insert><link class="action" action="file" subaction="edit"><image file="icon/edit"></image><text key="menu_file_edit"></text></link><link class="action" action="file" subaction="editvalue"><image file="icon/editvalue"></image><text key="menu_file_editvalue"></text></link></column></row></window></dummy></output>+ \ No newline at end of file diff --git a/themes/default/templates/image/size.tpl.out.php b/themes/default/templates/image/size.tpl.out.php diff --git a/themes/default/templates/image/size.tpl.src.xml b/themes/default/templates/image/size.tpl.src.xml @@ -0,0 +1,82 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <form> + <part class="line"> + <part class="label"> + <text text="IMAGE_OLD_SIZE"></text> + </part> + <part class="input"> + <text var="width"></text> + <text raw="_*_"></text> + <text var="height"></text> + </part> + </part> + <if not="" empty="formats"> + <group title="message:IMAGE_NEW_SIZE"> + <part class="line"> + <part class="label"></part> + + <part class="input"> + + <radio name="type" value="factor"></radio> + <label for="type_factor"> + <text text="FILE_IMAGE_SIZE_FACTOR"></text> + </label> + + + <selectbox name="factor" list="factors"></selectbox> + <set var="factor" value="1"></set> + </part> + </part> + <part class="line"> + <part class="label"></part> + <part class="input"> + <radio name="type" value="input"></radio> + <label for="type_input"> + <text text="FILE_IMAGE_NEW_WIDTH_HEIGHT"></text> + </label> + </part> + <part class="label"></part> + <part class="input"> + <input name="width" size="10"></input> + <text raw="_*_"></text> + <input name="height" size="10"></input> + </part> + </part> + </group> + <group title="message:options"> + <part class="line"> + <part class="label"> + <label for="format"> + <text text="FILE_IMAGE_FORMAT"></text> + </label> + </part> + <part class="input"> + <selectbox name="format" list="formats"></selectbox> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="jpeglist_compression"> + <text text="FILE_IMAGE_JPEG_COMPRESSION"></text> + </label> + </part> + <part class="input"> + <set var="jpeg_compression" value="70"></set> + <selectbox list="jpeglist" name="jpeg_compression"></selectbox> + </part> + </part> + <part class="line"> + <part class="label"> + </part> + <part class="input"> + <checkbox name="copy"></checkbox> + <label for="copy"> + <text key="copy"></text> + </label> + </part> + </part> + </group> + </if> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/image/structure.tpl.out.php b/themes/default/templates/image/structure.tpl.out.php @@ -0,0 +1,7 @@ + + + <div class="structure tree"> + <?php include_once( 'modules/template-engine/components/html/tree/component-tree.php') ?><?php component_tree($outline) ?> + + </div> + + \ No newline at end of file diff --git a/themes/default/templates/image/structure.tpl.src.xml b/themes/default/templates/image/structure.tpl.src.xml @@ -0,0 +1,7 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <part class="structure tree"> + <tree tree="var:outline"></tree> + </part> + +</output>+ \ No newline at end of file diff --git a/themes/default/templates/image/uncompress.tpl.out.php b/themes/default/templates/image/uncompress.tpl.out.php diff --git a/themes/default/templates/image/uncompress.tpl.src.xml b/themes/default/templates/image/uncompress.tpl.src.xml @@ -0,0 +1,22 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <form> + <group title="message:options"></group> + <part class="line"> + <part class="label"> + </part> + <part class="input"> + <set var="replace" value="1"></set> + <radio name="replace" value="1"></radio> + <label for="replace_1"> + <text key="replace"></text> + </label> + <newline></newline> + <radio name="replace" value="0"></radio> + <label for="replace_0"> + <text key="new"></text> + </label> + </part> + </part> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/image/value.tpl.out.php b/themes/default/templates/image/value.tpl.out.php @@ -0,0 +1,35 @@ + + + <form name="" target="_self" action="<?php echo OR_ACTION ?>" data-method="<?php echo OR_METHOD ?>" data-action="<?php echo OR_ACTION ?>" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="<?php echo OR_ACTION ?>" data-async="" data-autosave="" onSubmit="formSubmit( $(this) ); return false;"><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo OR_ACTION ?>" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo OR_METHOD ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + + <tr> + <td> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_VALUE')))); ?></span> + + </td> + <td> + <textarea name="value" data-mode="html" class="editor__code-editor"><?php echo ${'value'} ?></textarea> + + </td> + </tr> + <tr> + <td class="act" colspan="2"> + <div class="invisible"><input type="submit" name="ok" class="%class%" + title="Bestätigen" + value="&nbsp;&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp;&nbsp;&nbsp;" /> + </div> + </td> + </tr> + + +<div class="bottom"> + <div class="command "> + + <input type="button" class="submit ok" value="OK" onclick="$(this).closest('div.sheet').find('form').submit(); " /> + + <!-- Cancel-Button nicht anzeigen, wenn cancel==false. --> </div> +</div> +</form> + + + + \ No newline at end of file diff --git a/themes/default/templates/image/value.tpl.src.xml b/themes/default/templates/image/value.tpl.src.xml @@ -0,0 +1,22 @@ +<output xmlns="http://www.openrat.de/template" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <form> + <window> + <row> + <column> + <text text="GLOBAL_VALUE"></text> + </column> + <column> + <editor name="value" type="code"></editor> + </column> + </row> + <row> + <column class="act" colspan="2"> + <button type="ok"></button> + </column> + </row> + </window> + </form> + <focus field="value"></focus> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/text/compress.tpl.out.php b/themes/default/templates/text/compress.tpl.out.php diff --git a/themes/default/templates/text/compress.tpl.src.xml b/themes/default/templates/text/compress.tpl.src.xml @@ -0,0 +1,26 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <form> + <group title="message:OPTIONS"> + <part class="line"> + <part class="label"> + <text text="type"></text> + </part> + <part class="input"> + <set var="gz" value="gz"></set> + <selectbox list="formats" name="format" default="gz"></selectbox> + <set var="replace" value="1"></set> + <radio name="replace" value="1"></radio> + <label for="replace_1"> + <text key="replace"></text> + </label> + <newline></newline> + <radio name="replace" value="0"></radio> + <label for="replace_0"> + <text key="new"></text> + </label> + </part> + </part> + </group> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/text/edit.tpl.out.php b/themes/default/templates/text/edit.tpl.out.php @@ -0,0 +1,29 @@ + + + <form name="" target="_self" action="<?php echo OR_ACTION ?>" data-method="<?php echo OR_METHOD ?>" data-action="<?php echo OR_ACTION ?>" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="<?php echo OR_ACTION ?>" data-async="" data-autosave="" onSubmit="formSubmit( $(this) ); return false;"><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo OR_ACTION ?>" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo OR_METHOD ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <div class="headermenu"><div class="toolbar-icon clickable"><a href="javascript:void(0);" title="<?php echo lang('MENU_VALUE') ?>" data-type="dialog" data-name="<?php echo lang('MENU_VALUE') ?>" data-method="value"><img src="./themes/default/images/icon/action/value.svg" title="<?php echo lang('MENU_value_DESC') ?>" /><?php echo lang('MENU_value') ?></a></div></div> + + <div class="label"> + </div> + <div class="line"> + <div class="input"> + <br/> + + <input size="40" id="req15134694791873034748_file" type="file" name="file" class="upload" /> + + <br/> + + <br/> + + </div> + </div> + +<div class="bottom"> + <div class="command "> + + <input type="button" class="submit ok" value="OK" onclick="$(this).closest('div.sheet').find('form').submit(); " /> + + <!-- Cancel-Button nicht anzeigen, wenn cancel==false. --> </div> +</div> +</form> + + \ No newline at end of file diff --git a/themes/default/templates/text/edit.tpl.src.xml b/themes/default/templates/text/edit.tpl.src.xml @@ -0,0 +1,15 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <form> + <header views="value" /> + <part class="label" /> + <part class="line"> + <part class="input"> + <newline></newline> + <upload name="file"></upload> + <newline></newline> + <newline></newline> + </part> + </part> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/text/extract.tpl.out.php b/themes/default/templates/text/extract.tpl.out.php diff --git a/themes/default/templates/text/extract.tpl.src.xml b/themes/default/templates/text/extract.tpl.src.xml @@ -0,0 +1,3 @@ +<output xmlns="http://www.openrat.de/template" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><form><window name="asdf" title="asdfdfs"><row><column colspan="2" class="act"><button type="ok"></button></column></row></window></form></dummy></output>+ \ No newline at end of file diff --git a/themes/default/templates/text/info.tpl.out.php b/themes/default/templates/text/info.tpl.out.php @@ -0,0 +1,197 @@ + + + <form name="" target="_self" action="<?php echo OR_ACTION ?>" data-method="<?php echo OR_METHOD ?>" data-action="<?php echo OR_ACTION ?>" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="<?php echo OR_ACTION ?>" data-async="" data-autosave="" onSubmit="formSubmit( $(this) ); return false;"><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo OR_ACTION ?>" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo OR_METHOD ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><div> + <div class="line"> + <div class="label"> + <span class="text"><?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 class="text"><?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 class="text"><?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 class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('global_description')))); ?></span> + + </div> + <div class="input"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($description))); ?></span> + + </div> + </div> + </div></fieldset> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><legend><div class="arrow-right closed" /><div class="arrow-down open" /><?php echo lang('additional_info') ?></legend><div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_full_filename" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('global_full_filename')))); ?></span> + + </label> + </div> + <div class="input"> + <span class="text"><?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 class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('FILE_SIZE')))); ?></span> + + </label> + </div> + <div class="input"> + </div> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($size))); ?></span> + + </div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_mimetype" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('FILE_mimetype')))); ?></span> + + </label> + </div> + <div class="input"> + <span class="text"><?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 ?>" href="javascript:void(0);"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'menu_file_size'.'')))); ?></span> + + </a> + + </div> + </div> + <div class="line"> + <div class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(lang('id'))))); ?></span> + + </div> + <div class="input"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($objectid))); ?></span> + + </div> + </div> + <?php $if4=(!empty($cache_filename)); if($if4){?> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_cache_filename" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('CACHE_FILENAME')))); ?></span> + + </label> + </div> + <div class="input"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($cache_filename))); ?></span> + + <br/> + + <img class="" title="" src="./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 class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('FILE_PAGES')))); ?></span> + + </label> + </div> + <div class="input"> + <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="<?php echo OR_ACTION ?>" data-method="<?php echo OR_METHOD ?>" data-id="<?php echo OR_ID ?>" href="javascript:void(0);"> + <img class="" title="" src="./themes/default/images/icon_page.png" /> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> + + </a> + + </td> + </tr> + <?php } ?> + </table> + <?php $if6=(empty($pages)); if($if6){?> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NOT_FOUND')))); ?></span> + + <?php } ?> + </div> + </div> + </div></fieldset> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><legend><div class="arrow-right closed" /><div class="arrow-down open" /><?php echo lang('prop_userinfo') ?></legend><div> + <div class="line"> + <div class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('global_created')))); ?></span> + + </div> + <div class="input"> + <img class="" title="" src="./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 class="" title="" src="./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"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('global_lastchange')))); ?></span> + + </div> + <div class="input"> + <img class="" title="" src="./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 class="" title="" src="./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="bottom"> + <div class="command "> + + <input type="button" class="submit ok" value="OK" onclick="$(this).closest('div.sheet').find('form').submit(); " /> + + <!-- Cancel-Button nicht anzeigen, wenn cancel==false. --> </div> +</div> +</form> + + \ No newline at end of file diff --git a/themes/default/templates/text/info.tpl.src.xml b/themes/default/templates/text/info.tpl.src.xml @@ -0,0 +1,149 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../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 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"> + <text text="global_lastchange"></text> + </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/themes/default/templates/text/preview.tpl.out.php b/themes/default/templates/text/preview.tpl.out.php @@ -0,0 +1,16 @@ + + + <?php $if2=($image); if($if2){?> + <iframe src="<?php echo $preview_url ?>"></iframe> + + <?php } ?> + <?php if(!$if2){?> + <div class="clickable"> + <a class="action" target="_self" data-url="<?php echo $preview_url ?>" data-type="popup" data-action="<?php echo OR_ACTION ?>" data-method="<?php echo OR_METHOD ?>" data-id="<?php echo OR_ID ?>" href="javascript:void(0);"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'LINK_OPEN_IN_NEW_WINDOW'.'')))); ?></span> + + </a> + + </div> + <?php } ?> + + \ No newline at end of file diff --git a/themes/default/templates/text/preview.tpl.src.xml b/themes/default/templates/text/preview.tpl.src.xml @@ -0,0 +1,14 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + + <if true="var:image"> + <insert url="var:preview_url"></insert> + </if> + <else> + <part class="clickable"> + <link type="popup" url="var:preview_url" class="action"> + <text key="LINK_OPEN_IN_NEW_WINDOW" /> + </link> + </part> + </else> +</output> + \ No newline at end of file diff --git a/themes/default/templates/text/prop.tpl.out.php b/themes/default/templates/text/prop.tpl.out.php @@ -0,0 +1,63 @@ + + + <div class="headermenu"><div class="toolbar-icon clickable"><a href="javascript:void(0);" title="<?php echo lang('MENU_SIZE') ?>" data-type="dialog" data-name="<?php echo lang('MENU_SIZE') ?>" data-method="size"><img src="./themes/default/images/icon/action/size.svg" title="<?php echo lang('MENU_size_DESC') ?>" /><?php echo lang('MENU_size') ?></a></div><div class="toolbar-icon clickable"><a href="javascript:void(0);" title="<?php echo lang('MENU_COMPRESS') ?>" data-type="dialog" data-name="<?php echo lang('MENU_COMPRESS') ?>" data-method="compress"><img src="./themes/default/images/icon/action/compress.svg" title="<?php echo lang('MENU_compress_DESC') ?>" /><?php echo lang('MENU_compress') ?></a></div><div class="toolbar-icon clickable"><a href="javascript:void(0);" title="<?php echo lang('MENU_UNCOMPRESS') ?>" data-type="dialog" data-name="<?php echo lang('MENU_UNCOMPRESS') ?>" data-method="uncompress"><img src="./themes/default/images/icon/action/uncompress.svg" title="<?php echo lang('MENU_uncompress_DESC') ?>" /><?php echo lang('MENU_uncompress') ?></a></div><div class="toolbar-icon clickable"><a href="javascript:void(0);" title="<?php echo lang('MENU_EXTRACT') ?>" data-type="dialog" data-name="<?php echo lang('MENU_EXTRACT') ?>" data-method="extract"><img src="./themes/default/images/icon/action/extract.svg" title="<?php echo lang('MENU_extract_DESC') ?>" /><?php echo lang('MENU_extract') ?></a></div></div> + + <form name="" target="_self" action="<?php echo OR_ACTION ?>" data-method="<?php echo OR_METHOD ?>" data-action="<?php echo OR_ACTION ?>" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="<?php echo OR_ACTION ?>" data-async="" data-autosave="" onSubmit="formSubmit( $(this) ); return false;"><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo OR_ACTION ?>" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo OR_METHOD ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_name" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('global_name')))); ?></span> + + </label> + </div> + <div class="input"> + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="name" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> + + </div> + </div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_filename" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('global_filename')))); ?></span> + + </label> + </div> + <div class="input"> + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_filename" name="filename<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="filename" value="<?php echo Text::encodeHtml(@$filename) ?>" /><?php if ('') { ?><input type="hidden" name="filename" value="<?php $filename ?>"/><?php } ?></div> + + </div> + </div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_extension" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('file_extension')))); ?></span> + + </label> + </div> + <div class="input"> + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_extension" name="extension<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="extension" value="<?php echo Text::encodeHtml(@$extension) ?>" /><?php if ('') { ?><input type="hidden" name="extension" value="<?php $extension ?>"/><?php } ?></div> + + </div> + </div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_description" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('global_description')))); ?></span> + + </label> + </div> + <div class="input"> + <div class="inputholder"><textarea class="description" name="description"><?php echo Text::encodeHtml($description) ?></textarea></div> + + </div> + </div> + +<div class="bottom"> + <div class="command "> + + <input type="button" class="submit ok" value="OK" onclick="$(this).closest('div.sheet').find('form').submit(); " /> + + <!-- Cancel-Button nicht anzeigen, wenn cancel==false. --> </div> +</div> +</form> + + \ No newline at end of file diff --git a/themes/default/templates/text/prop.tpl.src.xml b/themes/default/templates/text/prop.tpl.src.xml @@ -0,0 +1,47 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <header views="size,compress,uncompress,extract"></header> + <form> + <part class="line"> + <part class="label"> + <label for="name"> + <text text="global_name"></text> + </label> + </part> + <part class="input"> + <input name="name" size="50" class="name"></input> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="filename"> + <text text="global_filename"></text> + </label> + </part> + <part class="input"> + <input name="filename" class="filename"></input> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="extension"> + <text text="file_extension"></text> + </label> + </part> + <part class="input"> + <input name="extension" size="10" class="extension"></input> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="description"> + <text text="global_description"></text> + </label> + </part> + <part class="input"> + <inputarea name="description" class="description"></inputarea> + </part> + </part> + + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/text/pub.tpl.out.php b/themes/default/templates/text/pub.tpl.out.php diff --git a/themes/default/templates/text/pub.tpl.src.xml b/themes/default/templates/text/pub.tpl.src.xml @@ -0,0 +1,25 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + + <!-- + Falls das Veroeffentlichen deaktiviert ist, eine Warnmeldung anzeigen. + --> + <if true="config:security/nopublish"> + <part class="message warn"> + <text key="GLOBAL_NOPUBLISH_DESC" class="help"></text> + </part> + </if> + + <form cancel="false" visible="true" label="message:publish" async="true"> + <row> + <column> + <newline></newline> + </column> + </row> + <row> + <column class="act"> + <button type="ok"></button> + </column> + </row> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/text/remove.tpl.out.php b/themes/default/templates/text/remove.tpl.out.php diff --git a/themes/default/templates/text/remove.tpl.src.xml b/themes/default/templates/text/remove.tpl.src.xml @@ -0,0 +1,3 @@ +<output xmlns="http://www.openrat.de/template" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><form><window icon="group" name="GLOBAL_GROUPS"><row><column><text text="GLOBAL_NAME"></text></column><column><text var="name"></text></column></row><row><column><text text="GLOBAL_DELETE"></text></column><column><checkbox name="delete"></checkbox></column></row><row><column colspan="2"><button type="ok"></button></column></row></window></form><focus field="delete"></focus></dummy></output>+ \ No newline at end of file diff --git a/themes/default/templates/text/show.tpl.out.php b/themes/default/templates/text/show.tpl.out.php diff --git a/themes/default/templates/text/show.tpl.src.xml b/themes/default/templates/text/show.tpl.src.xml @@ -0,0 +1,3 @@ +<output xmlns="http://www.openrat.de/template" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><window icon="folder"><row><column colspan="2"><insert url="var:preview_url"></insert><link class="action" action="file" subaction="edit"><image file="icon/edit"></image><text key="menu_file_edit"></text></link><link class="action" action="file" subaction="editvalue"><image file="icon/editvalue"></image><text key="menu_file_editvalue"></text></link></column></row></window></dummy></output>+ \ No newline at end of file diff --git a/themes/default/templates/text/size.tpl.out.php b/themes/default/templates/text/size.tpl.out.php diff --git a/themes/default/templates/text/size.tpl.src.xml b/themes/default/templates/text/size.tpl.src.xml @@ -0,0 +1,82 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <form> + <part class="line"> + <part class="label"> + <text text="IMAGE_OLD_SIZE"></text> + </part> + <part class="input"> + <text var="width"></text> + <text raw="_*_"></text> + <text var="height"></text> + </part> + </part> + <if not="" empty="formats"> + <group title="message:IMAGE_NEW_SIZE"> + <part class="line"> + <part class="label"></part> + + <part class="input"> + + <radio name="type" value="factor"></radio> + <label for="type_factor"> + <text text="FILE_IMAGE_SIZE_FACTOR"></text> + </label> + + + <selectbox name="factor" list="factors"></selectbox> + <set var="factor" value="1"></set> + </part> + </part> + <part class="line"> + <part class="label"></part> + <part class="input"> + <radio name="type" value="input"></radio> + <label for="type_input"> + <text text="FILE_IMAGE_NEW_WIDTH_HEIGHT"></text> + </label> + </part> + <part class="label"></part> + <part class="input"> + <input name="width" size="10"></input> + <text raw="_*_"></text> + <input name="height" size="10"></input> + </part> + </part> + </group> + <group title="message:options"> + <part class="line"> + <part class="label"> + <label for="format"> + <text text="FILE_IMAGE_FORMAT"></text> + </label> + </part> + <part class="input"> + <selectbox name="format" list="formats"></selectbox> + </part> + </part> + <part class="line"> + <part class="label"> + <label for="jpeglist_compression"> + <text text="FILE_IMAGE_JPEG_COMPRESSION"></text> + </label> + </part> + <part class="input"> + <set var="jpeg_compression" value="70"></set> + <selectbox list="jpeglist" name="jpeg_compression"></selectbox> + </part> + </part> + <part class="line"> + <part class="label"> + </part> + <part class="input"> + <checkbox name="copy"></checkbox> + <label for="copy"> + <text key="copy"></text> + </label> + </part> + </part> + </group> + </if> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/text/structure.tpl.out.php b/themes/default/templates/text/structure.tpl.out.php @@ -0,0 +1,7 @@ + + + <div class="structure tree"> + <?php include_once( 'modules/template-engine/components/html/tree/component-tree.php') ?><?php component_tree($outline) ?> + + </div> + + \ No newline at end of file diff --git a/themes/default/templates/text/structure.tpl.src.xml b/themes/default/templates/text/structure.tpl.src.xml @@ -0,0 +1,7 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <part class="structure tree"> + <tree tree="var:outline"></tree> + </part> + +</output>+ \ No newline at end of file diff --git a/themes/default/templates/text/uncompress.tpl.out.php b/themes/default/templates/text/uncompress.tpl.out.php diff --git a/themes/default/templates/text/uncompress.tpl.src.xml b/themes/default/templates/text/uncompress.tpl.src.xml @@ -0,0 +1,22 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <form> + <group title="message:options"></group> + <part class="line"> + <part class="label"> + </part> + <part class="input"> + <set var="replace" value="1"></set> + <radio name="replace" value="1"></radio> + <label for="replace_1"> + <text key="replace"></text> + </label> + <newline></newline> + <radio name="replace" value="0"></radio> + <label for="replace_0"> + <text key="new"></text> + </label> + </part> + </part> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/text/value.tpl.out.php b/themes/default/templates/text/value.tpl.out.php @@ -0,0 +1,35 @@ + + + <form name="" target="_self" action="<?php echo OR_ACTION ?>" data-method="<?php echo OR_METHOD ?>" data-action="<?php echo OR_ACTION ?>" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="<?php echo OR_ACTION ?>" data-async="" data-autosave="" onSubmit="formSubmit( $(this) ); return false;"><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo OR_ACTION ?>" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo OR_METHOD ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + + <tr> + <td> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_VALUE')))); ?></span> + + </td> + <td> + <textarea name="value" data-mode="html" class="editor__code-editor"><?php echo ${'value'} ?></textarea> + + </td> + </tr> + <tr> + <td class="act" colspan="2"> + <div class="invisible"><input type="submit" name="ok" class="%class%" + title="Bestätigen" + value="&nbsp;&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp;&nbsp;&nbsp;" /> + </div> + </td> + </tr> + + +<div class="bottom"> + <div class="command "> + + <input type="button" class="submit ok" value="OK" onclick="$(this).closest('div.sheet').find('form').submit(); " /> + + <!-- Cancel-Button nicht anzeigen, wenn cancel==false. --> </div> +</div> +</form> + + + + \ No newline at end of file diff --git a/themes/default/templates/text/value.tpl.src.xml b/themes/default/templates/text/value.tpl.src.xml @@ -0,0 +1,22 @@ +<output xmlns="http://www.openrat.de/template" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <form> + <window> + <row> + <column> + <text text="GLOBAL_VALUE"></text> + </column> + <column> + <editor name="value" type="code"></editor> + </column> + </row> + <row> + <column class="act" colspan="2"> + <button type="ok"></button> + </column> + </row> + </window> + </form> + <focus field="value"></focus> +</output>+ \ No newline at end of file