Cheap hack to make {rows} not show if no custom fields

This commit is contained in:
Miles Lott 2001-03-29 07:29:32 +00:00
parent fef9d740a9
commit a4ce6380d9

View File

@ -52,6 +52,7 @@
reset($fields);
for($i=0;$i<count($fields);$i++) {
if ($fields[$i]) {
$found = True;
$phpgw->nextmatchs->template_alternate_row_color(&$phpgw->template);
$phpgw->template->set_var("field_name",$fields[$i]);
@ -69,6 +70,13 @@
$phpgw->template->parse("rows","row",True);
}
}
if (!$found) {
$phpgw->nextmatchs->template_alternate_row_color(&$phpgw->template);
$phpgw->template->set_var("field_name",'&nbsp;');
$phpgw->template->set_var("field_edit",'&nbsp;');
$phpgw->template->set_var("field_delete",'&nbsp;');
$phpgw->template->parse("rows","row",False);
}
$phpgw->template->set_var("add_field",'<a href="'
. $phpgw->link("/addressbook/field_edit.php","method=add")