From 702e169b423515eca1329bbcd27838cefb00ef01 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 5 Oct 2002 10:40:02 +0000 Subject: [PATCH] allow to write only a relative eTemplate-name for each tab: relative means it contains no '.' and it will then be prefixed with the name of tpl it is used in (plus a '.') eg. tpl-name 'etemplate.tab_widget.test' tab-names 'work|privat|note' will expand to 'etemplate.tab_widget.test.work', ... --- etemplate/inc/class.tab_widget.inc.php | 6 +- .../templates/default/tab_widget.test.xet | 151 ++++++------------ 2 files changed, 51 insertions(+), 106 deletions(-) diff --git a/etemplate/inc/class.tab_widget.inc.php b/etemplate/inc/class.tab_widget.inc.php index adaff83b0d..6b2f87547b 100644 --- a/etemplate/inc/class.tab_widget.inc.php +++ b/etemplate/inc/class.tab_widget.inc.php @@ -46,6 +46,10 @@ $tab_row = array(); // generate the tab row while (list($k,$name) = each($names)) { + if (!strstr($name,'.')) + { + $name = $names[$k] = $tmpl->name . '.' . $name; + } $tcell = $tabs->empty_cell(); if ($extension_data == $name) { @@ -60,7 +64,7 @@ $tcell['name'] = $tab->name; } $tcell['type'] = 'template'; - $tcell['size'] = $cell['name']/*form_name*/.'['.$name.']'; + $tcell['size'] = $cell['name'].'['.$name.']'; $value[$name] = array( 'name' => $name, 'label' => $labels[$k], diff --git a/etemplate/templates/default/tab_widget.test.xet b/etemplate/templates/default/tab_widget.test.xet index dc72e77f17..a9b728d261 100644 --- a/etemplate/templates/default/tab_widget.test.xet +++ b/etemplate/templates/default/tab_widget.test.xet @@ -1,108 +1,49 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -