openrat-cms

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

commit 1ffe962ba47c625ddb30a99753bc7b5a00e34d94
parent ff9436ba5683f1cbe85533a6f082737981620bdf
Author: Jan Dankert <devnull@localhost>
Date:   Sat, 19 Nov 2011 14:14:06 +0100

Aufräumen der TemplateAction: Templates angepasst, Controller korrigiert.

Diffstat:
action/TemplateAction.class.php | 26+++++++++++++-------------
themes/default/templates/template/addel.tpl.src.xml | 4++++
themes/default/templates/template/edit.tpl.src.xml | 12++++++++++++
themes/default/templates/template/el.tpl.src.xml | 4++++
themes/default/templates/template/listing.tpl.src.xml | 29+++++++++++++++++++++++++++++
themes/default/templates/template/name.tpl.src.xml | 4++++
themes/default/templates/template/prop.tpl.src.xml | 5+++++
themes/default/templates/template/remove.tpl.src.xml | 4++++
themes/default/templates/template/src.tpl.src.xml | 4++++
themes/default/templates/template/srcelement.tpl.src.xml | 4++++
10 files changed, 83 insertions(+), 13 deletions(-)

diff --git a/action/TemplateAction.class.php b/action/TemplateAction.class.php @@ -52,7 +52,7 @@ class TemplateAction extends Action } - function savesrc() + function srcAction() { // Speichern des Quelltextes // @@ -78,7 +78,7 @@ class TemplateAction extends Action - function srcaddelement() + function srcelementAction() { $text = $this->template->src; @@ -117,7 +117,7 @@ class TemplateAction extends Action // Speichern der Template-Eigenschaftens // - function savename() + function nameAction() { if ($this->getRequestVar('name') == "") @@ -137,7 +137,7 @@ class TemplateAction extends Action // Speichern der Template-Eigenschaftens // - function delete() + function removeAction() { if ( $this->getRequestVar('delete') != '' ) { @@ -154,7 +154,7 @@ class TemplateAction extends Action /** * Entfernen der Vorlage */ - function remove() + function removeView() { $this->setTemplateVar('name',$this->template->name); } @@ -194,7 +194,7 @@ class TemplateAction extends Action } - function addel() + function addelView() { // Die verschiedenen Element-Typen $types = array(); @@ -216,7 +216,7 @@ class TemplateAction extends Action /* * Neues Element hinzufuegen. */ - function addelement() + function addelAction() { $name = $this->getRequestVar('name',OR_FILTER_ALPHANUM); @@ -245,7 +245,7 @@ class TemplateAction extends Action /** * Vorlage hinzuf�gen. */ - function add() + function addView() { $this->setTemplateVar( 'templates',Template::getAll() ); @@ -264,7 +264,7 @@ class TemplateAction extends Action - function addtemplate() + function addAction() { // Hinzufuegen eines Templates if ( $this->getRequestVar('name') == '' ) @@ -380,7 +380,7 @@ class TemplateAction extends Action /** * Eigenschaften einer Vorlage anzeigen */ - function name() + function nameView() { $this->setTemplateVar('name' ,$this->template->name ); $this->setTemplateVar('extension',$this->template->extension ); @@ -502,7 +502,7 @@ class TemplateAction extends Action // Anzeigen der Template-Elemente // - function el() + function elView() { global $conf_php; $list = array(); @@ -525,7 +525,7 @@ class TemplateAction extends Action - function srcelement() + function srcelementView() { $elements = array(); $writable_elements = array(); @@ -550,7 +550,7 @@ class TemplateAction extends Action /** * Anzeigen des Template-Quellcodes */ - function src() + function srcView() { if ( $this->isEditMode() ) { diff --git a/themes/default/templates/template/addel.tpl.src.xml b/themes/default/templates/template/addel.tpl.src.xml @@ -0,0 +1,3 @@ +<output xmlns="http://www.openrat.de/template" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><form><window name="GLOBAL_TEMPLATES"><row><cell><text text="global_name"></text></cell><cell><input name="name"></input></cell></row><row><cell><text text="element_type"></text></cell><cell><set var="text" value="text"></set><selectbox list="types" default="text" name="type" lang="true"></selectbox></cell></row><row><cell colspan="2"><fieldset title="message:options"></fieldset></cell></row><row><cell></cell><cell><label for="addtotemplate"><checkbox name="addtotemplate" default="true"></checkbox><text key="menu_template_srcelement"></text></label></cell></row><row><cell class="act" colspan="2"><button type="ok"></button></cell></row></window><focus field="name"></focus></form></dummy></output>+ \ No newline at end of file diff --git a/themes/default/templates/template/edit.tpl.src.xml b/themes/default/templates/template/edit.tpl.src.xml @@ -0,0 +1,11 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <header views="src,addel,srcelement,el,remove"></header> + <window name="TEMPLATE_SHOW"> + <row> + <cell> + <text var="text" escape="false" type="code"></text> + </cell> + </row> + </window> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/template/el.tpl.src.xml b/themes/default/templates/template/el.tpl.src.xml @@ -0,0 +1,3 @@ +<output xmlns="http://www.openrat.de/template" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><window><table><row class="headline"><cell><text key="name"></text></cell><cell><text key="type"></text></cell></row><list list="el" extract="true"><row class="data"><cell url="var:url"><image elementtype="var:type"></image><text var="name"></text></cell><cell><text key="var:type" prefix="EL_"></text></cell></row></list><row><cell class="data"><link class="action" action="template" subaction="addel"><text key="menu_template_addel"></text></link></cell></row><if empty="el"><row><cell colspan="2"><text key="GLOBAL_NOT_FOUND"></text></cell></row></if></table></window></dummy></output>+ \ No newline at end of file diff --git a/themes/default/templates/template/listing.tpl.src.xml b/themes/default/templates/template/listing.tpl.src.xml @@ -0,0 +1,28 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <header views="add"></header> + <dummy> + <window name="GLOBAL_TEMPLATES"> + <table> + <row class="headline"> + <cell> + <text key="name"></text> + </cell> + </row> + <list list="templates" extract="true"> + <row class="data"> + <cell url="var:url"> + <text var="name"></text> + </cell> + </row> + </list> + </table> + <if empty="templates"> + <text text="GLOBAL_NO_TEMPLATES_AVAILABLE_DESC"></text> + </if> + <link class="action" action="template" subaction="add"> + <text key="menu_template_add"></text> + </link> + </window> + </dummy> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/template/name.tpl.src.xml b/themes/default/templates/template/name.tpl.src.xml @@ -0,0 +1,3 @@ +<output xmlns="http://www.openrat.de/template" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><form><window name="GLOBAL_PROP"><row><cell><text text="TEMPLATE_NAME"></text></cell><cell><input name="name"></input></cell></row><row><cell colspan="2"><fieldset></fieldset></cell></row><row><cell><text key="file_extension"></text></cell><cell><link action="template" subaction="extension"><text var="extension"></text></link></cell></row><row><cell><text key="file_mimetype"></text></cell><cell><link action="template" subaction="extension"><text var="mime_type"></text></link></cell></row><row><cell colspan="2" class="act"><button type="ok"></button></cell></row></window></form><focus field="name"></focus></dummy></output>+ \ No newline at end of file diff --git a/themes/default/templates/template/prop.tpl.src.xml b/themes/default/templates/template/prop.tpl.src.xml @@ -0,0 +1,4 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <header views="name"></header> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/template/remove.tpl.src.xml b/themes/default/templates/template/remove.tpl.src.xml @@ -0,0 +1,3 @@ +<output xmlns="http://www.openrat.de/template" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><form><window icon="template"><row><cell><text text="GLOBAL_NAME"></text></cell><cell><text var="name"></text></cell></row><row><cell colspan="2"><fieldset title="message:options"></fieldset></cell></row><row><cell colspan="2"><checkbox name="delete"></checkbox><label for="delete"><text text="CONFIRM_DELETE"></text></label></cell></row><row><cell colspan="2" class="act"><button type="ok"></button></cell></row></window></form><focus field="delete"></focus></dummy></output>+ \ No newline at end of file diff --git a/themes/default/templates/template/src.tpl.src.xml b/themes/default/templates/template/src.tpl.src.xml @@ -0,0 +1,3 @@ +<output xmlns="http://www.openrat.de/template" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><form><window name="TEMPLATE_SOURCE"><row><cell><inputarea rows="25" cols="80" name="src" class="editor"></inputarea></cell></row><row><cell class="act"><button type="ok"></button><if false="mode:edit"><link class="action" action="template" subaction="srcelement"><text key="menu_template_srcelement"></text></link></if></cell></row></window></form><focus field="src"></focus></dummy></output>+ \ No newline at end of file diff --git a/themes/default/templates/template/srcelement.tpl.src.xml b/themes/default/templates/template/srcelement.tpl.src.xml @@ -0,0 +1,3 @@ +<output xmlns="http://www.openrat.de/template" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><form><window widths="10px,150px"><if present="elements"><row><cell><radio name="type" value="addelement"></radio></cell><cell><label for="type_addelement"><text key="value"></text></label></cell><cell><selectbox name="elementid" list="elements"></selectbox></cell></row></if><if present="writable_elements"><row><cell colspan="3"><fieldset></fieldset></cell></row><row><cell><radio name="type" value="addicon"></radio></cell><cell><label for="type_addicon"><text key="GLOBAL_ICON"></text></label></cell><cell rowspan="3"><selectbox name="writable_elementid" list="writable_elements"></selectbox></cell></row><row><cell><radio name="type" value="addifempty"></radio></cell><cell><label for="type_addifempty"><text key="TEMPLATE_SRC_IFEMPTY"></text></label></cell></row><row><cell><radio name="type" value="addifnotempty"></radio></cell><cell><label for="type_addifnotempty"><text key="TEMPLATE_SRC_IFEMPTY"></text></label></cell></row></if><row><cell colspan="3" class="act"><button type="ok"></button></cell></row></window></form></dummy></output>+ \ No newline at end of file