openrat-cms

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

commit 97c480fffa19e623d12f2d1c703f4aae59b06779
parent 559a46410ae1225c4721203c97a0b4cf1d8ec481
Author: Jan Dankert <develop@jandankert.de>
Date:   Thu,  4 Mar 2021 03:39:25 +0100

New: Separate edit action for images and texts.

Diffstat:
Mmodules/cms/action/FileAction.class.php | 10++++++++++
Mmodules/cms/action/file/FileAdvancedAction.class.php | 7+++++++
Mmodules/cms/action/file/FileShowAction.class.php | 2+-
Mmodules/cms/action/folder/FolderEditAction.class.php | 9---------
Amodules/cms/action/image/ImageEditAction.class.php | 20++++++++++++++++++++
Mmodules/cms/action/object/ObjectInfoAction.class.php | 2+-
Amodules/cms/action/text/TextEditAction.class.php | 17+++++++++++++++++
Mmodules/cms/generator/ValueGenerator.class.php | 29+++++++++++++++++++----------
Mmodules/cms/macros/macro/Album.class.php | 19+++++--------------
Mmodules/cms/model/File.class.php | 13+------------
Mmodules/cms/model/Page.class.php | 12+-----------
Mmodules/cms/model/Text.class.php | 3---
Mmodules/cms/ui/action/tree/TreePathAction.class.php | 1+
Mmodules/cms/ui/themes/default/html/views/file/advanced.php | 6++++++
Mmodules/cms/ui/themes/default/html/views/file/advanced.tpl.src.xml | 5+++++
Mmodules/cms/ui/themes/default/html/views/file/edit.php | 17+++++++++++++----
Mmodules/cms/ui/themes/default/html/views/file/edit.tpl.src.xml | 10+++++++---
Amodules/cms/ui/themes/default/html/views/image/edit.php | 19+++++++++++++++++++
Amodules/cms/ui/themes/default/html/views/image/edit.tpl.src.xml | 17+++++++++++++++++
Mmodules/cms/ui/themes/default/html/views/object/info.php | 6------
Mmodules/cms/ui/themes/default/html/views/object/info.tpl.src.xml | 3---
Mmodules/cms/ui/themes/default/html/views/text/edit.php | 22++++++++++++++++++----
Mmodules/cms/ui/themes/default/html/views/text/edit.tpl.src.xml | 16+++++++++++++---
23 files changed, 181 insertions(+), 84 deletions(-)

