openrat-cms

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

commit b45b94bc937a4daab56d6cdbd8c367538bab3ff9
parent 0b2fc32dab13317c41144b6142211e764f175cf7
Author: Jan Dankert <develop@jandankert.de>
Date:   Wed, 11 Nov 2020 23:24:28 +0100

Fixing editing value of files,images,texts.

Diffstat:
Mmodules/cms/action/FileAction.class.php | 6+++---
Mmodules/cms/action/FolderAction.class.php | 53+++++++++++++++++++++++++++++------------------------
Mmodules/cms/action/ImageAction.class.php | 8+++-----
Mmodules/cms/action/TemplateAction.class.php | 46+++++++++++++++++++++++++++++++++++++++++++---
Mmodules/cms/action/TextAction.class.php | 14+++++++++++---
Mmodules/cms/ui/themes/default/html/views/file/edit.php | 47+++++------------------------------------------
Mmodules/cms/ui/themes/default/html/views/file/edit.tpl.src.xml | 7++++++-
Mmodules/cms/ui/themes/default/html/views/file/value.php | 11++++++++---
Mmodules/cms/ui/themes/default/html/views/file/value.tpl.src.xml | 11+++++++++--
Mmodules/cms/ui/themes/default/html/views/folder/createtext.php | 138+++++++++++++++++++++++++++++++++++++++----------------------------------------
Mmodules/cms/ui/themes/default/html/views/folder/createtext.tpl.src.xml | 86+++++++++++++++++++++++++++++++------------------------------------------------
Dmodules/cms/ui/themes/default/html/views/image/edit.php | 46----------------------------------------------
Dmodules/cms/ui/themes/default/html/views/image/edit.tpl.src.xml | 19-------------------
Mmodules/cms/ui/themes/default/html/views/image/preview.php | 13++++++++++---
Mmodules/cms/ui/themes/default/html/views/image/preview.tpl.src.xml | 15+++++++++++++--
Mmodules/cms/ui/themes/default/html/views/page/preview.php | 14++++++--------
Mmodules/cms/ui/themes/default/html/views/page/preview.tpl.src.xml | 4+---
Mmodules/cms/ui/themes/default/html/views/pageelement/info.php | 2+-
Mmodules/cms/ui/themes/default/html/views/pageelement/info.tpl.src.xml | 2+-
Mmodules/cms/ui/themes/default/html/views/template/info.php | 61+++++++++++++++++++++++++++++++++++++++++++------------------
Mmodules/cms/ui/themes/default/html/views/template/info.tpl.src.xml | 62++++++++++++++++++++++++++++++++++++--------------------------
Mmodules/cms/ui/themes/default/html/views/text/edit.php | 50+++++---------------------------------------------
Mmodules/cms/ui/themes/default/html/views/text/edit.tpl.src.xml | 24++++++------------------
Mmodules/cms/ui/themes/default/html/views/text/preview.php | 14+++++++++++---
Mmodules/cms/ui/themes/default/html/views/text/preview.tpl.src.xml | 15+++++++++++++--
Mmodules/cms/ui/themes/default/html/views/text/value.php | 21++++++++++++++-------
Mmodules/cms/ui/themes/default/html/views/text/value.tpl.src.xml | 24+++++++++++++++++++-----
Mmodules/cms/ui/themes/default/style/theme/openrat-theme.less | 3++-
Mmodules/util/Upload.class.php | 3---
29 files changed, 400 insertions(+), 419 deletions(-)

