openrat-cms

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

commit 9b7d03a45937436830e1e0b72dc3f0fff3cf7cb7
parent d13d7939f50cc4088e1642b65794def354ec86ea
Author: Jan Dankert <devnull@localhost>
Date:   Sat, 19 Nov 2011 13:52:42 +0100

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

Diffstat:
action/ElementAction.class.php | 17+++++++++--------
themes/default/templates/element/delete.tpl.src.xml | 4++++
themes/default/templates/element/edit.tpl.src.xml | 33+++++++++++++++++++++++++++++++++
themes/default/templates/element/name.tpl.src.xml | 32--------------------------------
themes/default/templates/element/prop.tpl.src.xml | 4++++
themes/default/templates/element/properties.tpl.src.xml | 4----
themes/default/templates/element/remove.tpl.src.xml | 4----
themes/default/templates/element/type.tpl.src.xml | 24++++++++++++++++++++----
8 files changed, 70 insertions(+), 52 deletions(-)

diff --git a/action/ElementAction.class.php b/action/ElementAction.class.php @@ -44,7 +44,7 @@ class ElementAction extends Action /** * Umbenennen des Elementes */ - function savename() + function editAction() { $this->element->name = $this->getRequestVar('name' ,OR_FILTER_ALPHANUM); $this->element->desc = $this->getRequestVar('description','all' ); @@ -60,7 +60,7 @@ class ElementAction extends Action /** * Umbenennen des Elementes */ - function remove() + function deleteView() { $this->setTemplateVar( 'name' ,$this->element->name ); } @@ -69,7 +69,7 @@ class ElementAction extends Action /** * Entfernen des Elementes */ - function delete() + function deleteAction() { if ( !$this->hasRequestVar('confirm') ) { @@ -96,7 +96,7 @@ class ElementAction extends Action /** * Aendern des Element-Typs */ - function savetype() + function typeAction() { if ( !$this->userIsAdmin() && $this->getRequestVar('type') == 'code' ) { @@ -115,7 +115,7 @@ class ElementAction extends Action /** * Anzeigen des Elementes */ - function name() + function editView() { // Name und Beschreibung @@ -126,7 +126,8 @@ class ElementAction extends Action - function type() + function typeView + () { // Die verschiedenen Element-Typen $types = array(); @@ -150,7 +151,7 @@ class ElementAction extends Action * Auswahlmaske f�r weitere Einstellungen zum Template-Element. * */ - function properties() + function propView() { global $conf; @@ -588,7 +589,7 @@ class ElementAction extends Action /** * Speichern der Element-Eigenschaften */ - function saveproperties() + function propAction() { global $conf; $ini_date_format = $conf['date']['format']; diff --git a/themes/default/templates/element/delete.tpl.src.xml b/themes/default/templates/element/delete.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><row><cell><text text="ELEMENT_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="confirm"></checkbox><label for="confirm"><text text="CONFIRM_DELETE"></text></label></cell></row><row><cell colspan="2"><label for="type_value"><text raw="_____"></text><radio name="type" value="value" default="value"></radio><text text="ELEMENT_DELETE_VALUES"></text></label><newline></newline><label for="type_all"><text raw="_____"></text><radio name="type" value="all"></radio><text text="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/element/edit.tpl.src.xml b/themes/default/templates/element/edit.tpl.src.xml @@ -0,0 +1,32 @@ +<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="type,delete"></header> + <dummy> + <form> + <window name="GLOBAL_NAME"> + <row> + <cell> + <text text="ELEMENT_NAME"></text> + </cell> + <cell> + <input name="name"></input> + </cell> + </row> + <row> + <cell> + <text text="GLOBAL_DESCRIPTION"></text> + </cell> + <cell> + <inputarea name="description" rows="5" cols="50"></inputarea> + </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/element/name.tpl.src.xml b/themes/default/templates/element/name.tpl.src.xml @@ -1,31 +0,0 @@ -<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> - <dummy> - <form> - <window name="GLOBAL_NAME"> - <row> - <cell> - <text text="ELEMENT_NAME"></text> - </cell> - <cell> - <input name="name"></input> - </cell> - </row> - <row> - <cell> - <text text="GLOBAL_DESCRIPTION"></text> - </cell> - <cell> - <inputarea name="description" rows="5" cols="50"></inputarea> - </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/element/prop.tpl.src.xml b/themes/default/templates/element/prop.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_PREFS" widths="30%,70%"><if present="subtype"><row><cell><text text="ELEMENT_SUBTYPE"></text></cell><cell><if present="subtypes"><selectbox name="subtype" list="subtypes" addempty="true"></selectbox></if><if not="true" present="subtypes"><input name="subtype"></input></if></cell></row></if><if present="with_icon"><row><cell><text text="EL_PROP_WITH_ICON"></text></cell><cell><checkbox name="with_icon"></checkbox></cell></row></if><if present="all_languages"><row><cell><text text="EL_PROP_ALL_LANGUAGES"></text></cell><cell><checkbox name="all_languages"></checkbox></cell></row></if><if present="writable"><row><cell><text text="EL_PROP_writable"></text></cell><cell><checkbox name="writable"></checkbox></cell></row></if><if present="width"><row><cell><text text="width"></text></cell><cell><input size="10" name="width"></input></cell></row></if><if present="height"><row><cell><text text="height"></text></cell><cell><input size="10" name="height"></input></cell></row></if><if present="dateformat"><row><cell><text text="EL_PROP_DATEFORMAT"></text></cell><cell><selectbox name="dateformat" list="dateformats"></selectbox></cell></row></if><if present="format"><row><cell><text text="EL_PROP_FORMAT"></text></cell><cell><radiobox name="format" list="formatlist"></radiobox></cell></row></if><if present="decimals"><row><cell><text text="EL_PROP_DECIMALS"></text></cell><cell><input size="10" maxlength="2" name="decimals"></input></cell></row></if><if present="dec_point"><row><cell><text text="EL_PROP_DEC_POINT"></text></cell><cell><input size="10" maxlength="5" name="dec_point"></input></cell></row></if><if present="thousand_sep"><row><cell><text text="EL_PROP_thousand_sep"></text></cell><cell><input size="10" maxlength="1" name="thousand_sep"></input></cell></row></if><if present="default_text"><row><cell><text text="EL_PROP_default_text"></text></cell><cell><input size="40" maxlength="255" name="default_text"></input></cell></row></if><if present="default_longtext"><row><cell><text text="EL_PROP_default_longtext"></text></cell><cell><inputarea rows="10" cols="40" name="default_longtext"></inputarea></cell></row></if><if present="parameters"><row><cell><text text="EL_PROP_DYNAMIC_PARAMETERS"></text></cell><cell><inputarea rows="15" cols="40" name="parameters"></inputarea></cell></row><row><cell></cell><cell><list list="dynamic_class_parameters" key="paramName" value="defaultValue"><text var="paramName"></text><text raw="_("></text><text text="GLOBAL_DEFAULT"></text><text raw=")_=_"></text><text var="defaultValue"></text><newline></newline></list></cell></row></if><if present="select_items"><row><cell><text text="EL_PROP_select_items"></text></cell><cell><inputarea rows="15" cols="40" name="select_items"></inputarea></cell></row></if><if present="linkelement"><row><cell><text text="EL_LINK"></text></cell><cell><selectbox name="linkelement" list="linkelements"></selectbox></cell></row></if><if present="name"><row><cell><text text="ELEMENT_NAME"></text></cell><cell><selectbox name="name" list="names"></selectbox></cell></row></if><if present="folderobjectid"><row><cell><text text="EL_PROP_DEFAULT_FOLDEROBJECT"></text></cell><cell><selectbox name="folderobjectid" list="folders"></selectbox></cell></row></if><if present="default_objectid"><row><cell><text text="EL_PROP_DEFAULT_OBJECT"></text></cell><cell><selectbox name="default_objectid" list="objects" addempty="true"></selectbox></cell></row></if><if present="code"><row><cell><text text="EL_PROP_code"></text></cell><cell><inputarea name="code" rows="35" cols="60"></inputarea></cell></row></if><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/element/properties.tpl.src.xml b/themes/default/templates/element/properties.tpl.src.xml @@ -1,3 +0,0 @@ -<output xmlns="http://www.openrat.de/template" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><form><window name="GLOBAL_PREFS" widths="30%,70%"><if present="subtype"><row><cell><text text="ELEMENT_SUBTYPE"></text></cell><cell><if present="subtypes"><selectbox name="subtype" list="subtypes" addempty="true"></selectbox></if><if not="true" present="subtypes"><input name="subtype"></input></if></cell></row></if><if present="with_icon"><row><cell><text text="EL_PROP_WITH_ICON"></text></cell><cell><checkbox name="with_icon"></checkbox></cell></row></if><if present="all_languages"><row><cell><text text="EL_PROP_ALL_LANGUAGES"></text></cell><cell><checkbox name="all_languages"></checkbox></cell></row></if><if present="writable"><row><cell><text text="EL_PROP_writable"></text></cell><cell><checkbox name="writable"></checkbox></cell></row></if><if present="width"><row><cell><text text="width"></text></cell><cell><input size="10" name="width"></input></cell></row></if><if present="height"><row><cell><text text="height"></text></cell><cell><input size="10" name="height"></input></cell></row></if><if present="dateformat"><row><cell><text text="EL_PROP_DATEFORMAT"></text></cell><cell><selectbox name="dateformat" list="dateformats"></selectbox></cell></row></if><if present="format"><row><cell><text text="EL_PROP_FORMAT"></text></cell><cell><radiobox name="format" list="formatlist"></radiobox></cell></row></if><if present="decimals"><row><cell><text text="EL_PROP_DECIMALS"></text></cell><cell><input size="10" maxlength="2" name="decimals"></input></cell></row></if><if present="dec_point"><row><cell><text text="EL_PROP_DEC_POINT"></text></cell><cell><input size="10" maxlength="5" name="dec_point"></input></cell></row></if><if present="thousand_sep"><row><cell><text text="EL_PROP_thousand_sep"></text></cell><cell><input size="10" maxlength="1" name="thousand_sep"></input></cell></row></if><if present="default_text"><row><cell><text text="EL_PROP_default_text"></text></cell><cell><input size="40" maxlength="255" name="default_text"></input></cell></row></if><if present="default_longtext"><row><cell><text text="EL_PROP_default_longtext"></text></cell><cell><inputarea rows="10" cols="40" name="default_longtext"></inputarea></cell></row></if><if present="parameters"><row><cell><text text="EL_PROP_DYNAMIC_PARAMETERS"></text></cell><cell><inputarea rows="15" cols="40" name="parameters"></inputarea></cell></row><row><cell></cell><cell><list list="dynamic_class_parameters" key="paramName" value="defaultValue"><text var="paramName"></text><text raw="_("></text><text text="GLOBAL_DEFAULT"></text><text raw=")_=_"></text><text var="defaultValue"></text><newline></newline></list></cell></row></if><if present="select_items"><row><cell><text text="EL_PROP_select_items"></text></cell><cell><inputarea rows="15" cols="40" name="select_items"></inputarea></cell></row></if><if present="linkelement"><row><cell><text text="EL_LINK"></text></cell><cell><selectbox name="linkelement" list="linkelements"></selectbox></cell></row></if><if present="name"><row><cell><text text="ELEMENT_NAME"></text></cell><cell><selectbox name="name" list="names"></selectbox></cell></row></if><if present="folderobjectid"><row><cell><text text="EL_PROP_DEFAULT_FOLDEROBJECT"></text></cell><cell><selectbox name="folderobjectid" list="folders"></selectbox></cell></row></if><if present="default_objectid"><row><cell><text text="EL_PROP_DEFAULT_OBJECT"></text></cell><cell><selectbox name="default_objectid" list="objects" addempty="true"></selectbox></cell></row></if><if present="code"><row><cell><text text="EL_PROP_code"></text></cell><cell><inputarea name="code" rows="35" cols="60"></inputarea></cell></row></if><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/element/remove.tpl.src.xml b/themes/default/templates/element/remove.tpl.src.xml @@ -1,3 +0,0 @@ -<output xmlns="http://www.openrat.de/template" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><dummy><form><window><row><cell><text text="ELEMENT_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="confirm"></checkbox><label for="confirm"><text text="CONFIRM_DELETE"></text></label></cell></row><row><cell colspan="2"><label for="type_value"><text raw="_____"></text><radio name="type" value="value" default="value"></radio><text text="ELEMENT_DELETE_VALUES"></text></label><newline></newline><label for="type_all"><text raw="_____"></text><radio name="type" value="all"></radio><text text="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/element/type.tpl.src.xml b/themes/default/templates/element/type.tpl.src.xml @@ -1,3 +1,19 @@ -<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_NAME"><row><cell><text text="ELEMENT_TYPE"></text></cell><cell><selectbox name="type" list="types" lang="true"></selectbox></cell></row><row><cell colspan="2" class="act"><button type="ok"></button></cell></row></window></form><focus field="type"></focus></dummy></output>- \ No newline at end of file +<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 back="true"></header> + <form> + <row> + <cell> + <text text="ELEMENT_TYPE"></text> + </cell> + <cell> + <selectbox name="type" list="types" lang="true"></selectbox> + </cell> + </row> + <row> + <cell colspan="2" class="act"> + <button type="ok"></button> + </cell> + </row> + </form> +</output>+ \ No newline at end of file