#468 관련 애드온 group 태그 지원

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4169 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
mmx900 2008-05-03 02:29:57 +00:00
parent e11657427e
commit 09095c5069
2 changed files with 43 additions and 20 deletions

View file

@ -123,13 +123,18 @@
if($xml_obj->extra_vars) {
// 확장변수를 정리
if(!is_array($xml_obj->extra_vars->var)) $extra_vars[] = $xml_obj->extra_vars->var;
else $extra_vars = $xml_obj->extra_vars->var;
$extra_var_groups = $xml_obj->extra_vars->group;
if(!$extra_var_groups) $extra_var_groups = $xml_obj->extra_vars;
if(!is_array($extra_var_groups)) $extra_var_groups = array($extra_var_groups);
foreach($extra_var_groups as $group) {
$extra_vars = $group->var;
if(!is_array($group->var)) $extra_vars = array($group->var);
foreach($extra_vars as $key => $val) {
unset($obj);
if(!$val->type->body) { $val->type->body = 'text'; }
$obj->group = $group->title->body;
$obj->name = $val->attrs->name;
$obj->title = $val->title->body;
$obj->type = $val->type->body;
@ -151,6 +156,7 @@
$addon_info->extra_vars[] = $obj;
}
}
}
return $addon_info;
}

View file

@ -27,6 +27,16 @@
</tr>
<!--@foreach($addon_info->extra_vars as $id => $var)-->
<!--@if($var->group && ((!$group) || $group != $var->group))-->
{@$group = $var->group}
</table>
<table cellspacing="0" class="adminTable">
<col width="100" />
<col width="*" />
<caption>{$group}</caption>
<!--@end-->
<tr>
<th scope="row">{$var->title}</th>
<td>
@ -48,6 +58,13 @@
</tr>
<!--@end-->
<!--@if($group)-->
</table>
<table cellspacing="0" class="adminTable">
<col width="100" />
<col width="*" />
<!--@end-->
<tr>
<th scope="row">
{$lang->module}