diff --git a/modules/cms/action/FileAction.class.php b/modules/cms/action/FileAction.class.php @@ -155,7 +155,7 @@ class FileAction extends ObjectAction */ function previewView() { - $url = Html::url($this->file->getType(),'show',$this->file->objectid,array('target'=>'none') ); + $url = Html::url($this->file->getType(),'show',$this->file->objectid ); $this->setTemplateVar('preview_url',$url ); } @@ -285,8 +285,8 @@ class FileAction extends ObjectAction function valueView() { // MIME-Types aus Datei lesen - $this->setTemplateVars( $this->file->getProperties() ); - $this->setTemplateVar('value',$this->file->loadValue()); + //$this->setTemplateVars( $this->file->getProperties() ); + //$this->setTemplateVar('value',$this->file->loadValue()); } diff --git a/modules/cms/action/FolderAction.class.php b/modules/cms/action/FolderAction.class.php @@ -58,7 +58,7 @@ class FolderAction extends ObjectAction public function init() { $folder = new Folder( $this->getRequestId() ); - $folder->languageid = $this->request->getLanguageId(); + $folder->languageid = $this->request->getLanguageId(); // FIXME $folder->load(); $this->lastModified( $folder->lastchangeDate); @@ -253,6 +253,8 @@ class FolderAction extends ObjectAction $description = $this->getRequestVar('description'); $text = new Text(); + $text->parentid = $this->folder->objectid; + $text->projectid = $this->folder->projectid; // Die neue Datei wird über eine URL geladen und dann im CMS gespeichert. if ( $this->hasRequestVar('url') ) @@ -265,45 +267,48 @@ class FolderAction extends ObjectAction if ( !$ok ) { - $this->addValidationError('url','COMMON_VALIDATION_ERROR',array(),$http->error); - $this->callSubAction('createfile'); - return; + //$this->addNotice($http->error); + // TODO: What to do with $http->error ? + throw new ValidationException('url',Messages::COMMON_VALIDATION_ERROR); } - $text->desc = $description; $text->filename = BaseObject::urlify( basename($url) ); - $text->name = !empty($name)?$name:basename($url); $text->size = strlen($http->body); $text->value = $http->body; - $text->parentid = $this->folder->objectid; - $text->projectid = $this->folder->projectid; } else { $upload = new Upload(); - try - { - $upload->processUpload(); - } - catch( \Exception $e ) - { - throw $e; - } + if ( $upload->isAvailable() ) { - $text->desc = $description; - $text->filename = BaseObject::urlify( $upload->filename ); - $text->name = !empty($name)?$name:$upload->filename; - $text->extension = $upload->extension; - $text->size = $upload->size; - $text->parentid = $this->folder->objectid; - $text->projectid = $this->folder->projectid; + try + { + $upload->processUpload(); + } + catch( \Exception $e ) + { + // TODO: make a UIException? + throw $e; + } - $text->value = $upload->value; + $text->filename = BaseObject::urlify( $upload->filename ); + $text->extension = $upload->extension; + $text->size = $upload->size; + + $text->value = $upload->value; + } + else { + $text->filename = $this->getRequestVar('filename'); + $text->extension = $this->getRequestVar('extension'); + $text->value = $this->getRequestVar('text'); + $text->size = strlen( $text->value ); + } } $text->add(); // Datei hinzufuegen $text->setNameForAllLanguages( $name,$description ); + $this->addNoticeFor($text, Messages::ADDED); $this->setTemplateVar('objectid',$text->objectid); diff --git a/modules/cms/action/ImageAction.class.php b/modules/cms/action/ImageAction.class.php @@ -210,15 +210,13 @@ class ImageAction extends FileAction /** - * Anzeigen des Inhaltes, der Inhalt wird samt Header direkt - * auf die Standardausgabe geschrieben */ public function previewView() { - parent::previewView(); - } - + $this->setTemplateVar('url', Html::url('image','show',$this->image->objectid ) ); + parent::previewView(); + } } diff --git a/modules/cms/action/TemplateAction.class.php b/modules/cms/action/TemplateAction.class.php @@ -193,14 +193,54 @@ class TemplateAction extends BaseAction { $page = new Page($pageid); $page->load(); - - $pages[$pageid] = $page->name; + + $pages[$pageid] = $page->filename; } $this->setTemplateVar('pages',$pages); - $this->setTemplateVar('id' ,$this->template->templateid); + $this->setTemplateVar('id' ,$this->template->getId() ); + $this->setTemplateVar('name' ,$this->template->getName() ); } + + /** + * Speichern der Dateiendung + */ + public function extensionPost() + { + $project = new Project( $this->template->projectid ); + $models = $project->getModels(); + + $extensions = array(); + foreach( $models as $modelId => $modelName ) { + + $input = $this->getRequestVar( $modelName ); + + // Validierung: Werte dürfen nicht doppelt vorkommen. + if ( in_array($input, $extensions) ) + { + $this->addNotice('template', 0, $this->template->name, 'DUPLICATE_INPUT', 'error'); + throw new \util\exception\ValidationException( $modelName ); + } + + $extensions[ $modelId ] = $input; + } + + foreach( $models as $modelId => $modelName ) { + + $templatemodel = new TemplateModel($this->template->templateid, $modelId); + $templatemodel->load(); + + $templatemodel->extension = $extensions[ $modelId ]; + + $templatemodel->save(); + } + + $this->addNotice('template', 0, $this->template->name, 'SAVED', 'ok'); + } + + + function addelView() { // Die verschiedenen Element-Typen diff --git a/modules/cms/action/TextAction.class.php b/modules/cms/action/TextAction.class.php @@ -6,6 +6,7 @@ namespace cms\action; use cms\model\BaseObject; use cms\model\Text; +use language\Messages; use util\Html; // OpenRat Content Management System @@ -34,6 +35,9 @@ class TextAction extends FileAction { public $security = Action::SECURITY_USER; + /** + * @var Text + */ private $text; /** @@ -66,10 +70,10 @@ class TextAction extends FileAction public function valuePost() { - $this->text->value = $this->getRequestVar('value', RequestParams::FILTER_RAW); + $this->text->value = $this->getRequestVar('text', RequestParams::FILTER_RAW); $this->text->saveValue(); - $this->addNotice($this->text->getType(), 0, $this->text->name, 'VALUE_SAVED', 'ok'); + $this->addNoticeFor($this->text,Messages::VALUE_SAVED); $this->text->setTimestamp(); } @@ -79,6 +83,8 @@ class TextAction extends FileAction */ public function valueView() { + $this->setTemplateVar( 'text', $this->text->loadValue() ); + parent::valueView(); } @@ -92,10 +98,12 @@ class TextAction extends FileAction } /** - * Only needed because there is a special template for text nodes. + * Displaying the text content. */ public function previewView() { + $this->setTemplateVar( 'text', $this->text->loadValue() ); + parent::previewView(); } } diff --git a/modules/cms/ui/themes/default/html/views/file/edit.php b/modules/cms/ui/themes/default/html/views/file/edit.php @@ -1,42 +1,5 @@ <?php /* THIS FILE IS GENERATED from edit.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> - <form name="<?php echo O::escapeHtml('') ?>" target="<?php echo O::escapeHtml('_self') ?>" data-target="<?php echo O::escapeHtml('view') ?>" action="<?php echo O::escapeHtml('./') ?>" data-method="<?php echo O::escapeHtml('edit') ?>" data-action="<?php echo O::escapeHtml('file') ?>" data-id="<?php echo O::escapeHtml(''.@$_id.'') ?>" method="<?php echo O::escapeHtml('POST') ?>" enctype="<?php echo O::escapeHtml('application/x-www-form-urlencoded') ?>" data-async="<?php echo O::escapeHtml('') ?>" data-autosave="<?php echo O::escapeHtml('') ?>" class="<?php echo O::escapeHtml('or-form or-file') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-form-headline') ?>"><?php echo O::escapeHtml('') ?> - </div> - <div class="<?php echo O::escapeHtml('or-form-content') ?>"><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('languageid') ?>" value="<?php echo O::escapeHtml(''.@$languageid.'') ?>" /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('token') ?>" value="<?php echo O::escapeHtml(''.@$_token.'') ?>" /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('action') ?>" value="<?php echo O::escapeHtml('file') ?>" /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('subaction') ?>" value="<?php echo O::escapeHtml('edit') ?>" /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('id') ?>" value="<?php echo O::escapeHtml(''.@$_id.'') ?>" /><?php echo O::escapeHtml('') ?> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml('') ?> - </h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <br /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('file') ?>" name="<?php echo O::escapeHtml('file') ?>" size="<?php echo O::escapeHtml('40') ?>" class="<?php echo O::escapeHtml('or-upload') ?>" /><?php echo O::escapeHtml('') ?> - <br /><?php echo O::escapeHtml('') ?> - <br /><?php echo O::escapeHtml('') ?> - </div> - </section> - <div class="<?php echo O::escapeHtml('or-line dropzone-upload') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-label') ?>"><?php echo O::escapeHtml('') ?> - </div> - <div class="<?php echo O::escapeHtml('or-value') ?>"><?php echo O::escapeHtml('') ?> - </div> - </div> - </div> - <div class="<?php echo O::escapeHtml('or-form-actionbar') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-btn or-btn--secondary or-act-form-cancel') ?>"><?php echo O::escapeHtml('') ?> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--form-cancel') ?>"><?php echo O::escapeHtml('') ?> - </i> - <span class="<?php echo O::escapeHtml('or-form-btn-label') ?>"><?php echo O::escapeHtml(''.@O::lang('CANCEL').'') ?> - </span> - </div> - <div class="<?php echo O::escapeHtml('or-btn or-btn--primary or-act-form-save') ?>"><?php echo O::escapeHtml('') ?> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--form-ok') ?>"><?php echo O::escapeHtml('') ?> - </i> - <span class="<?php echo O::escapeHtml('or-form-btn-label') ?>"><?php echo O::escapeHtml(''.@O::lang('button_ok').'') ?> - </span> - </div> - </div> - </form>- \ No newline at end of file + <a target="<?php echo O::escapeHtml('_self') ?>" data-type="<?php echo O::escapeHtml('dialog') ?>" data-action="<?php echo O::escapeHtml('') ?>" data-method="<?php echo O::escapeHtml('value') ?>" data-id="<?php echo O::escapeHtml('') ?>" data-extra-dialogAction="<?php echo O::escapeHtml('') ?>" data-extra-dialogMethod="<?php echo O::escapeHtml('value') ?>" data-extra="<?php echo O::escapeHtml('{\'dialogAction\':null,\'dialogMethod\':\'value\'}') ?>" href="<?php echo O::escapeHtml('') ?>" class="<?php echo O::escapeHtml('or-link or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> + <span><?php echo O::escapeHtml(''.@O::lang('edit').'') ?> + </span> + </a>+ \ No newline at end of file diff --git a/modules/cms/ui/themes/default/html/views/file/edit.tpl.src.xml b/modules/cms/ui/themes/default/html/views/file/edit.tpl.src.xml @@ -1,5 +1,10 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../../../../../../../template_engine/components/template.xsd"> + + <link clickable="true" subaction="value" type="dialog"> + <text value="${message:edit}"/> + </link> + <!-- <form languageid="${languageid}"> <fieldset class="line" label=""> <newline/> @@ -14,5 +19,5 @@ <part class="value"> </part> </part> - </form> + </form>--> </output> diff --git a/modules/cms/ui/themes/default/html/views/file/value.php b/modules/cms/ui/themes/default/html/views/file/value.php @@ -8,13 +8,18 @@ <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('subaction') ?>" value="<?php echo O::escapeHtml('value') ?>" /><?php echo O::escapeHtml('') ?> <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('id') ?>" value="<?php echo O::escapeHtml(''.@$_id.'') ?>" /><?php echo O::escapeHtml('') ?> <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml(''.@O::lang('VALUE').'') ?> + <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml('') ?> </h3> <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <textarea name="<?php echo O::escapeHtml('value') ?>" data-extension="<?php echo O::escapeHtml('') ?>" data-mimetype="<?php echo O::escapeHtml('') ?>" data-mode="<?php echo O::escapeHtml('htmlmixed') ?>" class="<?php echo O::escapeHtml('or-input or-editor or-code-editor') ?>"><?php echo O::escapeHtml(''.@$value.'') ?> - </textarea> + <input type="<?php echo O::escapeHtml('file') ?>" name="<?php echo O::escapeHtml('file') ?>" size="<?php echo O::escapeHtml('40') ?>" class="<?php echo O::escapeHtml('or-upload') ?>" /><?php echo O::escapeHtml('') ?> </div> </section> + <div class="<?php echo O::escapeHtml('or-dropzone-upload') ?>"><?php echo O::escapeHtml('') ?> + <br /><?php echo O::escapeHtml('') ?> + <br /><?php echo O::escapeHtml('') ?> + <br /><?php echo O::escapeHtml('') ?> + <br /><?php echo O::escapeHtml('') ?> + </div> </div> <div class="<?php echo O::escapeHtml('or-form-actionbar') ?>"><?php echo O::escapeHtml('') ?> <div class="<?php echo O::escapeHtml('or-btn or-btn--secondary or-act-form-cancel') ?>"><?php echo O::escapeHtml('') ?> diff --git a/modules/cms/ui/themes/default/html/views/file/value.tpl.src.xml b/modules/cms/ui/themes/default/html/views/file/value.tpl.src.xml @@ -1,8 +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_engine/components/template.xsd"> <form> - <fieldset label="${message:VALUE}"> - <editor name="value" type="code"/> + <fieldset > + <upload name="file"/> </fieldset> + + <part class="dropzone-upload"> + <newline /> + <newline /> + <newline /> + <newline /> + </part> </form> </output> diff --git a/modules/cms/ui/themes/default/html/views/folder/createtext.php b/modules/cms/ui/themes/default/html/views/folder/createtext.php @@ -7,52 +7,34 @@ <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('action') ?>" value="<?php echo O::escapeHtml('folder') ?>" /><?php echo O::escapeHtml('') ?> <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('subaction') ?>" value="<?php echo O::escapeHtml('createtext') ?>" /><?php echo O::escapeHtml('') ?> <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('id') ?>" value="<?php echo O::escapeHtml(''.@$_id.'') ?>" /><?php echo O::escapeHtml('') ?> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml('') ?> - </h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-label') ?>"><?php echo O::escapeHtml('') ?> - <label class="<?php echo O::escapeHtml('or-label') ?>"><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@O::lang('FILE').'') ?> + <section class="<?php echo O::escapeHtml('or-group or-collapsible or-collapsible--is-open or-collapsible--show') ?>"><?php echo O::escapeHtml('') ?> + <h2 class="<?php echo O::escapeHtml('or-collapsible-title or-group-title or-collapsible-act-switch') ?>"><?php echo O::escapeHtml('') ?> + <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--node-closed or-collapsible--on-closed') ?>"><?php echo O::escapeHtml('') ?> + </i> + <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--node-open or-collapsible--on-open') ?>"><?php echo O::escapeHtml('') ?> + </i> + <span><?php echo O::escapeHtml(''.@O::lang('upload').'') ?> + </span> + </h2> + <div class="<?php echo O::escapeHtml('or-collapsible-value or-group-value') ?>"><?php echo O::escapeHtml('') ?> + <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> + <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml(''.@O::lang('FILE').'') ?> + </h3> + <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> + <input type="<?php echo O::escapeHtml('file') ?>" multiple="<?php echo O::escapeHtml('multiple') ?>" name="<?php echo O::escapeHtml('file') ?>" size="<?php echo O::escapeHtml('40') ?>" maxlength="<?php echo O::escapeHtml(''.@$maxlength.'') ?>" class="<?php echo O::escapeHtml('or-upload') ?>" /><?php echo O::escapeHtml('') ?> + <div class="<?php echo O::escapeHtml('or-dropzone-upload') ?>"><?php echo O::escapeHtml('') ?> + </div> + <span><?php echo O::escapeHtml(''.@O::lang('file_max_size').' '.@$max_size.'') ?> </span> - </label> - </div> - <div class="<?php echo O::escapeHtml('or-value') ?>"><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('file') ?>" multiple="<?php echo O::escapeHtml('multiple') ?>" name="<?php echo O::escapeHtml('file') ?>" size="<?php echo O::escapeHtml('40') ?>" maxlength="<?php echo O::escapeHtml(''.@$maxlength.'') ?>" class="<?php echo O::escapeHtml('or-upload') ?>" /><?php echo O::escapeHtml('') ?> - </div> - </div> - </section> - <div class="<?php echo O::escapeHtml('or-line dropzone-upload') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-label') ?>"><?php echo O::escapeHtml('') ?> - </div> - <div class="<?php echo O::escapeHtml('or-value') ?>"><?php echo O::escapeHtml('') ?> - </div> - </div> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml('') ?> - </h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-label') ?>"><?php echo O::escapeHtml('') ?> - <span class="<?php echo O::escapeHtml('or-help') ?>"><?php echo O::escapeHtml(''.@O::lang('file_max_size').'') ?> - </span> - </div> - <div class="<?php echo O::escapeHtml('or-value') ?>"><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@$max_size.'') ?> - </span> - </div> - </div> - </section> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml('') ?> - </h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-label') ?>"><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@O::lang('HTTP_URL').'') ?> - </span> - </div> - <div class="<?php echo O::escapeHtml('or-value') ?>"><?php echo O::escapeHtml('') ?> - <input name="<?php echo O::escapeHtml('url') ?>" type="<?php echo O::escapeHtml('text') ?>" maxlength="<?php echo O::escapeHtml('256') ?>" value="<?php echo O::escapeHtml(''.@$url.'') ?>" class="<?php echo O::escapeHtml('or-input') ?>" /><?php echo O::escapeHtml('') ?> - </div> + </div> + </section> + <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> + <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml(''.@O::lang('HTTP_URL').'') ?> + </h3> + <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> + <input name="<?php echo O::escapeHtml('url') ?>" type="<?php echo O::escapeHtml('text') ?>" maxlength="<?php echo O::escapeHtml('256') ?>" value="<?php echo O::escapeHtml(''.@$url.'') ?>" class="<?php echo O::escapeHtml('or-input') ?>" /><?php echo O::escapeHtml('') ?> + </div> + </section> </div> </section> <section class="<?php echo O::escapeHtml('or-group or-collapsible or-collapsible--is-open or-collapsible--show') ?>"><?php echo O::escapeHtml('') ?> @@ -65,33 +47,49 @@ </span> </h2> <div class="<?php echo O::escapeHtml('or-collapsible-value or-group-value') ?>"><?php echo O::escapeHtml('') ?> + <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> + <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml(''.@O::lang('FILENAME').'') ?> + </h3> + <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> + <input name="<?php echo O::escapeHtml('filename') ?>" type="<?php echo O::escapeHtml('text') ?>" maxlength="<?php echo O::escapeHtml('256') ?>" value="<?php echo O::escapeHtml(''.@$filename.'') ?>" class="<?php echo O::escapeHtml('or-input') ?>" /><?php echo O::escapeHtml('') ?> + </div> + </section> + <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> + <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml(''.@O::lang('FILE_EXTENSION').'') ?> + </h3> + <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> + <input name="<?php echo O::escapeHtml('extension') ?>" type="<?php echo O::escapeHtml('text') ?>" maxlength="<?php echo O::escapeHtml('256') ?>" value="<?php echo O::escapeHtml(''.@$extension.'') ?>" class="<?php echo O::escapeHtml('or-input') ?>" /><?php echo O::escapeHtml('') ?> + </div> + </section> + <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> + <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml(''.@O::lang('NAME').'') ?> + </h3> + <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> + <input name="<?php echo O::escapeHtml('name') ?>" type="<?php echo O::escapeHtml('text') ?>" maxlength="<?php echo O::escapeHtml('256') ?>" value="<?php echo O::escapeHtml(''.@$name.'') ?>" class="<?php echo O::escapeHtml('or-input') ?>" /><?php echo O::escapeHtml('') ?> + </div> + </section> + <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> + <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml(''.@O::lang('DESCRIPTION').'') ?> + </h3> + <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> + <textarea name="<?php echo O::escapeHtml('description') ?>" class="<?php echo O::escapeHtml('or-input or-inputarea') ?>"><?php echo O::escapeHtml('') ?> + </textarea> + </div> + </section> </div> </section> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml('') ?> - </h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-label') ?>"><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@O::lang('NAME').'') ?> - </span> - </div> - <div class="<?php echo O::escapeHtml('or-value') ?>"><?php echo O::escapeHtml('') ?> - <input name="<?php echo O::escapeHtml('name') ?>" type="<?php echo O::escapeHtml('text') ?>" maxlength="<?php echo O::escapeHtml('256') ?>" value="<?php echo O::escapeHtml(''.@$name.'') ?>" class="<?php echo O::escapeHtml('or-input') ?>" /><?php echo O::escapeHtml('') ?> - </div> - </div> - </section> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml('') ?> - </h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-label') ?>"><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@O::lang('DESCRIPTION').'') ?> - </span> - </div> - <div class="<?php echo O::escapeHtml('or-value') ?>"><?php echo O::escapeHtml('') ?> - <textarea name="<?php echo O::escapeHtml('description') ?>" class="<?php echo O::escapeHtml('or-input or-inputarea') ?>"><?php echo O::escapeHtml('') ?> - </textarea> - </div> + <section class="<?php echo O::escapeHtml('or-group or-collapsible or-collapsible--is-open or-collapsible--show') ?>"><?php echo O::escapeHtml('') ?> + <h2 class="<?php echo O::escapeHtml('or-collapsible-title or-group-title or-collapsible-act-switch') ?>"><?php echo O::escapeHtml('') ?> + <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--node-closed or-collapsible--on-closed') ?>"><?php echo O::escapeHtml('') ?> + </i> + <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--node-open or-collapsible--on-open') ?>"><?php echo O::escapeHtml('') ?> + </i> + <span><?php echo O::escapeHtml(''.@O::lang('content').'') ?> + </span> + </h2> + <div class="<?php echo O::escapeHtml('or-collapsible-value or-group-value') ?>"><?php echo O::escapeHtml('') ?> + <textarea name="<?php echo O::escapeHtml('text') ?>" class="<?php echo O::escapeHtml('or-input or-inputarea') ?>"><?php echo O::escapeHtml(''.@$text.'') ?> + </textarea> </div> </section> </div> diff --git a/modules/cms/ui/themes/default/html/views/folder/createtext.tpl.src.xml b/modules/cms/ui/themes/default/html/views/folder/createtext.tpl.src.xml @@ -1,53 +1,35 @@ -<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../../../../../../../template_engine/components/template.xsd"> - <form> - <fieldset class="line" label=""> - <part class="label"> - <label for="name"> - <text value="${message:FILE}"/> - </label> - </part> - <part class="value"> - <upload name="file" maxlength="${maxlength}" multiple="true"/> - </part> - </fieldset> - <part class="line dropzone-upload"> - <part class="label"> - </part> - <part class="value"> - </part> - </part> - <fieldset class="line" label=""> - <part class="label"> - <text class="help" value="${message:file_max_size}"/> - </part> - <part class="value"> - <text value="${max_size}"/> - </part> - </fieldset> - <fieldset class="line" label=""> - <part class="label"> - <text value="${message:HTTP_URL}"/> - </part> - <part class="value"> - <input name="url" size="50"/> - </part> - </fieldset> - <group title="${message:description}"/> - <fieldset class="line" label=""> - <part class="label"> - <text value="${message:NAME}"/> - </part> - <part class="value"> - <input name="name" size="50"/> - </part> - </fieldset> - <fieldset class="line" label=""> - <part class="label"> - <text value="${message:DESCRIPTION}"/> - </part> - <part class="value"> - <inputarea rows="5" cols="50" name="description" default=""/> - </part> - </fieldset> - </form> +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../../../../../../../template_engine/components/template.xsd"> + <form> + <group title="${message:upload}"> + <fieldset label="${message:FILE}"> + <upload name="file" maxlength="${maxlength}" multiple="true" /> + <part class="dropzone-upload"/> + <text value="${message:file_max_size} ${max_size}"/> + </fieldset> + + <fieldset label="${message:HTTP_URL}"> + <input name="url" size="50"/> + </fieldset> + </group> + + <group title="${message:description}"> + <fieldset label="${message:FILENAME}"> + <input name="filename" size="50"/> + </fieldset> + <fieldset label="${message:FILE_EXTENSION}"> + <input name="extension" size="50"/> + </fieldset> + <fieldset label="${message:NAME}"> + <input name="name" size="50"/> + </fieldset> + <fieldset label="${message:DESCRIPTION}"> + <inputarea rows="5" cols="50" name="description" default=""/> + </fieldset> + </group> + + <group title="${message:content}"> + <inputarea name="text"/> + </group> + </form> </output> diff --git a/modules/cms/ui/themes/default/html/views/image/edit.php b/modules/cms/ui/themes/default/html/views/image/edit.php @@ -1,45 +0,0 @@ -<?php /* THIS FILE IS GENERATED from edit.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> - <form name="<?php echo O::escapeHtml('') ?>" target="<?php echo O::escapeHtml('_self') ?>" data-target="<?php echo O::escapeHtml('view') ?>" action="<?php echo O::escapeHtml('./') ?>" data-method="<?php echo O::escapeHtml('edit') ?>" data-action="<?php echo O::escapeHtml('image') ?>" data-id="<?php echo O::escapeHtml(''.@$_id.'') ?>" method="<?php echo O::escapeHtml('POST') ?>" enctype="<?php echo O::escapeHtml('application/x-www-form-urlencoded') ?>" data-async="<?php echo O::escapeHtml('') ?>" data-autosave="<?php echo O::escapeHtml('') ?>" class="<?php echo O::escapeHtml('or-form or-image') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-form-headline') ?>"><?php echo O::escapeHtml('') ?> - </div> - <div class="<?php echo O::escapeHtml('or-form-content') ?>"><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('token') ?>" value="<?php echo O::escapeHtml(''.@$_token.'') ?>" /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('action') ?>" value="<?php echo O::escapeHtml('image') ?>" /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('subaction') ?>" value="<?php echo O::escapeHtml('edit') ?>" /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('id') ?>" value="<?php echo O::escapeHtml(''.@$_id.'') ?>" /><?php echo O::escapeHtml('') ?> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml('') ?> - </h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-label') ?>"><?php echo O::escapeHtml('') ?> - </div> - <div class="<?php echo O::escapeHtml('or-value') ?>"><?php echo O::escapeHtml('') ?> - <br /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('file') ?>" name="<?php echo O::escapeHtml('file') ?>" size="<?php echo O::escapeHtml('40') ?>" class="<?php echo O::escapeHtml('or-upload') ?>" /><?php echo O::escapeHtml('') ?> - <br /><?php echo O::escapeHtml('') ?> - <br /><?php echo O::escapeHtml('') ?> - </div> - </div> - </section> - <div class="<?php echo O::escapeHtml('or-line dropzone-upload') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-label') ?>"><?php echo O::escapeHtml('') ?> - </div> - <div class="<?php echo O::escapeHtml('or-value') ?>"><?php echo O::escapeHtml('') ?> - </div> - </div> - </div> - <div class="<?php echo O::escapeHtml('or-form-actionbar') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-btn or-btn--secondary or-act-form-cancel') ?>"><?php echo O::escapeHtml('') ?> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--form-cancel') ?>"><?php echo O::escapeHtml('') ?> - </i> - <span class="<?php echo O::escapeHtml('or-form-btn-label') ?>"><?php echo O::escapeHtml(''.@O::lang('CANCEL').'') ?> - </span> - </div> - <div class="<?php echo O::escapeHtml('or-btn or-btn--primary or-act-form-save') ?>"><?php echo O::escapeHtml('') ?> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--form-ok') ?>"><?php echo O::escapeHtml('') ?> - </i> - <span class="<?php echo O::escapeHtml('or-form-btn-label') ?>"><?php echo O::escapeHtml(''.@O::lang('button_ok').'') ?> - </span> - </div> - </div> - </form>- \ No newline at end of file diff --git a/modules/cms/ui/themes/default/html/views/image/edit.tpl.src.xml b/modules/cms/ui/themes/default/html/views/image/edit.tpl.src.xml @@ -1,19 +0,0 @@ -<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../../../../../../../template_engine/components/template.xsd"> - <form> - <fieldset class="line" label=""> - <part class="label"/> - <part class="value"> - <newline/> - <upload name="file"/> - <newline/> - <newline/> - </part> - </fieldset> - <part class="line dropzone-upload"> - <part class="label"> - </part> - <part class="value"> - </part> - </part> - </form> -</output> diff --git a/modules/cms/ui/themes/default/html/views/image/preview.php b/modules/cms/ui/themes/default/html/views/image/preview.php @@ -1,3 +1,10 @@ <?php /* THIS FILE IS GENERATED from preview.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> - <iframe src="<?php echo O::escapeHtml(''.@$preview_url.'') ?>"><?php echo O::escapeHtml('') ?> - </iframe>- \ No newline at end of file + <img src="<?php echo O::escapeHtml(''.@$url.'') ?>" /><?php echo O::escapeHtml('') ?> + <br /><?php echo O::escapeHtml('') ?> + <br /><?php echo O::escapeHtml('') ?> + <a target="<?php echo O::escapeHtml('_self') ?>" data-url="<?php echo O::escapeHtml(''.@$preview_url.'') ?>" data-type="<?php echo O::escapeHtml('popup') ?>" data-action="<?php echo O::escapeHtml('') ?>" data-method="<?php echo O::escapeHtml('') ?>" data-id="<?php echo O::escapeHtml('') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" href="<?php echo O::escapeHtml('') ?>" class="<?php echo O::escapeHtml('or-link or-action or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> + <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--menu-open_in_new') ?>"><?php echo O::escapeHtml('') ?> + </i> + <span><?php echo O::escapeHtml(''.@O::lang('link_open_in_new_window').'') ?> + </span> + </a>+ \ No newline at end of file diff --git a/modules/cms/ui/themes/default/html/views/image/preview.tpl.src.xml b/modules/cms/ui/themes/default/html/views/image/preview.tpl.src.xml @@ -1,3 +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_engine/components/template.xsd"> - <insert url="${preview_url}"/> +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../../../../../../../template_engine/components/template.xsd"> + + <image url="${url}"/> + + <newline /> + <newline /> + + <link clickable="true" type="popup" class="action" url="${preview_url}"> + <image menu="open_in_new"/> + <text value="${message:link_open_in_new_window}"/> + </link> + </output> diff --git a/modules/cms/ui/themes/default/html/views/page/preview.php b/modules/cms/ui/themes/default/html/views/page/preview.php @@ -39,14 +39,12 @@ </span> </h2> <div class="<?php echo O::escapeHtml('or-collapsible-value or-group-value') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-toolbar-icon or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> - <a target="<?php echo O::escapeHtml('_self') ?>" data-url="<?php echo O::escapeHtml(''.@$preview_url.'') ?>" data-type="<?php echo O::escapeHtml('popup') ?>" data-action="<?php echo O::escapeHtml('') ?>" data-method="<?php echo O::escapeHtml('') ?>" data-id="<?php echo O::escapeHtml('') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" href="<?php echo O::escapeHtml('') ?>" class="<?php echo O::escapeHtml('or-link or-action') ?>"><?php echo O::escapeHtml('') ?> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--menu-open_in_new') ?>"><?php echo O::escapeHtml('') ?> - </i> - <span><?php echo O::escapeHtml(''.@O::lang('link_open_in_new_window').'') ?> - </span> - </a> - </div> + <a target="<?php echo O::escapeHtml('_self') ?>" data-url="<?php echo O::escapeHtml(''.@$preview_url.'') ?>" data-type="<?php echo O::escapeHtml('popup') ?>" data-action="<?php echo O::escapeHtml('') ?>" data-method="<?php echo O::escapeHtml('') ?>" data-id="<?php echo O::escapeHtml('') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" href="<?php echo O::escapeHtml('') ?>" class="<?php echo O::escapeHtml('or-link or-action or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> + <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--menu-open_in_new') ?>"><?php echo O::escapeHtml('') ?> + </i> + <span><?php echo O::escapeHtml(''.@O::lang('link_open_in_new_window').'') ?> + </span> + </a> <iframe name="<?php echo O::escapeHtml('preview') ?>" src="<?php echo O::escapeHtml(''.@$preview_url.'') ?>"><?php echo O::escapeHtml('') ?> </iframe> </div> diff --git a/modules/cms/ui/themes/default/html/views/page/preview.tpl.src.xml b/modules/cms/ui/themes/default/html/views/page/preview.tpl.src.xml @@ -10,12 +10,10 @@ </form> <group title="${message:PREVIEW}"> - <part class="toolbar-icon,act-clickable"> - <link type="popup" class="action" url="${preview_url}"> + <link clickable="true" type="popup" class="action" url="${preview_url}"> <image menu="open_in_new"/> <text value="${message:link_open_in_new_window}"/> </link> - </part> <insert url="${preview_url}" name="preview"/> </group> diff --git a/modules/cms/ui/themes/default/html/views/pageelement/info.php b/modules/cms/ui/themes/default/html/views/pageelement/info.php @@ -57,7 +57,7 @@ </span> </td> <td class="<?php echo O::escapeHtml('or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> - <a target="<?php echo O::escapeHtml('_self') ?>" date-name="<?php echo O::escapeHtml(''.@$element_name.'') ?>" name="<?php echo O::escapeHtml(''.@$element_name.'') ?>" data-action="<?php echo O::escapeHtml('element') ?>" data-method="<?php echo O::escapeHtml('') ?>" data-id="<?php echo O::escapeHtml(''.@$element_id.'') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" href="<?php echo O::escapeHtml('#/element/'.@$element_id.'') ?>" class="<?php echo O::escapeHtml('or-link') ?>"><?php echo O::escapeHtml('') ?> + <a target="<?php echo O::escapeHtml('_self') ?>" date-name="<?php echo O::escapeHtml(''.@$element_name.'') ?>" name="<?php echo O::escapeHtml(''.@$element_name.'') ?>" data-type="<?php echo O::escapeHtml('open') ?>" data-action="<?php echo O::escapeHtml('element') ?>" data-method="<?php echo O::escapeHtml('') ?>" data-id="<?php echo O::escapeHtml(''.@$element_id.'') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" href="<?php echo O::escapeHtml('#/element/'.@$element_id.'') ?>" class="<?php echo O::escapeHtml('or-link') ?>"><?php echo O::escapeHtml('') ?> <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--action-el_'.@$element_type.'') ?>"><?php echo O::escapeHtml('') ?> </i> <span><?php echo O::escapeHtml(''.@$element_name.'') ?> diff --git a/modules/cms/ui/themes/default/html/views/pageelement/info.tpl.src.xml b/modules/cms/ui/themes/default/html/views/pageelement/info.tpl.src.xml @@ -41,7 +41,7 @@ <text value="${message:element}"/> </column> <column class="act-clickable"> - <link id="${element_id}" name="${element_name}" action="element"> + <link id="${element_id}" name="${element_name}" action="element" type="open"> <image elementtype="${element_type}"/> <text value="${element_name}"/> </link> diff --git a/modules/cms/ui/themes/default/html/views/template/info.php b/modules/cms/ui/themes/default/html/views/template/info.php @@ -2,7 +2,7 @@ <div class="<?php echo O::escapeHtml('or-table-wrapper') ?>"><?php echo O::escapeHtml('') ?> <div class="<?php echo O::escapeHtml('or-table-area') ?>"><?php echo O::escapeHtml('') ?> <table width="<?php echo O::escapeHtml('100%') ?>" class="<?php echo O::escapeHtml('or-table') ?>"><?php echo O::escapeHtml('') ?> - <tr class="<?php echo O::escapeHtml('or-data') ?>"><?php echo O::escapeHtml('') ?> + <tr class="<?php echo O::escapeHtml('or-table-data') ?>"><?php echo O::escapeHtml('') ?> <td colspan="<?php echo O::escapeHtml('1') ?>"><?php echo O::escapeHtml('') ?> <span><?php echo O::escapeHtml(''.@O::lang('id').'') ?> </span> @@ -12,24 +12,49 @@ </span> </td> </tr> - <tr class="<?php echo O::escapeHtml('or-headline') ?>"><?php echo O::escapeHtml('') ?> - <td colspan="<?php echo O::escapeHtml('2') ?>"><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@O::lang('pages').'') ?> + <tr class="<?php echo O::escapeHtml('or-data') ?>"><?php echo O::escapeHtml('') ?> + <td><?php echo O::escapeHtml('') ?> + <span><?php echo O::escapeHtml(''.@O::lang('name').'') ?> + </span> + </td> + <td><?php echo O::escapeHtml('') ?> + <span><?php echo O::escapeHtml(''.@$name.'') ?> </span> </td> </tr> - <?php foreach((array)$pages as $pageid=>$name) { ?> - <tr class="<?php echo O::escapeHtml('or-data') ?>"><?php echo O::escapeHtml('') ?> - <td colspan="<?php echo O::escapeHtml('2') ?>" class="<?php echo O::escapeHtml('or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> - <a target="<?php echo O::escapeHtml('_self') ?>" data-type="<?php echo O::escapeHtml('open') ?>" data-action="<?php echo O::escapeHtml('page') ?>" data-method="<?php echo O::escapeHtml('') ?>" data-id="<?php echo O::escapeHtml(''.@$pageid.'') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" href="<?php echo O::escapeHtml('#/page/'.@$pageid.'') ?>" class="<?php echo O::escapeHtml('or-link') ?>"><?php echo O::escapeHtml('') ?> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--action-page') ?>"><?php echo O::escapeHtml('') ?> - </i> - <span><?php echo O::escapeHtml(''.@$name.'') ?> - </span> - </a> - </td> - </tr> - <?php } ?> </table> </div> - </div>- \ No newline at end of file + </div> + <section class="<?php echo O::escapeHtml('or-group or-collapsible or-collapsible--is-open or-collapsible--show') ?>"><?php echo O::escapeHtml('') ?> + <h2 class="<?php echo O::escapeHtml('or-collapsible-title or-group-title or-collapsible-act-switch') ?>"><?php echo O::escapeHtml('') ?> + <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--node-closed or-collapsible--on-closed') ?>"><?php echo O::escapeHtml('') ?> + </i> + <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--node-open or-collapsible--on-open') ?>"><?php echo O::escapeHtml('') ?> + </i> + <span><?php echo O::escapeHtml(''.@O::lang('pages').'') ?> + </span> + </h2> + <div class="<?php echo O::escapeHtml('or-collapsible-value or-group-value') ?>"><?php echo O::escapeHtml('') ?> + <div class="<?php echo O::escapeHtml('or-table-wrapper') ?>"><?php echo O::escapeHtml('') ?> + <div class="<?php echo O::escapeHtml('or-table-filter') ?>"><?php echo O::escapeHtml('') ?> + <input type="<?php echo O::escapeHtml('search') ?>" name="<?php echo O::escapeHtml('filter') ?>" placeholder="<?php echo O::escapeHtml(''.@O::lang('SEARCH_FILTER').'') ?>" class="<?php echo O::escapeHtml('or-input or-table-filter-input') ?>" /><?php echo O::escapeHtml('') ?> + </div> + <div class="<?php echo O::escapeHtml('or-table-area') ?>"><?php echo O::escapeHtml('') ?> + <table width="<?php echo O::escapeHtml('100%') ?>" class="<?php echo O::escapeHtml('or-table') ?>"><?php echo O::escapeHtml('') ?> + <?php foreach((array)$pages as $pageid=>$name) { ?> + <tr class="<?php echo O::escapeHtml('or-table-data') ?>"><?php echo O::escapeHtml('') ?> + <td class="<?php echo O::escapeHtml('or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> + <a target="<?php echo O::escapeHtml('_self') ?>" data-type="<?php echo O::escapeHtml('open') ?>" data-action="<?php echo O::escapeHtml('page') ?>" data-method="<?php echo O::escapeHtml('') ?>" data-id="<?php echo O::escapeHtml(''.@$pageid.'') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" href="<?php echo O::escapeHtml('#/page/'.@$pageid.'') ?>" class="<?php echo O::escapeHtml('or-link') ?>"><?php echo O::escapeHtml('') ?> + <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--action-page') ?>"><?php echo O::escapeHtml('') ?> + </i> + <span><?php echo O::escapeHtml(''.@$name.'') ?> + </span> + </a> + </td> + </tr> + <?php } ?> + </table> + </div> + </div> + </div> + </section>+ \ No newline at end of file diff --git a/modules/cms/ui/themes/default/html/views/template/info.tpl.src.xml b/modules/cms/ui/themes/default/html/views/template/info.tpl.src.xml @@ -1,27 +1,37 @@ -<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../../../../../../../template_engine/components/template.xsd"> - <table filter="false"> - <row class="data"> - <column colspan="1"> - <text value="${message:id}"/> - </column> - <column> - <text value="${id}"/> - </column> - </row> - <row class="headline"> - <column colspan="2"> - <text value="${message:pages}"/> - </column> - </row> - <list list="${pages}" value="name" key="pageid"> - <row class="data"> - <column colspan="2" class="act-clickable"> - <link type="open" action="page" id="${pageid}"> - <image action="page"/> - <text value="${name}"/> - </link> - </column> - </row> - </list> - </table> +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../../../../../../../template_engine/components/template.xsd"> + <table filter="false"> + <row class="table-data"> + <column colspan="1"> + <text value="${message:id}"/> + </column> + <column> + <text value="${id}"/> + </column> + </row> + <row class="data"> + <column> + <text value="${message:name}"/> + </column> + <column> + <text value="${name}"/> + </column> + </row> + + </table> + + <group title="${message:pages}"> + <table filter="true"> + <list list="${pages}" value="name" key="pageid"> + <row class="table-data"> + <column class="act-clickable"> + <link type="open" action="page" id="${pageid}"> + <image action="page"/> + <text value="${name}"/> + </link> + </column> + </row> + </list> + </table> + </group> </output> diff --git a/modules/cms/ui/themes/default/html/views/text/edit.php b/modules/cms/ui/themes/default/html/views/text/edit.php @@ -1,45 +1,5 @@ <?php /* THIS FILE IS GENERATED from edit.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> - <form name="<?php echo O::escapeHtml('') ?>" target="<?php echo O::escapeHtml('_self') ?>" data-target="<?php echo O::escapeHtml('view') ?>" action="<?php echo O::escapeHtml('./') ?>" data-method="<?php echo O::escapeHtml('edit') ?>" data-action="<?php echo O::escapeHtml('text') ?>" data-id="<?php echo O::escapeHtml(''.@$_id.'') ?>" method="<?php echo O::escapeHtml('POST') ?>" enctype="<?php echo O::escapeHtml('application/x-www-form-urlencoded') ?>" data-async="<?php echo O::escapeHtml('') ?>" data-autosave="<?php echo O::escapeHtml('') ?>" class="<?php echo O::escapeHtml('or-form or-text') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-form-headline') ?>"><?php echo O::escapeHtml('') ?> - </div> - <div class="<?php echo O::escapeHtml('or-form-content') ?>"><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('token') ?>" value="<?php echo O::escapeHtml(''.@$_token.'') ?>" /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('action') ?>" value="<?php echo O::escapeHtml('text') ?>" /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('subaction') ?>" value="<?php echo O::escapeHtml('edit') ?>" /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('id') ?>" value="<?php echo O::escapeHtml(''.@$_id.'') ?>" /><?php echo O::escapeHtml('') ?> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml('') ?> - </h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-label') ?>"><?php echo O::escapeHtml('') ?> - </div> - <div class="<?php echo O::escapeHtml('or-value') ?>"><?php echo O::escapeHtml('') ?> - <br /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('file') ?>" name="<?php echo O::escapeHtml('file') ?>" size="<?php echo O::escapeHtml('40') ?>" class="<?php echo O::escapeHtml('or-upload') ?>" /><?php echo O::escapeHtml('') ?> - <br /><?php echo O::escapeHtml('') ?> - <br /><?php echo O::escapeHtml('') ?> - </div> - </div> - </section> - <div class="<?php echo O::escapeHtml('or-line dropzone-upload') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-label') ?>"><?php echo O::escapeHtml('') ?> - </div> - <div class="<?php echo O::escapeHtml('or-value') ?>"><?php echo O::escapeHtml('') ?> - </div> - </div> - </div> - <div class="<?php echo O::escapeHtml('or-form-actionbar') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-btn or-btn--secondary or-act-form-cancel') ?>"><?php echo O::escapeHtml('') ?> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--form-cancel') ?>"><?php echo O::escapeHtml('') ?> - </i> - <span class="<?php echo O::escapeHtml('or-form-btn-label') ?>"><?php echo O::escapeHtml(''.@O::lang('CANCEL').'') ?> - </span> - </div> - <div class="<?php echo O::escapeHtml('or-btn or-btn--primary or-act-form-save') ?>"><?php echo O::escapeHtml('') ?> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--form-ok') ?>"><?php echo O::escapeHtml('') ?> - </i> - <span class="<?php echo O::escapeHtml('or-form-btn-label') ?>"><?php echo O::escapeHtml(''.@O::lang('button_ok').'') ?> - </span> - </div> - </div> - </form>- \ No newline at end of file + <a target="<?php echo O::escapeHtml('_self') ?>" data-action="<?php echo O::escapeHtml('') ?>" data-method="<?php echo O::escapeHtml('value') ?>" data-id="<?php echo O::escapeHtml('') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" href="<?php echo O::escapeHtml('') ?>" class="<?php echo O::escapeHtml('or-link or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> + <span><?php echo O::escapeHtml(''.@O::lang('edit').'') ?> + </span> + </a>+ \ No newline at end of file diff --git a/modules/cms/ui/themes/default/html/views/text/edit.tpl.src.xml b/modules/cms/ui/themes/default/html/views/text/edit.tpl.src.xml @@ -1,19 +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_engine/components/template.xsd"> - <form> - <fieldset class="line" label=""> - <part class="label"/> - <part class="value"> - <newline/> - <upload name="file"/> - <newline/> - <newline/> - </part> - </fieldset> - <part class="line dropzone-upload"> - <part class="label"> - </part> - <part class="value"> - </part> - </part> - </form> +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../../../../../../../template_engine/components/template.xsd"> + + <link clickable="true" subaction="value"> + <text value="${message:edit}"/> + </link> </output> diff --git a/modules/cms/ui/themes/default/html/views/text/preview.php b/modules/cms/ui/themes/default/html/views/text/preview.php @@ -1,3 +1,11 @@ <?php /* THIS FILE IS GENERATED from preview.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> - <iframe src="<?php echo O::escapeHtml(''.@$preview_url.'') ?>"><?php echo O::escapeHtml('') ?> - </iframe>- \ No newline at end of file + <code><?php echo O::escapeHtml(''.@$text.'') ?> + </code> + <br /><?php echo O::escapeHtml('') ?> + <br /><?php echo O::escapeHtml('') ?> + <a target="<?php echo O::escapeHtml('_self') ?>" data-url="<?php echo O::escapeHtml(''.@$preview_url.'') ?>" data-type="<?php echo O::escapeHtml('popup') ?>" data-action="<?php echo O::escapeHtml('') ?>" data-method="<?php echo O::escapeHtml('') ?>" data-id="<?php echo O::escapeHtml('') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" href="<?php echo O::escapeHtml('') ?>" class="<?php echo O::escapeHtml('or-link or-action or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> + <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--menu-open_in_new') ?>"><?php echo O::escapeHtml('') ?> + </i> + <span><?php echo O::escapeHtml(''.@O::lang('link_open_in_new_window').'') ?> + </span> + </a>+ \ No newline at end of file diff --git a/modules/cms/ui/themes/default/html/views/text/preview.tpl.src.xml b/modules/cms/ui/themes/default/html/views/text/preview.tpl.src.xml @@ -1,3 +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_engine/components/template.xsd"> - <insert url="${preview_url}"/> +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../../../../../../../template_engine/components/template.xsd"> + + <text value="${text}" escape="true" type="code" maxlength="200"/> + + <newline /> + <newline /> + + <link clickable="true" type="popup" class="action" url="${preview_url}"> + <image menu="open_in_new"/> + <text value="${message:link_open_in_new_window}"/> + </link> + </output> diff --git a/modules/cms/ui/themes/default/html/views/text/value.php b/modules/cms/ui/themes/default/html/views/text/value.php @@ -8,10 +8,23 @@ <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('subaction') ?>" value="<?php echo O::escapeHtml('value') ?>" /><?php echo O::escapeHtml('') ?> <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('id') ?>" value="<?php echo O::escapeHtml(''.@$_id.'') ?>" /><?php echo O::escapeHtml('') ?> <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> + <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml('') ?> + </h3> + <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> + <input type="<?php echo O::escapeHtml('file') ?>" name="<?php echo O::escapeHtml('file') ?>" size="<?php echo O::escapeHtml('40') ?>" class="<?php echo O::escapeHtml('or-upload') ?>" /><?php echo O::escapeHtml('') ?> + </div> + </section> + <div class="<?php echo O::escapeHtml('or-dropzone-upload') ?>"><?php echo O::escapeHtml('') ?> + <br /><?php echo O::escapeHtml('') ?> + <br /><?php echo O::escapeHtml('') ?> + <br /><?php echo O::escapeHtml('') ?> + <br /><?php echo O::escapeHtml('') ?> + </div> + <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml(''.@O::lang('VALUE').'') ?> </h3> <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <textarea name="<?php echo O::escapeHtml('value') ?>" data-extension="<?php echo O::escapeHtml(''.@$extension.'') ?>" data-mimetype="<?php echo O::escapeHtml(''.@$mimetype.'') ?>" data-mode="<?php echo O::escapeHtml('htmlmixed') ?>" class="<?php echo O::escapeHtml('or-input or-editor or-code-editor') ?>"><?php echo O::escapeHtml(''.@$value.'') ?> + <textarea name="<?php echo O::escapeHtml('text') ?>" data-extension="<?php echo O::escapeHtml(''.@$extension.'') ?>" data-mimetype="<?php echo O::escapeHtml(''.@$mimetype.'') ?>" data-mode="<?php echo O::escapeHtml('htmlmixed') ?>" class="<?php echo O::escapeHtml('or-input or-editor or-code-editor') ?>"><?php echo O::escapeHtml(''.@$text.'') ?> </textarea> </div> </section> @@ -23,12 +36,6 @@ <span class="<?php echo O::escapeHtml('or-form-btn-label') ?>"><?php echo O::escapeHtml(''.@O::lang('CANCEL').'') ?> </span> </div> - <div class="<?php echo O::escapeHtml('or-btn or-btn--primary or-act-form-apply') ?>"><?php echo O::escapeHtml('') ?> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--form-apply') ?>"><?php echo O::escapeHtml('') ?> - </i> - <span class="<?php echo O::escapeHtml('or-form-btn-label') ?>"><?php echo O::escapeHtml(''.@O::lang('APPLY').'') ?> - </span> - </div> <div class="<?php echo O::escapeHtml('or-btn or-btn--primary or-act-form-save') ?>"><?php echo O::escapeHtml('') ?> <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--form-ok') ?>"><?php echo O::escapeHtml('') ?> </i> diff --git a/modules/cms/ui/themes/default/html/views/text/value.tpl.src.xml b/modules/cms/ui/themes/default/html/views/text/value.tpl.src.xml @@ -1,8 +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_engine/components/template.xsd"> - <form apply="true"> - <fieldset label="${message:VALUE}"> - <editor name="value" type="code" extension="${extension}" mimetype="${mimetype}"/> - </fieldset> - </form> + + <form> + <fieldset > + <upload name="file"/> + </fieldset> + + <part class="dropzone-upload"> + <newline /> + <newline /> + <newline /> + <newline /> + </part> + + <fieldset label="${message:VALUE}"> + <editor name="text" type="code" extension="${extension}" mimetype="${mimetype}"/> + </fieldset> + </form> + + </output> diff --git a/modules/cms/ui/themes/default/style/theme/openrat-theme.less b/modules/cms/ui/themes/default/style/theme/openrat-theme.less @@ -133,7 +133,8 @@ html.or-theme-@{cms-theme-id} { //background-color: @cms-inactive-background-color; } - tr.or-data:hover { + tr.or-data:hover, + tr.or-table-data:hover{ background-color: @cms-title-background-color; color: @cms-title-text-color; } diff --git a/modules/util/Upload.class.php b/modules/util/Upload.class.php @@ -115,5 +115,3 @@ class Upload return isset($_FILES[$name]) && is_array($_FILES[$name]); } } - -?>- \ No newline at end of file