mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-25 14:41:50 +01:00
Cheap hack to make {rows} not show if no custom fields
This commit is contained in:
parent
fef9d740a9
commit
a4ce6380d9
@ -52,6 +52,7 @@
|
|||||||
reset($fields);
|
reset($fields);
|
||||||
for($i=0;$i<count($fields);$i++) {
|
for($i=0;$i<count($fields);$i++) {
|
||||||
if ($fields[$i]) {
|
if ($fields[$i]) {
|
||||||
|
$found = True;
|
||||||
$phpgw->nextmatchs->template_alternate_row_color(&$phpgw->template);
|
$phpgw->nextmatchs->template_alternate_row_color(&$phpgw->template);
|
||||||
|
|
||||||
$phpgw->template->set_var("field_name",$fields[$i]);
|
$phpgw->template->set_var("field_name",$fields[$i]);
|
||||||
@ -69,6 +70,13 @@
|
|||||||
$phpgw->template->parse("rows","row",True);
|
$phpgw->template->parse("rows","row",True);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!$found) {
|
||||||
|
$phpgw->nextmatchs->template_alternate_row_color(&$phpgw->template);
|
||||||
|
$phpgw->template->set_var("field_name",' ');
|
||||||
|
$phpgw->template->set_var("field_edit",' ');
|
||||||
|
$phpgw->template->set_var("field_delete",' ');
|
||||||
|
$phpgw->template->parse("rows","row",False);
|
||||||
|
}
|
||||||
|
|
||||||
$phpgw->template->set_var("add_field",'<a href="'
|
$phpgw->template->set_var("add_field",'<a href="'
|
||||||
. $phpgw->link("/addressbook/field_edit.php","method=add")
|
. $phpgw->link("/addressbook/field_edit.php","method=add")
|
||||||
|
Loading…
Reference in New Issue
Block a user