diff --git a/modules/cms/action/FileAction.class.php b/modules/cms/action/FileAction.class.php @@ -90,4 +90,14 @@ class FileAction extends ObjectAction return $archiveTypes; } + + /** + * @return string MIME-type + */ + protected function getMimeType() { + $context = new FileContext( $this->file->objectid,Producer::SCHEME_PREVIEW ); + $fileGenerator = new FileGenerator( $context ); + return $fileGenerator->getMimeType(); + + } } \ No newline at end of file diff --git a/modules/cms/action/file/FileAdvancedAction.class.php b/modules/cms/action/file/FileAdvancedAction.class.php @@ -3,6 +3,8 @@ namespace cms\action\file; use cms\action\FileAction; use cms\action\Method; use cms\action\RequestParams; +use cms\generator\FileContext; +use cms\generator\FileGenerator; use cms\model\BaseObject; use language\Messages; use util\exception\ValidationException; @@ -14,6 +16,8 @@ class FileAdvancedAction extends FileAction implements Method { public function view() { // Eigenschaften der Datei uebertragen $this->setTemplateVar( 'extension',$this->file->extension ); + $this->setTemplateVar( 'mimetype' ,$this->getMimeType() ); + $this->setTemplateVar( 'type' ,$this->file->type ); $this->setTemplateVar( 'types' ,[ BaseObject::TYPEID_FILE => \cms\base\Language::lang('file' ), @@ -38,4 +42,7 @@ class FileAdvancedAction extends FileAction implements Method { $this->addNoticeFor( $this->file, Messages::PROP_SAVED); } + + + } diff --git a/modules/cms/action/file/FileShowAction.class.php b/modules/cms/action/file/FileShowAction.class.php @@ -36,7 +36,7 @@ class FileShowAction extends FileAction implements Method { else { // Angabe Content-Type - header('Content-Type: '.$this->file->mimeType() ); + header('Content-Type: '.$generator->getMimeType() ); } header('X-File-Id: ' .$this->file->fileid ); diff --git a/modules/cms/action/folder/FolderEditAction.class.php b/modules/cms/action/folder/FolderEditAction.class.php @@ -43,15 +43,6 @@ class FolderEditAction extends FolderAction implements Method { $file = new File( $id ); $file->load(); $list[$id]['desc'] .= ' - '.intval($file->size/1000).'kB'; - - if ( $file->isImage() ) - { - $list[$id]['icon' ] = 'image'; - $list[$id]['class'] = 'image'; - //$list[$id]['url' ] = Html::url('file','show',$id) nur sinnvoll bei Lightbox-Anzeige - } -// if ( substr($file->mimeType(),0,5) == 'text/' ) -// $list[$id]['icon'] = 'text'; } $list[$id]['date'] = $o->lastchangeDate; diff --git a/modules/cms/action/image/ImageEditAction.class.php b/modules/cms/action/image/ImageEditAction.class.php @@ -0,0 +1,20 @@ +<?php +namespace cms\action\image; +use cms\action\ImageAction; +use cms\action\Method; +use util\Html; + + +class ImageEditAction extends ImageAction implements Method { + + public function view() { + + // MIME-Types aus Datei lesen + $this->setTemplateVar( 'preview', Html::url('image','show',$this->image->objectid ) ); + } + + + public function post() + { + } +} diff --git a/modules/cms/action/object/ObjectInfoAction.class.php b/modules/cms/action/object/ObjectInfoAction.class.php @@ -12,7 +12,7 @@ class ObjectInfoAction extends ObjectAction implements Method { $this->setTemplateVar( 'is_valid' ,$this->baseObject->isValid() ); $this->setTemplateVar( 'full_filename',$this->baseObject->full_filename() ); $this->setTemplateVar( 'extension' , '' ); - $this->setTemplateVar( 'mimetype' , $this->baseObject->mimeType() ); + $this->setTemplateVar( 'mimetype' , '' ); $this->setTemplateVar( 'name' , $this->baseObject->getDefaultName()->name ); $this->setTemplateVar( 'description' , $this->baseObject->getDefaultName()->description ); diff --git a/modules/cms/action/text/TextEditAction.class.php b/modules/cms/action/text/TextEditAction.class.php @@ -0,0 +1,17 @@ +<?php +namespace cms\action\text; +use cms\action\Method; +use cms\action\TextAction; + + +class TextEditAction extends TextAction implements Method { + + public function view() { + $this->setTemplateVar( 'source',$this->text->loadValue() ); + } + + + public function post() + { + } +} diff --git a/modules/cms/generator/ValueGenerator.class.php b/modules/cms/generator/ValueGenerator.class.php @@ -254,9 +254,11 @@ class ValueGenerator extends BaseGenerator } elseif ($element->subtype == 'image_data_uri' ) { + $context = new FileContext( $objectid,Producer::SCHEME_PUBLIC ); + $generator = new FileGenerator( $context ); $file = new File($objectid); $file->load(); - $inhalt = 'data:'.$file->mimeType().';base64,'.base64_encode($file->loadValue()); + $inhalt = 'data:'.$generator->getMimeType().';base64,'.base64_encode($generator->getCache()->get()); } else { @@ -351,7 +353,7 @@ class ValueGenerator extends BaseGenerator case 'width': $f = new Image( $objectid ); $f->load(); - if ( $f->isImage() ) + if ( $f->typeid == BaseObject::TYPE_IMAGE ) { $f->getImageSize(); $inhalt = $f->width; @@ -362,7 +364,7 @@ class ValueGenerator extends BaseGenerator case 'height': $f = new Image( $objectid ); $f->load(); - if ( $f->isImage() ) + if ( $f->typeid == BaseObject::TYPE_IMAGE ) { $f->getImageSize(); $inhalt = $f->height; @@ -506,9 +508,9 @@ class ValueGenerator extends BaseGenerator case 'mime_type': if ( $linkedObject->isFile || $linkedObject->isImage || $linkedObject->isText ) { - $f = new File( $objectid ); - $f->load(); - $inhalt = $f->mimeType(); + $context = new FileContext( $objectid,Producer::SCHEME_PUBLIC ); + $generator = new FileGenerator( $context ); + $inhalt = $generator->getMimeType(); unset($f); } break; @@ -612,7 +614,7 @@ class ValueGenerator extends BaseGenerator } // Wenn HTML nicht erlaubt und Wiki-Formatierung aktiv, dann einfache HTML-Tags in Wiki umwandeln - $pageIsHtml = $page->isHtml(); + $pageIsHtml = $this->isHtml( (new PageGenerator( $this->context->pageContext ))->getMimeType()); // switch( $format ) @@ -781,7 +783,7 @@ class ValueGenerator extends BaseGenerator } // Wenn HTML-Ausgabe, dann Sonderzeichen in HTML �bersetzen - if ( $page->isHtml() ) + if ( $this->isHtml( (new PageGenerator( $this->context->pageContext ))->getMimeType())) $inhalt = Text::encodeHtmlSpecialChars( $inhalt ); break; @@ -1004,7 +1006,7 @@ class ValueGenerator extends BaseGenerator if ( Configuration::subset('publish')->is('encode_utf8_in_html') ) // Wenn HTML-Ausgabe, dann UTF-8-Zeichen als HTML-Code uebersetzen - if ( $page->isHtml() ) + if ( $this->isHtml( (new PageGenerator( $this->context->pageContext ))->getMimeType()) ) $inhalt = Text::translateutf8tohtml($inhalt); break; @@ -1013,7 +1015,7 @@ class ValueGenerator extends BaseGenerator - if ( $this->context->pageContext->scheme == Producer::SCHEME_PREVIEW && $element->withIcon && $page->isHtml() ) + if ( $this->context->pageContext->scheme == Producer::SCHEME_PREVIEW && $element->withIcon && $this->isHtml( (new PageGenerator( $this->context->pageContext ))->getMimeType()) ) { // Anklickbaren Link voranstellen. $iconLink = '<a href="javascript:parent.Openrat.Workbench.openNewAction(\''.$element->name.'\',\'pageelement\',\''.$page->objectid.'_'.$element->elementid.'\');" title="'.$element->desc.'">&rarr;<i class="or-image-icon or-image-icon--el-'.$element->getTypeName().'"></i></a>'; @@ -1075,4 +1077,11 @@ class ValueGenerator extends BaseGenerator { return ''; // Values does not have a mime type. } + + + protected function isHtml( $mimeType ) + { + return $mimeType == 'text/html'; + } + } \ No newline at end of file diff --git a/modules/cms/macros/macro/Album.class.php b/modules/cms/macros/macro/Album.class.php @@ -65,14 +65,8 @@ class Album extends Macro $folderid = $this->page->parentid; $f = new Folder($folderid); - $files = []; + $files = $f->getObjectIdsByType(BaseObject::TYPEID_IMAGE); - if ( $this->withImages ) - $files += $f->getObjectIdsByType(BaseObject::TYPEID_IMAGE); - - if ( $this->withFiles ) - $files += $f->getObjectIdsByType(BaseObject::TYPEID_FILE); - $this->output('<dl class="album">'); foreach( $files as $fileid ) @@ -80,13 +74,10 @@ class Album extends Macro $file = new Image($fileid); $file->load(); - if ( $file->isImage() ) - { - $file->getImageSize(); - $img = '<img src="'.$this->pathToObject($fileid).'" alt="'.$file->name.'" width="'.$file->width.'" height="'.$file->height.'" />'; - $this->output('<dt>'.$img.'</dt><dd>'.$file->desc.'</dd>'); - } - + $file->getImageSize(); + $img = '<img src="'.$this->pathToObject($fileid).'" alt="'.$file->name.'" width="'.$file->width.'" height="'.$file->height.'" />'; + $this->output('<dt>'.$img.'</dt><dd>'.$file->desc.'</dd>'); + } $this->output('</dl>'); diff --git a/modules/cms/model/File.class.php b/modules/cms/model/File.class.php @@ -351,8 +351,7 @@ class File extends BaseObject array('full_filename'=>$this->fullFilename, 'extension' =>$this->extension, 'size' =>$this->size, - 'filterid' =>$this->filterid, - 'mimetype' =>$this->mimetype() ) ); + 'filterid' =>$this->filterid ) ); } @@ -462,16 +461,6 @@ class File extends BaseObject /** - * Stellt anhand der Dateiendung fest, ob es sich bei dieser Datei um ein Bild handelt - */ - function isImage() - { - return substr($this->mimeType(),0,6)=='image/'; - } - - - - /** * Ermittelt die Datei-Endung. * * @return String Datei-Endung diff --git a/modules/cms/model/Page.class.php b/modules/cms/model/Page.class.php @@ -113,8 +113,7 @@ class Page extends BaseObject return array_merge( parent::getProperties(), array('full_filename'=>'', 'pageid' =>$this->pageid, - 'templateid' =>$this->templateid, - 'mime_type' =>$this->mimeType() ) ); + 'templateid' =>$this->templateid) ); } @@ -401,15 +400,6 @@ SQL - /** - * Stellt fest, ob diese Seite im HTML-Format veröffentlicht wird. - * @return boolean - */ - public function isHtml() - { - return $this->mimeType()=='text/html'; - } - public function __toString() { return 'Id '.$this->pageid.' (filename='.$this->filename.', templateid='.$this->templateid.')'; diff --git a/modules/cms/model/Text.class.php b/modules/cms/model/Text.class.php @@ -47,5 +47,3 @@ class Text extends File return 'text/plain'; } } - -?>- \ No newline at end of file diff --git a/modules/cms/ui/action/tree/TreePathAction.class.php b/modules/cms/ui/action/tree/TreePathAction.class.php @@ -70,6 +70,7 @@ class TreePathAction extends TreeAction implements Method { case 'page' : case 'file' : case 'image' : + case 'text' : $o = new BaseObject( $id ); $o->load(); diff --git a/modules/cms/ui/themes/default/html/views/file/advanced.php b/modules/cms/ui/themes/default/html/views/file/advanced.php @@ -7,6 +7,12 @@ <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('subaction') ?>" value="<?php echo O::escapeHtml('advanced') ?>" /><?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('FILE_mimetype').'') ?></h3> + <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> + <span><?php echo O::escapeHtml(''.@$mimetype.'') ?></span> + </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-extension or-input') ?>" /><?php echo O::escapeHtml('') ?> diff --git a/modules/cms/ui/themes/default/html/views/file/advanced.tpl.src.xml b/modules/cms/ui/themes/default/html/views/file/advanced.tpl.src.xml @@ -1,9 +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"> <form> + <fieldset label="${message:FILE_mimetype}"> + <text value="${mimetype}"/> + </fieldset> + <fieldset label="${message:file_extension}"> <input name="extension" size="10" class="extension"/> </fieldset> + <fieldset label="${message:type}"> <selectbox name="type" size="1" list="types"/> </fieldset> 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,4 +1,13 @@ <?php /* THIS FILE IS GENERATED from edit.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> - <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 + <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('file').'') ?></span> + </h2> + <div class="<?php echo O::escapeHtml('or-collapsible-value or-group-value') ?>"><?php echo O::escapeHtml('') ?> + <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> + </div> + </section>+ \ 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,9 +1,13 @@ <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> + <group title="${message:file}"> + + <link clickable="true" subaction="value" type="dialog"> + <text value="${message:edit}"/> + </link> + + </group> <!-- <form languageid="${languageid}"> <fieldset class="line" label=""> diff --git a/modules/cms/ui/themes/default/html/views/image/edit.php b/modules/cms/ui/themes/default/html/views/image/edit.php @@ -0,0 +1,18 @@ +<?php /* THIS FILE IS GENERATED from edit.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> + <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('') ?> + <div class="<?php echo O::escapeHtml('or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> + <img src="<?php echo O::escapeHtml(''.@$preview.'') ?>" /><?php echo O::escapeHtml('') ?> + <br /><?php echo O::escapeHtml('') ?> + <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') ?>"><?php echo O::escapeHtml('') ?> + <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--action-text') ?>"><?php echo O::escapeHtml('') ?></i> + <span><?php echo O::escapeHtml(''.@O::lang('edit').'') ?></span> + </a> + </div> + </div> + </section>+ \ 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 @@ -0,0 +1,17 @@ +<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"> + + + <group title="${message:content}"> + <part class="act-clickable"> + <image url="${preview}" /> + + <newline/> + <link type="dialog" subaction="value"> + <image action="text"/> + <text value="${message:edit}"/> + </link> + </part> + </group> + +</output> diff --git a/modules/cms/ui/themes/default/html/views/object/info.php b/modules/cms/ui/themes/default/html/views/object/info.php @@ -76,12 +76,6 @@ </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_mimetype').'') ?></h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@$mimetype.'') ?></span> - </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-value or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> diff --git a/modules/cms/ui/themes/default/html/views/object/info.tpl.src.xml b/modules/cms/ui/themes/default/html/views/object/info.tpl.src.xml @@ -43,9 +43,6 @@ <fieldset label="${message:FILE_SIZE}"> <text value="${size}"/> </fieldset> - <fieldset label="${message:FILE_mimetype}"> - <text value="${mimetype}"/> - </fieldset> <fieldset label=""> <part class="value,act-clickable"> <link class="action" type="dialog" subaction="size"> 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,4 +1,18 @@ <?php /* THIS FILE IS GENERATED from edit.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> - <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 + <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('') ?> + <div class="<?php echo O::escapeHtml('or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> + <code><?php echo O::escapeHtml(''.@$source.'') ?></code> + <br /><?php echo O::escapeHtml('') ?> + <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') ?>"><?php echo O::escapeHtml('') ?> + <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--action-text') ?>"><?php echo O::escapeHtml('') ?></i> + <span><?php echo O::escapeHtml(''.@O::lang('edit').'') ?></span> + </a> + </div> + </div> + </section>+ \ 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,7 +1,17 @@ <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> + + <group title="${message:content}"> + <part class="act-clickable"> + <text value="${source}" escape="true" type="code" /> + + <newline/> + <link type="dialog" subaction="value"> + <image action="text"/> + <text value="${message:edit}"/> + </link> + </part> + </group> + </output>