commit 6d64a684f1eaae8d7c5f9b423e6eccb3ff4d4553
parent e754e2496c45f7a9009378a17c3722c076151055
Author: dankert <openrat@jandankert.de>
Date: Fri, 11 Mar 2022 11:32:38 +0100
New: Edit all languages for a page element.
Diffstat:
7 files changed, 644 insertions(+), 2 deletions(-)
diff --git a/modules/cms/action/page/PageEditAction.class.php b/modules/cms/action/page/PageEditAction.class.php
@@ -12,6 +12,8 @@ use cms\model\Template;
use cms\model\Value;
class PageEditAction extends PageAction implements Method {
+
+
public function view() {
$template = new Template( $this->page->templateid );
diff --git a/modules/cms/action/pageelement/PageelementAllAction.class.php b/modules/cms/action/pageelement/PageelementAllAction.class.php
@@ -0,0 +1,297 @@
+<?php
+namespace cms\action\pageelement;
+
+use cms\action\Method;
+use cms\action\PageelementAction;
+use cms\base\Language as L;
+use cms\generator\PageContext;
+use cms\generator\PageGenerator;
+use cms\generator\Producer;
+use cms\generator\Publisher;
+use cms\generator\PublishOrder;
+use cms\model\BaseObject;
+use cms\model\Content;
+use cms\model\Element;
+use cms\model\Folder;
+use cms\model\Language;
+use cms\model\PageContent;
+use cms\model\Permission;
+use cms\model\Project;
+use cms\model\Value;
+use language\Messages;
+use util\exception\SecurityException;
+use util\Session;
+use util\Text;
+
+
+class PageelementAllAction extends PageelementAction implements Method {
+
+ public function getRequiredPermission() {
+ return Permission::ACL_WRITE;
+ }
+
+
+ public function view()
+ {
+ $elements = [];
+
+ foreach( $this->getLanguageIds() as $languageId ) {
+
+ $language = new Language($languageId);
+ $language->load();
+
+ $this->setTemplateVar('value_time',time() );
+ $this->setTemplateVar('writable' ,$this->page->hasRight( Permission::ACL_WRITE ) );
+
+ $element = $this->element;
+ $element->load();
+
+ $pageContent = new PageContent();
+ $pageContent->elementId = $element->elementid;
+ $pageContent->pageId = $this->page->pageid;
+ $pageContent->languageid = $languageId;
+ $pageContent->load();
+
+ if ( $pageContent->isPersistent() ) {
+ $value = new Value();
+ $value->contentid = $pageContent->contentId;
+ $value->load();
+ }
+ else {
+ // There is no content yet, so creating an empty value.
+ $value = new Value();
+ }
+
+ $output = [];
+ $output += $element->getProperties();
+ $output += $value->getProperties();
+ $output['label'] = $language->getName();
+
+ $content = '';
+
+ switch( $element->typeid) {
+
+ case Element::ELEMENT_TYPE_LINK:
+ $project = new Project($this->page->projectid);
+ $output['rootfolderid'] = $project->getRootObjectId();
+
+ // Ermitteln, welche Objekttypen verlinkt werden d�rfen.
+ $type = $element->subtype;
+
+ if (substr($type, 0, 5) == 'image')
+ $type = 'file';
+
+ if (!in_array($type, array('file', 'page', 'link', 'folder')))
+ $types = array('file', 'page', 'link'); // Fallback: Der Link kann auf Seiten,Dateien und Verknüpfungen zeigen
+ else
+ $types = array($type); // gewünschten Typ verwenden
+
+ $oid = $value->linkToObjectId;
+ $name = '';
+
+ if ($oid) {
+ $o = new BaseObject($oid);
+ $o->load();
+ $name = $o->filename;
+ }
+
+ $output['objects'] = array();
+ $output['linkobjectid']= $oid;
+ $content = $oid;
+ $output['linkname']= $name;
+
+ $output['types'] = implode(',', $types);
+
+ break;
+
+ case Element::ELEMENT_TYPE_SELECT:
+ $output['items'] = $element->getSelectItems();
+ $content = $value->text;
+ break;
+
+ case Element::ELEMENT_TYPE_INSERT:
+ // Auswahl ueber alle Elementtypen
+ $objects = array();
+ //Änderung der möglichen Types
+ $types = array('file', 'page', 'link');
+ $objects[0] = \cms\base\Language::lang('LIST_ENTRY_EMPTY'); // Wert "nicht ausgewählt"
+
+ $project = new Project($this->page->projectid);
+ $folder = new Folder($project->getRootObjectId());
+ $folder->load();
+
+ //Auch Dateien dazu
+ foreach ($project->getAllObjectIds($types) as $id) {
+ $f = new Folder($id);
+ $f->load();
+
+ $objects[$id] = \cms\base\Language::lang($f->getType()) . ': ';
+ $objects[$id] .= implode(' » ', $f->parentObjectNames(false, true));
+ }
+
+ foreach ($project->getAllFolders() as $id) {
+ $f = new Folder($id);
+ $f->load();
+
+ $objects[$id] = \cms\base\Language::lang($f->getType()) . ': ';
+ $objects[$id] .= implode(' » ', $f->parentObjectNames(false, true));
+ }
+
+ asort($objects); // Sortieren
+
+ $output['objects'] = $objects;
+ $content = $value->linkToObjectId;
+
+ break;
+
+ case Element::ELEMENT_TYPE_NUMBER:
+ $content = $value->number / pow(10, $element->decimals);
+ break;
+
+ case Element::ELEMENT_TYPE_LONGTEXT:
+ if ($requestedFormat = $this->request->getText('format'))
+ // Individual format from request.
+ $format = $requestedFormat;
+ elseif ($value->format != null)
+ $format = $value->format;
+ else
+ // There is no saved value. Get the format from the template element.
+ $format = $element->format;
+
+ $output['format'] = $format;
+ $output['editor'] = Element::getAvailableFormats()[$format];
+
+ $content = $this->linkifyOIDs($value->text);
+ break;
+
+ case Element::ELEMENT_TYPE_TEXT:
+
+ $content = $value->text;
+ break;
+ }
+
+ $output[ 'name' ] = $language->isoCode;
+ $output[ 'value' ] = $content;
+ //$this->setTemplateVar( $language->getId(), $content );
+
+ $elements[ $language->getId() ] = $output;
+ }
+
+ if ($this->page->hasRight(Permission::ACL_RELEASE))
+ $this->setTemplateVar('release', true);
+ if ($this->page->hasRight(Permission::ACL_PUBLISH))
+ $this->setTemplateVar('publish', false);
+
+ $this->setTemplateVar('elements', $elements );
+ }
+
+
+
+ public function post()
+ {
+ if ( !$this->page->hasRight( Permission::ACL_WRITE ))
+ throw new SecurityException();
+
+ $element = $this->element;
+ $element->load();
+
+ foreach( $this->getLanguageIds() as $languageid ) {
+
+ $language = new Language($languageid);
+ $language->load();
+
+ $language = new Language($languageid);
+ $language->load();
+
+ $pageContent = new PageContent();
+ $pageContent->elementId = $element->elementid;
+ $pageContent->pageId = $this->page->pageid;
+ $pageContent->languageid = $languageid;
+ $pageContent->load();
+
+ $value = new Value();
+ $value->contentid = $pageContent->contentId;
+
+ switch ($element->typeid) {
+
+ case Element::ELEMENT_TYPE_TEXT:
+ $value->text = $this->request->getText($language->isoCode);
+ break;
+ case Element::ELEMENT_TYPE_LONGTEXT:
+ $value->text = $this->compactOIDs($this->request->getText($language->isoCode));
+ break;
+
+ case Element::ELEMENT_TYPE_DATE:
+ $value->date = strtotime($this->request->getText($language->isoCode . '_date') . $this->request->getText($language->isoCode . '_time'));
+ break;
+
+ case Element::ELEMENT_TYPE_SELECT:
+ $value->text = $this->request->getText($language->isoCode);
+ break;
+ case Element::ELEMENT_TYPE_LINK:
+ case Element::ELEMENT_TYPE_INSERT:
+ $value->linkToObjectId = intval($this->request->getNumber($language->isoCode));
+ break;
+
+ case Element::ELEMENT_TYPE_NUMBER:
+ $value->number = $this->request->getText($language->isoCode) * pow(10, $element->decimals);
+ break;
+ default:
+ throw new \LogicException('Unknown element type: ' . $element->getTypeName());
+ }
+
+
+ // Inhalt sofort freigegeben, wenn
+ // - Recht vorhanden
+ // - Freigabe gewuenscht
+ $value->publish = $this->page->hasRight(Permission::ACL_RELEASE) && $this->request->isTrue('release');
+
+ // Up-To-Date-Check
+ $content = new Content( $pageContent->contentId );
+ $lastChangeTime = $content->getLastChangeSinceByAnotherUser($this->request->getNumber('value_time'), $this->getCurrentUserId());
+ if ($lastChangeTime)
+ $this->addWarningFor($value, Messages::CONCURRENT_VALUE_CHANGE, array('last_change_time' => date(L::lang('DATE_FORMAT'), $lastChangeTime)));
+
+ // Inhalt speichern
+ $value->persist();
+
+ // Wenn Inhalt in allen Sprachen gleich ist, dann wird der Inhalt
+ // fuer jede Sprache einzeln gespeichert.
+ if ($element->allLanguages) {
+ $project = new Project($this->page->projectid);
+ foreach ($project->getLanguageIds() as $languageid) {
+ if ($languageid != $pageContent->languageid) {
+ $otherPageContent = clone $pageContent;
+ $otherPageContent->languageid = $languageid;
+ $otherPageContent->contentId = null;
+ $otherPageContent->load();
+ if (!$otherPageContent->contentId)
+ $otherPageContent->persist(); // create pagecontent if it does not exist.
+
+ $otherValue = clone $value;
+ $otherValue->contentid = $otherPageContent->contentId;
+ $otherValue->persist();
+ }
+ }
+ }
+ }
+
+ // Falls ausgewaehlt die Seite sofort veroeffentlichen
+ if ($this->page->hasRight(Permission::ACL_PUBLISH) && $this->request->isTrue('publish')) {
+ $this->publishPage( $languageid );
+ }
+
+ $this->page->setTimestamp(); // "Letzte Aenderung" setzen
+
+ $this->addNoticeFor($this->page, Messages::SAVED);
+ }
+
+ /**
+ * @return int[]
+ */
+ protected function getLanguageIds()
+ {
+ return $this->page->getProject()->getLanguageIds();
+ }
+
+}
diff --git a/modules/cms/model/Project.class.php b/modules/cms/model/Project.class.php
@@ -152,6 +152,9 @@ class Project extends ModelBase
}
+ /**
+ * @return int[]
+ */
public function getLanguageIds()
{
return array_keys( $this->getLanguages() );
diff --git a/modules/cms/ui/themes/default/html/views/page/edit.php b/modules/cms/ui/themes/default/html/views/page/edit.php
@@ -67,7 +67,7 @@
<?php foreach((array)@$elements as $list_key=>$list_value) { extract($list_value); ?>
<tr class="<?php echo O::escapeHtml('or-data') ?>"><?php echo O::escapeHtml('') ?>
<td class="<?php echo O::escapeHtml('or-act-clickable') ?>"><?php echo O::escapeHtml('') ?>
- <a title="<?php echo O::escapeHtml(''.@$desc.'') ?>" target="<?php echo O::escapeHtml('_self') ?>" data-name="<?php echo O::escapeHtml(''.@$name.'') ?>" name="<?php echo O::escapeHtml(''.@$name.'') ?>" data-type="<?php echo O::escapeHtml('open') ?>" data-action="<?php echo O::escapeHtml('pageelement') ?>" data-method="<?php echo O::escapeHtml('') ?>" data-id="<?php echo O::escapeHtml(''.@$pageelementid.'') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" href="<?php echo O::escapeHtml('#/pageelement/'.@$pageelementid.'') ?>" class="<?php echo O::escapeHtml('or-link') ?>"><?php echo O::escapeHtml('') ?>
+ <a title="<?php echo O::escapeHtml(''.@$desc.'') ?>" target="<?php echo O::escapeHtml('_self') ?>" data-name="<?php echo O::escapeHtml(''.@$name.'') ?>" name="<?php echo O::escapeHtml(''.@$name.'') ?>" data-type="<?php echo O::escapeHtml('dialog') ?>" data-action="<?php echo O::escapeHtml('pageelement') ?>" data-method="<?php echo O::escapeHtml('all') ?>" data-id="<?php echo O::escapeHtml(''.@$pageelementid.'') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" href="<?php echo O::escapeHtml('#/pageelement/'.@$pageelementid.'') ?>" class="<?php echo O::escapeHtml('or-link') ?>"><?php echo O::escapeHtml('') ?>
<i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--action-pageelement') ?>"><?php echo O::escapeHtml('') ?></i>
<span><?php echo O::escapeHtml(''.@$label.'') ?></span>
</a>
diff --git a/modules/cms/ui/themes/default/html/views/page/edit.tpl.src.xml b/modules/cms/ui/themes/default/html/views/page/edit.tpl.src.xml
@@ -22,6 +22,7 @@
</table>
</group>
+ <!-- list all elements -->
<group title="${message:PAGE_PAGEELEMENTS}">
<table>
<row header="true">
@@ -46,11 +47,18 @@
<list list="${elements}" extract="true">
<row class="data">
<column class="act-clickable">
- <link type="open" title="${desc}" name="${name}" action="pageelement" id="${pageelementid}">
+ <link type="dialog" title="${desc}" name="${name}" action="pageelement" subaction="all" id="${pageelementid}">
<image action="pageelement"/>
<text value="${label}"/>
</link>
</column>
+ <!--
+ <column class="act-clickable">
+ <link type="open" title="${desc}" name="${name}" action="pageelement" id="${pageelementid}">
+ <image action="pageelement"/>
+ <text value="${label}"/>
+ </link>
+ </column>-->
<column title="${desc}" class="-visible-on-desktop">
<text value="${desc}"/>
</column>
diff --git a/modules/cms/ui/themes/default/html/views/pageelement/all.php b/modules/cms/ui/themes/default/html/views/pageelement/all.php
@@ -0,0 +1,192 @@
+<?php /* THIS FILE IS GENERATED from all.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('all') ?>" data-action="<?php echo O::escapeHtml('pageelement') ?>" 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-pageelement') ?>"><?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('pageelement') ?>" /><?php echo O::escapeHtml('') ?>
+ <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('subaction') ?>" value="<?php echo O::escapeHtml('all') ?>" /><?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('') ?>
+ <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('elementid') ?>" value="<?php echo O::escapeHtml(''.@$elementid.'') ?>" /><?php echo O::escapeHtml('') ?>
+ <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('value_time') ?>" value="<?php echo O::escapeHtml(''.@$value_time.'') ?>" /><?php echo O::escapeHtml('') ?>
+ <?php foreach((array)@$elements as $list_key=>$list_value) { extract($list_value); ?>
+ <section class="<?php echo O::escapeHtml('or-group or-collapsible or-collapsible--is-open or-collapsible--is-visible 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(''.@$label.'') ?></span>
+ </h2>
+ <p class="<?php echo O::escapeHtml('or-group-description') ?>"><?php echo O::escapeHtml(''.@$desc.'') ?></p>
+ <div class="<?php echo O::escapeHtml('or-collapsible-value or-group-value') ?>"><?php echo O::escapeHtml('') ?>
+ <?php $if5=($type=='date'); if($if5) { ?>
+ <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('') ?>
+ <label class="<?php echo O::escapeHtml('or-form-row or-form-input') ?>"><?php echo O::escapeHtml('') ?>
+ <span class="<?php echo O::escapeHtml('or-form-label') ?>"><?php echo O::escapeHtml('date') ?></span>
+ <input name="<?php echo O::escapeHtml(''.@$name.'_date') ?>" type="<?php echo O::escapeHtml('date') ?>" maxlength="<?php echo O::escapeHtml('256') ?>" value="<?php echo O::escapeHtml(''.@$value.'') ?>" class="<?php echo O::escapeHtml('or-input') ?>" /><?php echo O::escapeHtml('') ?>
+ </label>
+ <label class="<?php echo O::escapeHtml('or-form-row or-form-input') ?>"><?php echo O::escapeHtml('') ?>
+ <span class="<?php echo O::escapeHtml('or-form-label') ?>"><?php echo O::escapeHtml('time') ?></span>
+ <input name="<?php echo O::escapeHtml(''.@$name.'_time') ?>" type="<?php echo O::escapeHtml('time') ?>" maxlength="<?php echo O::escapeHtml('256') ?>" value="<?php echo O::escapeHtml(''.@$value.'') ?>" class="<?php echo O::escapeHtml('or-input') ?>" /><?php echo O::escapeHtml('') ?>
+ </label>
+ </div>
+ </section>
+ <?php } ?>
+ <?php $if5=($type=='text'); if($if5) { ?>
+ <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 name="<?php echo O::escapeHtml('text') ?>" type="<?php echo O::escapeHtml('text') ?>" maxlength="<?php echo O::escapeHtml('255') ?>" value="<?php echo O::escapeHtml(''.@$value.'') ?>" class="<?php echo O::escapeHtml('or-text or-input') ?>" /><?php echo O::escapeHtml('') ?>
+ </div>
+ </section>
+ <?php } ?>
+ <?php $if5=($type=='longtext'); if($if5) { ?>
+ <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('format') ?>" value="<?php echo O::escapeHtml(''.@$format.'') ?>" /><?php echo O::escapeHtml('') ?>
+ <?php $if6=($editor=='markdown'); if($if6) { ?>
+ <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><?php echo O::escapeHtml('') ?>
+ <textarea name="<?php echo O::escapeHtml(''.@$name.'') ?>" class="<?php echo O::escapeHtml('or-input or-editor or-markdown-editor') ?>"><?php echo O::escapeHtml(''.@$value.'') ?></textarea>
+ <trix-editor input="<?php echo O::escapeHtml(''.@$name.'') ?>"><?php echo O::escapeHtml('') ?></trix-editor>
+ </div>
+ </div>
+ </section>
+ <?php } ?>
+ <?php $if6=($editor=='html'); if($if6) { ?>
+ <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><?php echo O::escapeHtml('') ?>
+ <textarea name="<?php echo O::escapeHtml(''.@$name.'') ?>" id="<?php echo O::escapeHtml('pageelement_edit_editor') ?>" class="<?php echo O::escapeHtml('or-input or-editor or-html-editor') ?>"><?php echo ''.@$value.'' ?></textarea>
+ <trix-editor input="<?php echo O::escapeHtml(''.@$name.'') ?>"><?php echo O::escapeHtml('') ?></trix-editor>
+ </div>
+ </div>
+ </section>
+ <?php } ?>
+ <?php $if6=($editor=='wiki'); if($if6) { ?>
+ <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><?php echo O::escapeHtml('') ?>
+ <textarea name="<?php echo O::escapeHtml(''.@$name.'') ?>" class="<?php echo O::escapeHtml('or-input or-editor or-wiki-editor') ?>"><?php echo ''.@$value.'' ?></textarea>
+ <trix-editor input="<?php echo O::escapeHtml(''.@$name.'') ?>"><?php echo O::escapeHtml('') ?></trix-editor>
+ </div>
+ </div>
+ </section>
+ <?php } ?>
+ <?php $if6=($editor=='text'); if($if6) { ?>
+ <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('') ?>
+ <textarea name="<?php echo O::escapeHtml(''.@$name.'') ?>" class="<?php echo O::escapeHtml('or-input or-editor raw-editor') ?>"><?php echo O::escapeHtml(''.@$value.'') ?></textarea>
+ </div>
+ </section>
+ <?php } ?>
+ <?php } ?>
+ <?php $if5=($type=='link'); if($if5) { ?>
+ <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('link_target').'') ?></h3>
+ <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?>
+ <div class="<?php echo O::escapeHtml('or-selector or-droppable-selector') ?>"><?php echo O::escapeHtml('') ?>
+ <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('linkobjectid') ?>" value="<?php echo O::escapeHtml(''.@$linkobjectid.'') ?>" class="<?php echo O::escapeHtml('or-selector-link-value') ?>" /><?php echo O::escapeHtml('') ?>
+ <input type="<?php echo O::escapeHtml('text') ?>" name="<?php echo O::escapeHtml('linkobjectid_text') ?>" placeholder="<?php echo O::escapeHtml(''.@$name.'') ?>" value="<?php echo O::escapeHtml(''.@$name.'') ?>" class="<?php echo O::escapeHtml('or-input or-selector-link-name or-act-selector-search') ?>" /><?php echo O::escapeHtml('') ?>
+ <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--menu-tree or-act-selector-tree-button') ?>"><?php echo O::escapeHtml('') ?></i>
+ <div class="<?php echo O::escapeHtml('or-dropdown or-act-selector-search-results') ?>"><?php echo O::escapeHtml('') ?></div>
+ <div type="<?php echo O::escapeHtml('hidden') ?>" data-types="<?php echo O::escapeHtml(''.@$types.'') ?>" data-init-id="<?php echo O::escapeHtml(''.@$linkobjectid.'') ?>" data-init-folderid="<?php echo O::escapeHtml(''.@$rootfolderid.'') ?>" class="<?php echo O::escapeHtml('or-navtree or-selector-tree or-act-load-selector-tree') ?>"><?php echo O::escapeHtml('') ?></div>
+ </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('link_url').'') ?></h3>
+ <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?>
+ <input name="<?php echo O::escapeHtml('linkurl') ?>" type="<?php echo O::escapeHtml('text') ?>" maxlength="<?php echo O::escapeHtml('256') ?>" value="<?php echo O::escapeHtml(''.@$linkurl.'') ?>" class="<?php echo O::escapeHtml('or-input') ?>" /><?php echo O::escapeHtml('') ?>
+ </div>
+ </section>
+ <?php } ?>
+ <?php $if5=($type=='insert'); if($if5) { ?>
+ <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('') ?>
+ <select name="<?php echo O::escapeHtml(''.@$name.'') ?>" size="<?php echo O::escapeHtml('1') ?>" class="<?php echo O::escapeHtml('or-input') ?>"><?php echo O::escapeHtml('') ?>
+ <?php foreach($objects as $_key=>$_value) { ?>
+ <option value="<?php echo O::escapeHtml(''.@$_key.'') ?>" <?php if($_key==$value){ ?>selected="<?php echo O::escapeHtml('selected') ?>"<?php } ?>><?php echo O::escapeHtml(''.@$_value.'') ?></option>
+ <?php } ?>
+ </select>
+ </div>
+ </section>
+ <?php } ?>
+ <?php $if5=($type=='number'); if($if5) { ?>
+ <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-') ?>"><?php echo O::escapeHtml('') ?>
+ <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('decimals') ?>" value="<?php echo O::escapeHtml('decimals') ?>" /><?php echo O::escapeHtml('') ?>
+ <input name="<?php echo O::escapeHtml(''.@$name.'') ?>" type="<?php echo O::escapeHtml('text') ?>" maxlength="<?php echo O::escapeHtml('20') ?>" value="<?php echo O::escapeHtml(''.@$value.'') ?>" class="<?php echo O::escapeHtml('or-input') ?>" /><?php echo O::escapeHtml('') ?>
+ </div>
+ </div>
+ </section>
+ <?php } ?>
+ <?php $if5=($type=='select'); if($if5) { ?>
+ <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('') ?>
+ <select name="<?php echo O::escapeHtml(''.@$name.'') ?>" size="<?php echo O::escapeHtml('1') ?>" class="<?php echo O::escapeHtml('or-input') ?>"><?php echo O::escapeHtml('') ?>
+ <?php foreach($items as $_key=>$_value) { ?>
+ <option value="<?php echo O::escapeHtml(''.@$_key.'') ?>" <?php if($_key==$value){ ?>selected="<?php echo O::escapeHtml('selected') ?>"<?php } ?>><?php echo O::escapeHtml(''.@$_value.'') ?></option>
+ <?php } ?>
+ </select>
+ </div>
+ </section>
+ <?php } ?>
+ </div>
+ </section>
+ <?php } ?>
+ <section class="<?php echo O::escapeHtml('or-group or-collapsible or-collapsible--is-open or-collapsible--is-visible 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('options').'') ?></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('') ?></h3>
+ <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?>
+ <?php $if5=(isset($release)); if($if5) { ?>
+ <div class="<?php echo O::escapeHtml('or-') ?>"><?php echo O::escapeHtml('') ?>
+ <label><?php echo O::escapeHtml('') ?>
+ <input type="<?php echo O::escapeHtml('checkbox') ?>" data-name="<?php echo O::escapeHtml('release') ?>" value="<?php echo O::escapeHtml('1') ?>" <?php if(@$release){ ?>checked="<?php echo O::escapeHtml('checked') ?>"<?php } ?> class="<?php echo O::escapeHtml('or-form-checkbox or-remember') ?>" /><?php echo O::escapeHtml('') ?>
+ <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('release') ?>" <?php if(@$release){ ?>value="<?php echo O::escapeHtml('1') ?>"<?php } ?> /><?php echo O::escapeHtml('') ?>
+ <span class="<?php echo O::escapeHtml('or-form-label') ?>"><?php echo O::escapeHtml(''.@O::lang('RELEASE').'') ?></span>
+ </label>
+ </div>
+ <?php } ?>
+ <?php $if5=(isset($publish)); if($if5) { ?>
+ <div class="<?php echo O::escapeHtml('or-') ?>"><?php echo O::escapeHtml('') ?>
+ <label><?php echo O::escapeHtml('') ?>
+ <input type="<?php echo O::escapeHtml('checkbox') ?>" data-name="<?php echo O::escapeHtml('publish') ?>" value="<?php echo O::escapeHtml('1') ?>" <?php if(@$publish){ ?>checked="<?php echo O::escapeHtml('checked') ?>"<?php } ?> class="<?php echo O::escapeHtml('or-form-checkbox or-remember') ?>" /><?php echo O::escapeHtml('') ?>
+ <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('publish') ?>" <?php if(@$publish){ ?>value="<?php echo O::escapeHtml('1') ?>"<?php } ?> /><?php echo O::escapeHtml('') ?>
+ <span class="<?php echo O::escapeHtml('or-form-label') ?>"><?php echo O::escapeHtml(''.@O::lang('PAGE_PUBLISH_AFTER_SAVE').'') ?></span>
+ </label>
+ </div>
+ <?php } ?>
+ </div>
+ </section>
+ </div>
+ </section>
+ </div>
+ <div class="<?php echo O::escapeHtml('or-form-actionbar') ?>"><?php echo O::escapeHtml('') ?>
+ <div class="<?php echo O::escapeHtml('or-btn or-btn--control 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--control 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--control 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('save').'') ?></span>
+ </div>
+ </div>
+ </form>
+\ No newline at end of file
diff --git a/modules/cms/ui/themes/default/html/views/pageelement/all.tpl.src.xml b/modules/cms/ui/themes/default/html/views/pageelement/all.tpl.src.xml
@@ -0,0 +1,139 @@
+<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 method="post" label="${message:save}" apply="true">
+ <hidden name="elementid" />
+ <hidden name="value_time" />
+
+ <list list="${elements}" extract="true">
+
+ <group title="${label}" description="${desc}">
+ <if value="${type}" equals="date">
+ <fieldset label="">
+ <input type="date" name="${name}_date" label="date" default="${value}" />
+ <input type="time" name="${name}_time" label="time" default="${value}" />
+ </fieldset>
+ </if>
+ <if value="${type}" equals="text">
+ <fieldset>
+ <input size="50" maxlength="255" class="text" name="text" default="${value}" />
+ </fieldset>
+ </if>
+ <if value="${type}" equals="longtext">
+ <hidden name="format"/>
+ <if value="${editor}" equals="markdown">
+ <fieldset>
+ <editor type="markdown" name="${name}" default="${value}" />
+ </fieldset>
+ </if>
+ <if value="${editor}" equals="html">
+ <fieldset>
+ <editor type="html" name="${name}" default="${value}" />
+ </fieldset>
+ </if>
+ <if value="${editor}" equals="wiki">
+ <fieldset>
+ <editor type="wiki" name="${name}" default="${value}"/>
+
+ <!--
+ <group title="${message:help}" open="false">
+ <table filter="false">
+ <column>
+ <text value="${config:editor/text-markup/strong-begin}"/>
+ <text value="${message:text_markup_strong}"/>
+ <text value="${config:editor/text-markup/strong-end}"/>
+ <newline/>
+ <text value="${config:editor/text-markup/emphatic-begin}"/>
+ <text value="${message:text_markup_emphatic}"/>
+ <text value="${config:editor/text-markup/emphatic-end}"/>
+ </column>
+ <column>
+ <text value="${config:editor/text-markup/list-numbered}"/>
+ <text value="${message:text_markup_numbered_list}"/>
+ <newline/>
+ <text value="${config:editor/text-markup/list-numbered}"/>
+ <text value="..."/>
+ <newline/>
+ </column>
+ <column>
+ <text value="${config:editor/text-markup/list-unnumbered}"/>
+ <text value="${message:text_markup_unnumbered_list}"/>
+ <newline/>
+ <text value="${config:editor/text-markup/list-unnumbered}"/>
+ <text value="..."/>
+ <newline/>
+ </column>
+ <column>
+ <text value="${config:editor/text-markup/table-cell-sep}"/>
+ <text value="${message:text_markup_table}"/>
+ <text value="${config:editor/text-markup/table-cell-sep}"/>
+ <text value="..."/>
+ <text value="${config:editor/text-markup/table-cell-sep}"/>
+ <text value="..."/>
+ <text value="${config:editor/text-markup/table-cell-sep}"/>
+ <newline/>
+ <text value="${config:editor/text-markup/table-cell-sep}"/>
+ <text value="..."/>
+ <text value="${config:editor/text-markup/table-cell-sep}"/>
+ <text value="..."/>
+ <text value="${config:editor/text-markup/table-cell-sep}"/>
+ <text value="..."/>
+ <text value="${config:editor/text-markup/table-cell-sep}"/>
+ <newline/>
+ </column>
+ </table>
+ </group>-->
+ </fieldset>
+ </if>
+ <if value="${editor}" equals="text">
+ <fieldset>
+ <inputarea class="editor raw-editor" name="${name}" default="${value}" rows="25" cols="70" />
+ </fieldset>
+ </if>
+ </if>
+ <if value="${type}" equals="link">
+ <fieldset label="${message:link_target}">
+ <selector param="linkobjectid" types="${types}" name="${name}" id="${linkobjectid}"
+ folderid="${rootfolderid}"/>
+ </fieldset>
+ <fieldset label="${message:link_url}">
+ <input name="linkurl"/>
+ </fieldset>
+ </if>
+ <if value="${type}" equals="insert">
+ <fieldset>
+ <selectbox list="objects" name="${name}" default="${value}" />
+ </fieldset>
+ </if>
+ <if value="${type}" equals="number">
+ <fieldset>
+ <part>
+ <hidden name="decimals" default="decimals"/>
+ <input size="15" maxlength="20" name="${name}" default="${value}"/>
+ </part>
+ </fieldset>
+ </if>
+ <if value="${type}" equals="select">
+ <fieldset>
+ <selectbox list="items" name="${name}" default="${value}" />
+ </fieldset>
+ </if>
+ </group>
+ </list>
+
+
+ <group title="${message:options}">
+ <fieldset>
+ <if present="release">
+ <part>
+ <checkbox name="release" label="${message:RELEASE}" remember="true"/>
+ </part>
+ </if>
+ <if present="publish">
+ <part>
+ <checkbox name="publish" label="${message:PAGE_PUBLISH_AFTER_SAVE}" remember="true"/>
+ </part>
+ </if>
+ </fieldset>
+ </group>
+ </form>
+</output>