openrat-cms

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

commit 6f6a1e3a6e2d75a146255ac2c5bd65de3b959c49
parent 9ed1b67bb3db9df4d0d321e0f3d84b5bc7068a9b
Author: Jan Dankert <devnull@localhost>
Date:   Wed, 21 Mar 2012 22:07:13 +0100

Fix: Modell hinzuf├╝gen.

Diffstat:
action/ModelAction.class.php | 21---------------------
action/ModellistAction.class.php | 63++++++++++++++++++++++++++-------------------------------------
themes/default/pages/html/modellist/add.tpl.php | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/pages/html/modellist/show.tpl.php | 338+++++++++++++++++++++++++++++++------------------------------------------------
themes/default/templates/model/add.tpl.src.php | 13-------------
themes/default/templates/model/add.tpl.src.xml | 15---------------
themes/default/templates/modellist/add.tpl.src.xml | 15+++++++++++++++
themes/default/templates/modellist/show.tpl.src.xml | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++----
8 files changed, 300 insertions(+), 296 deletions(-)

diff --git a/action/ModelAction.class.php b/action/ModelAction.class.php @@ -77,27 +77,6 @@ class ModelAction extends Action } - function addView() - { - } - - - function addPost() - { - $model = new Model(); - $model->projectid = $this->project->projectid; - $model->name = $this->getRequestVar('name'); - $model->add(); - - // Wenn kein Namen eingegeben, dann einen setzen. - if ( empty($model->name) ) - { - // Name ist "Variante <id>" - $model->name = lang('MODEL').' '.$model->modelid; - $model->save(); - } - } - /** diff --git a/action/ModellistAction.class.php b/action/ModellistAction.class.php @@ -1,7 +1,4 @@ <?php -// --------------------------------------------------------------------------- -// $Id$ -// --------------------------------------------------------------------------- // OpenRat Content Management System // Copyright (C) 2002-2004 Jan Dankert, cms@jandankert.de // @@ -18,39 +15,6 @@ // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// --------------------------------------------------------------------------- -// $Log$ -// Revision 1.10 2007-05-08 20:25:58 dankert -// Erweiterung der Methode "checkmenu()" -// -// Revision 1.9 2007-05-08 20:21:03 dankert -// ?berschreiben der Methode "checkmenu()" -// -// Revision 1.8 2007-04-08 21:18:16 dankert -// Korrektur URL in listing() -// -// Revision 1.7 2007/01/21 22:27:49 dankert -// Direkt Punkt "Bearbeiten" ?ffnen. -// -// Revision 1.6 2006/01/29 17:18:58 dankert -// Steuerung der Aktionsklasse ?ber .ini-Datei, dazu umbenennen einzelner Methoden -// -// Revision 1.5 2004/12/19 14:55:27 dankert -// Anpassung von urls -// -// Revision 1.4 2004/12/13 22:17:51 dankert -// URL-Korrektur -// -// Revision 1.3 2004/05/07 21:37:31 dankert -// Url ?ber Html::url erzeugen -// -// Revision 1.2 2004/05/02 14:49:37 dankert -// Einf?gen package-name (@package) -// -// Revision 1.1 2004/04/24 15:14:52 dankert -// Initiale Version -// -// --------------------------------------------------------------------------- /** @@ -109,6 +73,31 @@ class ModellistAction extends Action */ function editView() { - $this->nextSubActionsetTemplateVars('show'); + $this->nextSubAction('show'); + } + + + + + function addView() + { } + + + function addPost() + { + $model = new Model(); + $model->projectid = $this->project->projectid; + $model->name = $this->getRequestVar('name'); + $model->add(); + + // Wenn kein Namen eingegeben, dann einen setzen. + if ( empty($model->name) ) + { + // Name ist "Variante <id>" + $model->name = lang('MODEL').' '.$model->modelid; + $model->save(); + } + } + } \ No newline at end of file diff --git a/themes/default/pages/html/modellist/add.tpl.php b/themes/default/pages/html/modellist/add.tpl.php @@ -0,0 +1,74 @@ +<?php $a2_name='';$a2_back=true; ?><div class="header"> + <?php if ($a2_back) { ?> + <a href="javascript:void(0);" onclick="javascript:refreshActualView(this);" class="back button"> + <img src="<?php echo $image_dir ?>icon/window/back.gif" /> + <?php echo lang('BACK') ?> + </a> + <?php } ?><?php if(!empty($a2_views)) { ?> + <img src="<?php echo $image_dir ?>icon/window/down.gif" /> + <div class="headermenu"> + <?php foreach( explode(',',$a2_views) as $a2_tmp_view ) { ?> + <a class="entry" href="javascript:void(0);" onclick="javascript:startView(this,'<?php echo $a2_tmp_view ?>');"> + <img src="<?php echo $image_dir ?>icon/<?php echo $a2_tmp_view ?>.png" /><?php echo lang('MENU_'.$a2_tmp_view) ?> + </a> + <?php } ?> + </div> +<?php } ?> +</div><?php unset($a2_name,$a2_back) ?><?php $a2_name='';$a2_target='_self';$a2_method='post';$a2_enctype='application/x-www-form-urlencoded';$a2_type=''; ?><?php + $a2_action = $actionName; + $a2_subaction = $targetSubActionName; + $a2_id = $this->getRequestId(); + if ($this->isEditable()) + { + if ($this->isEditMode()) + { + $a2_method = 'POST'; + } + else + { + $a2_method = 'GET'; + $a2_subaction = $subActionName; + } + } + switch( $a2_type ) + { + case 'upload': + $a2_tmp_submitFunction = ''; + break; + default: + $a2_tmp_submitFunction = 'formSubmit( $(this) ); return false;'; + } +?><form name="<?php echo $a2_name ?>" + target="<?php echo $a2_target ?>" + action="<?php echo Html::url( $a2_action,$a2_subaction,$a2_id ) ?>" + method="<?php echo $a2_method ?>" + enctype="<?php echo $a2_enctype ?>" style="margin:0px;padding:0px;" + class="<?php echo $a2_action ?>" + onSubmit="<?php echo $a2_tmp_submitFunction ?>"><input type="submit" class="invisible" /> +<?php if ($this->isEditable() && !$this->isEditMode()) { ?> +<input type="hidden" name="mode" value="edit" /> +<?php } ?> +<input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /> +<input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo $this->actionName ?>" /> +<input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo $this->subActionName ?>" /> +<input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo $this->getRequestId() ?>" /><?php + if ( $conf['interface']['url_sessionid'] ) + echo '<input type="hidden" name="'.session_name().'" value="'.session_id().'" />'."\n"; +?><?php unset($a2_name,$a2_target,$a2_method,$a2_enctype,$a2_type) ?><?php $a3_class='line'; ?><div class="<?php echo $a3_class ?>"><?php unset($a3_class) ?><?php $a4_class='label'; ?><div class="<?php echo $a4_class ?>"><?php unset($a4_class) ?><?php $a5_class='text';$a5_key='global_name';$a5_escape=true;$a5_cut='both'; ?><?php + $a5_title = ''; + $tmp_tag = 'span'; +?><<?php echo $tmp_tag ?> class="<?php echo $a5_class ?>" title="<?php echo $a5_title ?>"><?php + $langF = $a5_escape?'langHtml':'lang'; + $tmp_text = $langF($a5_key); + $tmp_text = nl2br($tmp_text); + echo $tmp_text; + unset($tmp_text); +?></<?php echo $tmp_tag ?>><?php unset($a5_class,$a5_key,$a5_escape,$a5_cut) ?></div><?php $a4_class='input'; ?><div class="<?php echo $a4_class ?>"><?php unset($a4_class) ?><?php $a5_class='focus';$a5_default='';$a5_type='text';$a5_name='name';$a5_size='';$a5_maxlength='256';$a5_onchange='';$a5_readonly=false; ?><?php if ($this->isEditable() && !$this->isEditMode()) $a5_readonly=true; + if ($a5_readonly && empty($$a5_name)) $$a5_name = '- '.lang('EMPTY').' -'; + if(!isset($a5_default)) $a5_default=''; + $tmp_value = Text::encodeHtml(isset($$a5_name)?$$a5_name:$a5_default); +?><?php if (!$a5_readonly || $a5_type=='hidden') { +?><input<?php if ($a5_readonly) echo ' disabled="true"' ?> id="id_<?php echo $a5_name ?><?php if ($a5_readonly) echo '_disabled' ?>" name="<?php echo $a5_name ?><?php if ($a5_readonly) echo '_disabled' ?>" type="<?php echo $a5_type ?>" maxlength="<?php echo $a5_maxlength ?>" class="<?php echo str_replace(',',' ',$a5_class) ?>" value="<?php echo $tmp_value ?>" <?php if (in_array($a5_name,$errors)) echo 'style="border:2px dashed red;"' ?> /><?php +if ($a5_readonly) { +?><input type="hidden" id="id_<?php echo $a5_name ?>" name="<?php echo $a5_name ?>" value="<?php echo $tmp_value ?>" /><?php + } } else { ?><a title="<?php echo langHtml('EDIT') ?>" href="<?php echo Html::url($actionName,$subactionName,0,array('mode'=>'edit')) ?>"><span class="<?php echo $a5_class ?>"><?php echo $tmp_value ?></span></a><?php } ?><?php unset($a5_class,$a5_default,$a5_type,$a5_name,$a5_size,$a5_maxlength,$a5_onchange,$a5_readonly) ?></div></div></form> diff --git a/themes/default/pages/html/modellist/show.tpl.php b/themes/default/pages/html/modellist/show.tpl.php @@ -1,317 +1,243 @@ -<?php $a3_name='GLOBAL_MODELS';$a3_icon='group';$a3_widths='50%,25%,25%';$a3_width='93%';$a3_rowclasses='odd,even';$a3_columnclasses='1,2,3'; ?><?php if (false) { ?> -<div class="window"> -<div class="title"> - <?php $icon=$actionName; ?> - <img src="<?php echo $image_dir.'icon_'.$icon.IMG_ICON_EXT ?>" align="left" /> - <?php if ($this->isEditable()) { ?> - <?php if ($this->isEditMode()) { - ?><a href="<?php echo Html::url($actionName,$subActionName,$this->getRequestId() ) ?>" accesskey="1" title="<?php echo langHtml('MODE_EDIT_DESC') ?>" class="path" style="text-align:right;font-weight:bold;font-weight:bold;"><img src="<?php echo $image_dir ?>mode-edit.png" style="vertical-align:top; " border="0" /></a> <?php } - elseif (readonly()) { - ?><img src="<?php echo $image_dir ?>readonly.png" style="vertical-align:top; " border="0" /> <?php } else { - ?><a href="<?php echo Html::url($actionName,$subActionName,$this->getRequestId(),array('mode'=>'edit') ) ?>" accesskey="1" title="<?php echo langHtml('MODE_SHOW_DESC') ?>" class="path" style="text-align:right;font-weight:bold;font-weight:bold;"><img src="<?php echo $image_dir ?>readonly.png" style="vertical-align:top; " border="0" /></a> <?php } - ?><?php } ?> - <span class="path"><?php echo langHtml($actionName) ?></span>&nbsp;<strong>&rarr;</strong>&nbsp; - <?php - if ( !isset($path) || !is_array($path) ) - $path = array(); - foreach( $path as $pathElement) - { - extract($pathElement); ?> - <a javascript:void(0);" onclick="javascript:loadViewByName('<?php echo $view ?>','<?php echo $url ?>'); return false; " title="<?php echo $title ?>" class="path"><?php echo (!empty($key)?langHtml($key):$name) ?></a> - &nbsp;&rarr;&nbsp; - <?php } ?> - <span class="title"><?php echo langHtml(@$windowTitle) ?></span> - <?php - if ( isset($notice_status)) - { - ?><img src="<?php echo $image_dir.'notice_'.$notice_status.IMG_ICON_EXT ?>" align="right" /><?php - } - ?> - <?php ?> - <?php if (isset($windowIcons)) foreach( $windowIcons as $icon ) - { - ?><a href="<?php echo $icon['url'] ?>" title="<?php echo 'ICON_'.langHtml($menu['type'].'_DESC') ?>"><image border="0" src="<?php echo $image_dir.$icon['type'].IMG_ICON_EXT ?>"></a>&nbsp;<?php - } - ?> -</div> -<ul class="menu"> -<?php - if ( !isset($windowMenu) || !is_array($windowMenu) ) $windowMenu = array(); - foreach( $windowMenu as $menu ) - { - $tmp_text = langHtml($menu['text']); - $tmp_key = strtoupper(langHtml($menu['key' ])); - $tmp_pos = strpos(strtolower($tmp_text),strtolower($tmp_key)); - if ( $tmp_pos !== false ) - $tmp_text = substr($tmp_text,0,max($tmp_pos,0)).'<span class="accesskey">'. substr($tmp_text,$tmp_pos,1).'</span>'.substr($tmp_text,$tmp_pos+1); - $liClass = (isset($menu['url'])?'':'no').'action'.($this->subActionName==$menu['subaction']?' active':''); - $icon_url = $image_dir.'icon/'.$menu['subaction'].'.png'; - ?><li class="<?php echo $liClass?>"><?php - if ( isset($menu['url']) ) - { - $link_url = Html::url($actionName,$menu['subaction'],$this->getRequestId() ); - ?><a href="javascript:void(0);" onclick="javascript:loadSubaction(this,'<?php echo $actionName ?>','<?php echo $menu['subaction'] ?>','<?php echo $this->getRequestId() ?>'); return false; " accesskey="<?php echo $tmp_key ?>" title="<?php echo langHtml($menu['text'].'_DESC') ?>"><img src="<?php echo $icon_url ?>" /><?php echo $tmp_text ?></a><?php - } - else - { - ?><span><img src="<?php echo $icon_url ?>" /><?php echo $tmp_text ?></span><?php - } - } - ?></li><?php - if ( /* Deaktiviert */ false && @$conf['help']['enabled'] ) - { - ?><a class="help" href="<?php echo $conf['help']['url'].$actionName.'/'.$subActionName.@$conf['help']['suffix'] ?> " target="_new" title="<?php echo langHtml('MENU_HELP_DESC') ?>"><img src="<?php echo $image_dir.'icon/help.png' ?>" /><?php echo @$conf['help']['only_question_mark']?'?':langHtml('MENU_HELP') ?></a><?php - } - ?><?php - ?> -</ul> -<?php global $image_dir; - if (isset($notices) && count($notices)>0 ) - { ?> - <dl class="notice"> - <?php foreach( $notices as $notice_idx=>$notice ) { ?> - <?php if ($notice['name']!='') { ?> - <dt><img src="<?php echo $image_dir.'icon_'.$notice['type'].IMG_ICON_EXT ?>" align="left" /><?php echo $notice['name'] ?></dt> -<?php } ?> - <dd class="<?php echo $notice['status'] ?>"> - <td style="padding:10px;" width="30px"><img src="<?php echo $image_dir.'notice_'.$notice['status'].IMG_ICON_EXT ?>" style="padding:10px" /></td> - <td style="padding:10px;padding-right:10px;padding-bottom:10px;"><?php if ($notice['status']=='error') { ?><strong><?php } ?><?php echo langHtml($notice['key'],$notice['vars']) ?><?php if ($notice['status']=='error') { ?></strong><?php } ?> - <?php if (!empty($notice['log'])) { ?><pre><?php echo htmlentities(implode("\n",$notice['log'])) ?></pre><?php } ?> - </td> - </dd> - <?php } ?> - </dl> +<?php $a2_name='';$a2_views='add';$a2_back=false; ?><div class="header"> + <?php if ($a2_back) { ?> + <a href="javascript:void(0);" onclick="javascript:refreshActualView(this);" class="back button"> + <img src="<?php echo $image_dir ?>icon/window/back.gif" /> + <?php echo lang('BACK') ?> + </a> + <?php } ?><?php if(!empty($a2_views)) { ?> + <img src="<?php echo $image_dir ?>icon/window/down.gif" /> + <div class="headermenu"> + <?php foreach( explode(',',$a2_views) as $a2_tmp_view ) { ?> + <a class="entry" href="javascript:void(0);" onclick="javascript:startView(this,'<?php echo $a2_tmp_view ?>');"> + <img src="<?php echo $image_dir ?>icon/<?php echo $a2_tmp_view ?>.png" /><?php echo lang('MENU_'.$a2_tmp_view) ?> + </a> + <?php } ?> + </div> <?php } ?> -<div class="content"><div class="filler"> -<?php } ?><?php unset($a3_name,$a3_icon,$a3_widths,$a3_width,$a3_rowclasses,$a3_columnclasses) ?><?php $a4_width='100%';$a4_space='0px';$a4_padding='0px'; ?><?php +</div><?php unset($a2_name,$a2_views,$a2_back) ?><?php $a2_width='100%';$a2_space='0px';$a2_padding='0px'; ?><?php $last_column_idx = @$column_idx; $column_idx = 0; $coloumn_widths = array(); $row_classes = array(); $column_classes = array(); ?><table class="%class%" cellspacing="0px" width="100%" cellpadding="0px"> -<?php unset($a4_width,$a4_space,$a4_padding) ?><?php $a5_class='headline'; ?><?php +<?php unset($a2_width,$a2_space,$a2_padding) ?><?php $a3_class='headline'; ?><?php $column_idx = 0; ?> <tr class="headline" > -<?php unset($a5_class) ?><?php $a6_header=false; ?><?php $column_idx++; ?><td +<?php unset($a3_class) ?><?php $a4_header=false; ?><?php $column_idx++; ?><td <?php if (!empty($column_widths)) { ?> width="<?php echo $column_widths[($column_idx-1)%count($column_widths)] ?>" <?php } ?> <?php if (!empty($column_classes)) { ?> class="<?php echo $column_classes[($column_idx-1)%count($column_classes)] ?>" <?php } ?> -><?php unset($a6_header) ?><?php $a7_class='text';$a7_key='name';$a7_escape=true;$a7_cut='both'; ?><?php - $a7_title = ''; +><?php unset($a4_header) ?><?php $a5_class='text';$a5_key='name';$a5_escape=true;$a5_cut='both'; ?><?php + $a5_title = ''; $tmp_tag = 'span'; -?><<?php echo $tmp_tag ?> class="<?php echo $a7_class ?>" title="<?php echo $a7_title ?>"><?php - $langF = $a7_escape?'langHtml':'lang'; - $tmp_text = $langF($a7_key); +?><<?php echo $tmp_tag ?> class="<?php echo $a5_class ?>" title="<?php echo $a5_title ?>"><?php + $langF = $a5_escape?'langHtml':'lang'; + $tmp_text = $langF($a5_key); $tmp_text = nl2br($tmp_text); echo $tmp_text; unset($tmp_text); -?></<?php echo $tmp_tag ?>><?php unset($a7_class,$a7_key,$a7_escape,$a7_cut) ?></td><?php $a6_header=false; ?><?php $column_idx++; ?><td +?></<?php echo $tmp_tag ?>><?php unset($a5_class,$a5_key,$a5_escape,$a5_cut) ?></td><?php $a4_header=false; ?><?php $column_idx++; ?><td <?php if (!empty($column_widths)) { ?> width="<?php echo $column_widths[($column_idx-1)%count($column_widths)] ?>" <?php } ?> <?php if (!empty($column_classes)) { ?> class="<?php echo $column_classes[($column_idx-1)%count($column_classes)] ?>" <?php } ?> -><?php unset($a6_header) ?><?php $a7_class='text';$a7_raw='';$a7_escape=true;$a7_cut='both'; ?><?php - $a7_title = ''; +><?php unset($a4_header) ?><?php $a5_class='text';$a5_raw='';$a5_escape=true;$a5_cut='both'; ?><?php + $a5_title = ''; $tmp_tag = 'span'; -?><<?php echo $tmp_tag ?> class="<?php echo $a7_class ?>" title="<?php echo $a7_title ?>"><?php - $langF = $a7_escape?'langHtml':'lang'; - $tmp_text = str_replace('_','&nbsp;',$a7_raw); +?><<?php echo $tmp_tag ?> class="<?php echo $a5_class ?>" title="<?php echo $a5_title ?>"><?php + $langF = $a5_escape?'langHtml':'lang'; + $tmp_text = str_replace('_','&nbsp;',$a5_raw); $tmp_text = nl2br($tmp_text); echo $tmp_text; unset($tmp_text); -?></<?php echo $tmp_tag ?>><?php unset($a7_class,$a7_raw,$a7_escape,$a7_cut) ?></td><?php $a6_header=false; ?><?php $column_idx++; ?><td +?></<?php echo $tmp_tag ?>><?php unset($a5_class,$a5_raw,$a5_escape,$a5_cut) ?></td><?php $a4_header=false; ?><?php $column_idx++; ?><td <?php if (!empty($column_widths)) { ?> width="<?php echo $column_widths[($column_idx-1)%count($column_widths)] ?>" <?php } ?> <?php if (!empty($column_classes)) { ?> class="<?php echo $column_classes[($column_idx-1)%count($column_classes)] ?>" <?php } ?> -><?php unset($a6_header) ?><?php $a7_class='text';$a7_raw='';$a7_escape=true;$a7_cut='both'; ?><?php - $a7_title = ''; +><?php unset($a4_header) ?><?php $a5_class='text';$a5_raw='';$a5_escape=true;$a5_cut='both'; ?><?php + $a5_title = ''; $tmp_tag = 'span'; -?><<?php echo $tmp_tag ?> class="<?php echo $a7_class ?>" title="<?php echo $a7_title ?>"><?php - $langF = $a7_escape?'langHtml':'lang'; - $tmp_text = str_replace('_','&nbsp;',$a7_raw); +?><<?php echo $tmp_tag ?> class="<?php echo $a5_class ?>" title="<?php echo $a5_title ?>"><?php + $langF = $a5_escape?'langHtml':'lang'; + $tmp_text = str_replace('_','&nbsp;',$a5_raw); $tmp_text = nl2br($tmp_text); echo $tmp_text; unset($tmp_text); -?></<?php echo $tmp_tag ?>><?php unset($a7_class,$a7_raw,$a7_escape,$a7_cut) ?></td></tr><?php $a5_list='el';$a5_extract=true;$a5_key='list_key';$a5_value='list_value'; ?><?php - $a5_list_tmp_key = $a5_key; - $a5_list_tmp_value = $a5_value; - $a5_list_extract = $a5_extract; - unset($a5_key); - unset($a5_value); - if ( !isset($$a5_list) || !is_array($$a5_list) ) - $$a5_list = array(); - foreach( $$a5_list as $$a5_list_tmp_key => $$a5_list_tmp_value ) +?></<?php echo $tmp_tag ?>><?php unset($a5_class,$a5_raw,$a5_escape,$a5_cut) ?></td></tr><?php $a3_list='el';$a3_extract=true;$a3_key='list_key';$a3_value='list_value'; ?><?php + $a3_list_tmp_key = $a3_key; + $a3_list_tmp_value = $a3_value; + $a3_list_extract = $a3_extract; + unset($a3_key); + unset($a3_value); + if ( !isset($$a3_list) || !is_array($$a3_list) ) + $$a3_list = array(); + foreach( $$a3_list as $$a3_list_tmp_key => $$a3_list_tmp_value ) { - if ( $a5_list_extract ) + if ( $a3_list_extract ) { - if ( !is_array($$a5_list_tmp_value) ) + if ( !is_array($$a3_list_tmp_value) ) { - print_r($$a5_list_tmp_value); - die( 'not an array at key: '.$$a5_list_tmp_key ); + print_r($$a3_list_tmp_value); + die( 'not an array at key: '.$$a3_list_tmp_key ); } - extract($$a5_list_tmp_value); + extract($$a3_list_tmp_value); } -?><?php unset($a5_list,$a5_extract,$a5_key,$a5_value) ?><?php $a6_class='data'; ?><?php +?><?php unset($a3_list,$a3_extract,$a3_key,$a3_value) ?><?php $a4_class='data'; ?><?php $column_idx = 0; ?> <tr class="data" > -<?php unset($a6_class) ?><?php $a7_header=false;$a7_url=$url; ?><?php $column_idx++; ?><td +<?php unset($a4_class) ?><?php $a5_header=false;$a5_url=$url; ?><?php $column_idx++; ?><td <?php if (!empty($column_widths)) { ?> width="<?php echo $column_widths[($column_idx-1)%count($column_widths)] ?>" <?php } ?> <?php if (!empty($column_classes)) { ?> class="<?php echo $column_classes[($column_idx-1)%count($column_classes)] ?>" <?php } ?> - onclick="javascript:loadViewByName('<?php echo $view ?>','<?php echo $a7_url ?>'); " -><?php unset($a7_header,$a7_url) ?><?php $a8_title='';$a8_type='';$a8_target='cms_main';$a8_class='';$a8_frame='_self'; ?><?php + onclick="javascript:loadViewByName('<?php echo $view ?>','<?php echo $a5_url ?>'); " +><?php unset($a5_header,$a5_url) ?><?php $a6_title='';$a6_type='';$a6_target='cms_main';$a6_class='';$a6_frame='_self'; ?><?php $params = array(); $tmp_url = ''; - $params[REQ_PARAM_TARGET] = $a8_target; - switch( $a8_type ) + $params[REQ_PARAM_TARGET] = $a6_target; + switch( $a6_type ) { case 'post': $json = new JSON(); - $tmp_data = $json->encode( array('action'=>!empty($a8_action)?$a8_action:$this->actionName,'subaction'=>!empty($a8_subaction)?$a8_subaction:$this->subActionName,'id'=>!empty($a8_id)?$a8_id:$this->getRequestId()) + $tmp_data = $json->encode( array('action'=>!empty($a6_action)?$a6_action:$this->actionName,'subaction'=>!empty($a6_subaction)?$a6_subaction:$this->subActionName,'id'=>!empty($a6_id)?$a6_id:$this->getRequestId()) +array(REQ_PARAM_TOKEN=>token()) +$params ); $tmp_function_call = "submitLink(this,'".str_replace("\n",'',str_replace('"','&quot;',$tmp_data))."');"; break; case 'view': - $tmp_function_call = "startView(this,'".(!empty($a8_subaction)?$a8_subaction:$this->subActionName)."');"; + $tmp_function_call = "startView(this,'".(!empty($a6_subaction)?$a6_subaction:$this->subActionName)."');"; break; case 'url': - $tmp_function_call = "submitUrl(this,'".($a8_url)."');"; + $tmp_function_call = "submitUrl(this,'".($a6_url)."');"; break; case 'external': - $tmp_function_call = "location.href='".$a8_url."';"; + $tmp_function_call = "location.href='".$a6_url."';"; break; case 'popup': - $tmp_function_call = "window.open('".$a8_url."', 'Popup', 'location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes');"; + $tmp_function_call = "window.open('".$a6_url."', 'Popup', 'location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes');"; break; default: $tmp_function_call = "alert('TODO');"; } -?><a target="<?php echo $a8_frame ?>"<?php if (isset($a8_name)) { ?> name="<?php echo $a8_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a8_class ?>"<?php if (isset($a8_accesskey)) echo ' accesskey="'.$a8_accesskey.'"' ?> title="<?php echo encodeHtml($a8_title) ?>"><?php unset($a8_title,$a8_type,$a8_target,$a8_class,$a8_frame) ?><?php $a9_file='icon_model';$a9_align='left'; ?><?php - $a9_tmp_image_file = $image_dir.$a9_file.IMG_ICON_EXT; - $a9_tmp_title = basename($a9_tmp_image_file); -?><img alt="<?php echo $a9_tmp_title; if (isset($a9_size)) { echo ' ('; list($a9_tmp_width,$a9_tmp_height)=explode('x',$a9_size);echo $a9_tmp_width.'x'.$a9_tmp_height; echo')';} ?>" src="<?php echo $a9_tmp_image_file ?>" border="0"<?php if(isset($a9_align)) echo ' align="'.$a9_align.'"' ?><?php if (isset($a9_size)) { list($a9_tmp_width,$a9_tmp_height)=explode('x',$a9_size);echo ' width="'.$a9_tmp_width.'" height="'.$a9_tmp_height.'"';} ?> /><?php unset($a9_file,$a9_align) ?><?php $a9_class='text';$a9_var='name';$a9_maxlength='25';$a9_escape=true;$a9_cut='both'; ?><?php - $a9_title = ''; +?><a target="<?php echo $a6_frame ?>"<?php if (isset($a6_name)) { ?> name="<?php echo $a6_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a6_class ?>"<?php if (isset($a6_accesskey)) echo ' accesskey="'.$a6_accesskey.'"' ?> title="<?php echo encodeHtml($a6_title) ?>"><?php unset($a6_title,$a6_type,$a6_target,$a6_class,$a6_frame) ?><?php $a7_file='icon_model';$a7_align='left'; ?><?php + $a7_tmp_image_file = $image_dir.$a7_file.IMG_ICON_EXT; + $a7_tmp_title = basename($a7_tmp_image_file); +?><img alt="<?php echo $a7_tmp_title; if (isset($a7_size)) { echo ' ('; list($a7_tmp_width,$a7_tmp_height)=explode('x',$a7_size);echo $a7_tmp_width.'x'.$a7_tmp_height; echo')';} ?>" src="<?php echo $a7_tmp_image_file ?>" border="0"<?php if(isset($a7_align)) echo ' align="'.$a7_align.'"' ?><?php if (isset($a7_size)) { list($a7_tmp_width,$a7_tmp_height)=explode('x',$a7_size);echo ' width="'.$a7_tmp_width.'" height="'.$a7_tmp_height.'"';} ?> /><?php unset($a7_file,$a7_align) ?><?php $a7_class='text';$a7_var='name';$a7_maxlength='25';$a7_escape=true;$a7_cut='both'; ?><?php + $a7_title = ''; $tmp_tag = 'span'; -?><<?php echo $tmp_tag ?> class="<?php echo $a9_class ?>" title="<?php echo $a9_title ?>"><?php - $langF = $a9_escape?'langHtml':'lang'; - $tmp_text = isset($$a9_var)?$$a9_var:$langF('UNKNOWN'); - $tmp_text = Text::maxLength( $tmp_text,intval($a9_maxlength),'..',constant('STR_PAD_'.strtoupper($a9_cut)) ); +?><<?php echo $tmp_tag ?> class="<?php echo $a7_class ?>" title="<?php echo $a7_title ?>"><?php + $langF = $a7_escape?'langHtml':'lang'; + $tmp_text = isset($$a7_var)?$$a7_var:$langF('UNKNOWN'); + $tmp_text = Text::maxLength( $tmp_text,intval($a7_maxlength),'..',constant('STR_PAD_'.strtoupper($a7_cut)) ); $tmp_text = nl2br($tmp_text); echo $tmp_text; unset($tmp_text); -?></<?php echo $tmp_tag ?>><?php unset($a9_class,$a9_var,$a9_maxlength,$a9_escape,$a9_cut) ?></a></td><?php $a7_header=false;$a7_url=$default_url; ?><?php $column_idx++; ?><td +?></<?php echo $tmp_tag ?>><?php unset($a7_class,$a7_var,$a7_maxlength,$a7_escape,$a7_cut) ?></a></td><?php $a5_present='default_url'; ?><?php + $a5_tmp_exec = isset($$a5_present); + $a5_tmp_last_exec = $a5_tmp_exec; + if ( $a5_tmp_exec ) + { +?> +<?php unset($a5_present) ?><?php $a6_header=false;$a6_url=$default_url; ?><?php $column_idx++; ?><td <?php if (!empty($column_widths)) { ?> width="<?php echo $column_widths[($column_idx-1)%count($column_widths)] ?>" <?php } ?> <?php if (!empty($column_classes)) { ?> class="<?php echo $column_classes[($column_idx-1)%count($column_classes)] ?>" <?php } ?> - onclick="javascript:loadViewByName('<?php echo $view ?>','<?php echo $a7_url ?>'); " -><?php unset($a7_header,$a7_url) ?><?php $a8_present='default_url'; ?><?php - $a8_tmp_exec = isset($$a8_present); - $a8_tmp_last_exec = $a8_tmp_exec; - if ( $a8_tmp_exec ) - { -?> -<?php unset($a8_present) ?><?php $a9_class='text';$a9_text='GLOBAL_make_default';$a9_escape=true;$a9_cut='both'; ?><?php - $a9_title = ''; + onclick="javascript:loadViewByName('<?php echo $view ?>','<?php echo $a6_url ?>'); " +><?php unset($a6_header,$a6_url) ?><?php $a7_class='text';$a7_text='GLOBAL_make_default';$a7_escape=true;$a7_cut='both'; ?><?php + $a7_title = ''; $tmp_tag = 'span'; -?><<?php echo $tmp_tag ?> class="<?php echo $a9_class ?>" title="<?php echo $a9_title ?>"><?php - $langF = $a9_escape?'langHtml':'lang'; - $tmp_text = $langF($a9_text); +?><<?php echo $tmp_tag ?> class="<?php echo $a7_class ?>" title="<?php echo $a7_title ?>"><?php + $langF = $a7_escape?'langHtml':'lang'; + $tmp_text = $langF($a7_text); $tmp_text = nl2br($tmp_text); echo $tmp_text; unset($tmp_text); -?></<?php echo $tmp_tag ?>><?php unset($a9_class,$a9_text,$a9_escape,$a9_cut) ?><?php } ?><?php if (!$a8_tmp_last_exec) { ?> -<?php $a9_class='text';$a9_text='GLOBAL_is_default';$a9_escape=true;$a9_cut='both'; ?><?php - $a9_title = ''; +?></<?php echo $tmp_tag ?>><?php unset($a7_class,$a7_text,$a7_escape,$a7_cut) ?></td><?php } ?><?php if (!$a5_tmp_last_exec) { ?> +<?php $a6_header=false; ?><?php $column_idx++; ?><td +<?php if (!empty($column_widths)) { ?> + width="<?php echo $column_widths[($column_idx-1)%count($column_widths)] ?>" +<?php } ?> +<?php if (!empty($column_classes)) { ?> + class="<?php echo $column_classes[($column_idx-1)%count($column_classes)] ?>" +<?php } ?> +><?php unset($a6_header) ?><?php $a7_class='text';$a7_text='GLOBAL_is_default';$a7_escape=true;$a7_cut='both'; ?><?php + $a7_title = ''; $tmp_tag = 'span'; -?><<?php echo $tmp_tag ?> class="<?php echo $a9_class ?>" title="<?php echo $a9_title ?>"><?php - $langF = $a9_escape?'langHtml':'lang'; - $tmp_text = $langF($a9_text); +?><<?php echo $tmp_tag ?> class="<?php echo $a7_class ?>" title="<?php echo $a7_title ?>"><?php + $langF = $a7_escape?'langHtml':'lang'; + $tmp_text = $langF($a7_text); $tmp_text = nl2br($tmp_text); echo $tmp_text; unset($tmp_text); -?></<?php echo $tmp_tag ?>><?php unset($a9_class,$a9_text,$a9_escape,$a9_cut) ?><?php } -unset($a7_tmp_last_exec) ?></td><?php $a7_header=false;$a7_url=$select_url; ?><?php $column_idx++; ?><td +?></<?php echo $tmp_tag ?>><?php unset($a7_class,$a7_text,$a7_escape,$a7_cut) ?></td><?php } +unset($a4_tmp_last_exec) ?><?php $a5_present='select_url'; ?><?php + $a5_tmp_exec = isset($$a5_present); + $a5_tmp_last_exec = $a5_tmp_exec; + if ( $a5_tmp_exec ) + { +?> +<?php unset($a5_present) ?><?php $a6_header=false;$a6_url=$select_url; ?><?php $column_idx++; ?><td <?php if (!empty($column_widths)) { ?> width="<?php echo $column_widths[($column_idx-1)%count($column_widths)] ?>" <?php } ?> <?php if (!empty($column_classes)) { ?> class="<?php echo $column_classes[($column_idx-1)%count($column_classes)] ?>" <?php } ?> - onclick="javascript:loadViewByName('<?php echo $view ?>','<?php echo $a7_url ?>'); " -><?php unset($a7_header,$a7_url) ?><?php $a8_present='select_url'; ?><?php - $a8_tmp_exec = isset($$a8_present); - $a8_tmp_last_exec = $a8_tmp_exec; - if ( $a8_tmp_exec ) - { -?> -<?php unset($a8_present) ?><?php $a9_class='text';$a9_text='GLOBAL_select';$a9_escape=true;$a9_cut='both'; ?><?php - $a9_title = ''; + onclick="javascript:loadViewByName('<?php echo $view ?>','<?php echo $a6_url ?>'); " +><?php unset($a6_header,$a6_url) ?><?php $a7_class='text';$a7_text='GLOBAL_select';$a7_escape=true;$a7_cut='both'; ?><?php + $a7_title = ''; $tmp_tag = 'span'; -?><<?php echo $tmp_tag ?> class="<?php echo $a9_class ?>" title="<?php echo $a9_title ?>"><?php - $langF = $a9_escape?'langHtml':'lang'; - $tmp_text = $langF($a9_text); +?><<?php echo $tmp_tag ?> class="<?php echo $a7_class ?>" title="<?php echo $a7_title ?>"><?php + $langF = $a7_escape?'langHtml':'lang'; + $tmp_text = $langF($a7_text); $tmp_text = nl2br($tmp_text); echo $tmp_text; unset($tmp_text); -?></<?php echo $tmp_tag ?>><?php unset($a9_class,$a9_text,$a9_escape,$a9_cut) ?><?php } ?><?php if (!$a8_tmp_last_exec) { ?> -<?php $a9_class='text';$a9_text='GLOBAL_selected';$a9_escape=true;$a9_cut='both'; ?><?php - $a9_title = ''; +?></<?php echo $tmp_tag ?>><?php unset($a7_class,$a7_text,$a7_escape,$a7_cut) ?></td><?php } ?><?php if (!$a5_tmp_last_exec) { ?> +<?php $a6_header=false; ?><?php $column_idx++; ?><td +<?php if (!empty($column_widths)) { ?> + width="<?php echo $column_widths[($column_idx-1)%count($column_widths)] ?>" +<?php } ?> +<?php if (!empty($column_classes)) { ?> + class="<?php echo $column_classes[($column_idx-1)%count($column_classes)] ?>" +<?php } ?> +><?php unset($a6_header) ?><?php $a7_class='text';$a7_text='GLOBAL_selected';$a7_escape=true;$a7_cut='both'; ?><?php + $a7_title = ''; $tmp_tag = 'span'; -?><<?php echo $tmp_tag ?> class="<?php echo $a9_class ?>" title="<?php echo $a9_title ?>"><?php - $langF = $a9_escape?'langHtml':'lang'; - $tmp_text = $langF($a9_text); +?><<?php echo $tmp_tag ?> class="<?php echo $a7_class ?>" title="<?php echo $a7_title ?>"><?php + $langF = $a7_escape?'langHtml':'lang'; + $tmp_text = $langF($a7_text); $tmp_text = nl2br($tmp_text); echo $tmp_text; unset($tmp_text); -?></<?php echo $tmp_tag ?>><?php unset($a9_class,$a9_text,$a9_escape,$a9_cut) ?><?php } -unset($a7_tmp_last_exec) ?></td></tr><?php $a6_var='select_url'; ?><?php - if (!isset($a6_value)) - unset($$a6_var); -?><?php unset($a6_var) ?><?php $a6_var='default_url'; ?><?php - if (!isset($a6_value)) - unset($$a6_var); -?><?php unset($a6_var) ?><?php } ?><?php +?></<?php echo $tmp_tag ?>><?php unset($a7_class,$a7_text,$a7_escape,$a7_cut) ?></td><?php } +unset($a4_tmp_last_exec) ?></tr><?php $a4_var='select_url'; ?><?php + if (!isset($a4_value)) + unset($$a4_var); +?><?php unset($a4_var) ?><?php $a4_var='default_url'; ?><?php + if (!isset($a4_value)) + unset($$a4_var); +?><?php unset($a4_var) ?><?php } ?><?php $column_idx = $last_column_idx; ?> -</table><?php if (false) { ?> -</div> -</div> -<div class="bottom"> - <div class="status"> - </div> - <div class="command"> - <input type="button" value="<?php echo lang('OK') ?>" onclick="formSubmit( $(this),'<?php echo $view ?>');" /> - <input type="cancel" value="<?php echo lang('CANCEL') ?>" /> - </div> -</div> -</div> -<?php if ($showDuration) - { ?> -<br/> -<center><small>&nbsp; -<?php $dur = time()-START_TIME; - echo floor($dur/60).':'.str_pad($dur%60,2,'0',STR_PAD_LEFT); ?></small></center> -<?php } ?> -<?php } ?>- \ No newline at end of file +</table>+ \ No newline at end of file diff --git a/themes/default/templates/model/add.tpl.src.php b/themes/default/templates/model/add.tpl.src.php @@ -1,12 +0,0 @@ -dummy - form method:post - - window icon:project name:GLOBAL_PROJECTS - row - cell - text key:global_name - cell - input name:name - row - cell colspan:2 class:act - button type:ok- \ No newline at end of file diff --git a/themes/default/templates/model/add.tpl.src.xml b/themes/default/templates/model/add.tpl.src.xml @@ -1,14 +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"> - <header back="true"></header> - <form method="post"> - <part class="line"> - <part class="label"> - <text key="global_name"></text> - </part> - <part class="input"> - <input name="name" class="focus"></input> - </part> - </part> - </form> -</output>- \ No newline at end of file diff --git a/themes/default/templates/modellist/add.tpl.src.xml b/themes/default/templates/modellist/add.tpl.src.xml @@ -0,0 +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.xsd"> + <header back="true"></header> + <form method="post"> + <part class="line"> + <part class="label"> + <text key="global_name"></text> + </part> + <part class="input"> + <input name="name" class="focus"></input> + </part> + </part> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/modellist/show.tpl.src.xml b/themes/default/templates/modellist/show.tpl.src.xml @@ -1,3 +1,52 @@ -<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 icon="group" name="GLOBAL_MODELS" widths="50%,25%,25%"><table><row class="headline"><cell><text key="name"></text></cell><cell><text raw=""></text></cell><cell><text raw=""></text></cell></row><list list="el" extract="true"><row class="data"><cell url="var:url"><link target="cms_main"><image file="icon_model"></image><text var="name" maxlength="25"></text></link></cell><cell url="var:default_url"><if present="default_url"><text text="GLOBAL_make_default"></text></if><else><text text="GLOBAL_is_default"></text></else></cell><cell url="var:select_url"><if present="select_url"><text text="GLOBAL_select"></text></if><else><text text="GLOBAL_selected"></text></else></cell></row><set var="select_url"></set><set var="default_url"></set></list></table></window></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 views="add"></header> + <table> + <row class="headline"> + <cell> + <text key="name"></text> + </cell> + <cell> + <text raw=""></text> + </cell> + <cell> + <text raw=""></text> + </cell> + </row> + <list list="el" extract="true"> + <row class="data"> + <cell url="var:url"> + <link target="cms_main"> + <image file="icon_model"></image> + <text var="name" maxlength="25"></text> + </link> + </cell> + + <if present="default_url"> + <cell url="var:default_url"> + <text text="GLOBAL_make_default"></text> + </cell> + </if> + <else> + <cell> + <text text="GLOBAL_is_default"></text> + </cell> + </else> + + + <if present="select_url"> + <cell url="var:select_url"> + <text text="GLOBAL_select"></text> + </cell> + </if> + <else> + <cell> + <text text="GLOBAL_selected"></text> + </cell> + </else> + </row> + <set var="select_url"></set> + <set var="default_url"></set> + </list> + </table> +</output>+ \ No newline at end of file