mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-22 10:52:00 +02:00
Don't show a bunch of empty fields
This commit is contained in:
parent
bddc2b415b
commit
4ed0543f9e
@ -122,63 +122,66 @@
|
|||||||
$t->set_var('display_col',ucfirst($column));
|
$t->set_var('display_col',ucfirst($column));
|
||||||
}
|
}
|
||||||
$ref = $data = "";
|
$ref = $data = "";
|
||||||
$coldata = $fields[0][$column];
|
if ($fields[0][$column])
|
||||||
// Some fields require special formatting.
|
|
||||||
if ( ($column == "note" || $column == "label" || $column == "pubkey") && $coldata )
|
|
||||||
{
|
{
|
||||||
$datarray = explode ("\n",$coldata);
|
$coldata = $fields[0][$column];
|
||||||
if ($datarray[1])
|
// Some fields require special formatting.
|
||||||
|
if ( ($column == "note" || $column == "label" || $column == "pubkey") && $coldata )
|
||||||
{
|
{
|
||||||
while (list($key,$info) = each ($datarray))
|
$datarray = explode ("\n",$coldata);
|
||||||
|
if ($datarray[1])
|
||||||
{
|
{
|
||||||
if ($key)
|
while (list($key,$info) = each ($datarray))
|
||||||
{
|
{
|
||||||
$data .= "</td></tr><tr><td width=\"30%\"> </td><td width=\"70%\">" .$info;
|
if ($key)
|
||||||
}
|
{
|
||||||
else
|
$data .= "</td></tr><tr><td width=\"30%\"> </td><td width=\"70%\">" .$info;
|
||||||
{ // First row, don't close td/tr
|
}
|
||||||
$data .= $info;
|
else
|
||||||
|
{ // First row, don't close td/tr
|
||||||
|
$data .= $info;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
$data .= "</tr>";
|
||||||
}
|
}
|
||||||
$data .= "</tr>";
|
else
|
||||||
|
{
|
||||||
|
$data = $coldata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif ($column == "url" && $coldata)
|
||||||
|
{
|
||||||
|
$ref = '<a href="' . $coldata . '" target="_new">';
|
||||||
|
$data = $coldata . '</a>';
|
||||||
|
}
|
||||||
|
elseif ( (($column == "email") || ($column == "email_home")) && $coldata)
|
||||||
|
{
|
||||||
|
if ($phpgw_info["user"]["apps"]["email"])
|
||||||
|
{
|
||||||
|
$ref='<a href="' . $phpgw->link("/email/compose.php","to="
|
||||||
|
. urlencode($coldata)) . '" target="_new">';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$ref = '<a href="mailto:'.$coldata.'">';
|
||||||
|
}
|
||||||
|
$data = $coldata."</a>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{ // But these do not
|
||||||
$data = $coldata;
|
$ref = ""; $data = $coldata;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
elseif ($column == "url" && $coldata)
|
|
||||||
{
|
|
||||||
$ref = '<a href="' . $coldata . '" target="_new">';
|
|
||||||
$data = $coldata . '</a>';
|
|
||||||
}
|
|
||||||
elseif ( (($column == "email") || ($column == "email_home")) && $coldata)
|
|
||||||
{
|
|
||||||
if ($phpgw_info["user"]["apps"]["email"])
|
|
||||||
{
|
|
||||||
$ref='<a href="' . $phpgw->link("/email/compose.php","to="
|
|
||||||
. urlencode($coldata)) . '" target="_new">';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$ref = '<a href="mailto:'.$coldata.'">';
|
|
||||||
}
|
|
||||||
$data = $coldata."</a>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{ // But these do not
|
|
||||||
$ref = ""; $data = $coldata;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$data)
|
if (!$data)
|
||||||
{
|
{
|
||||||
$t->set_var('ref_data'," ");
|
$t->set_var('ref_data'," ");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$t->set_var('ref_data',$ref . $data);
|
||||||
|
}
|
||||||
|
$t->parse("cols","view_row",True);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
$t->set_var('ref_data',$ref . $data);
|
|
||||||
}
|
|
||||||
$t->parse("cols","view_row",True);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$cat = CreateObject('phpgwapi.categories');
|
$cat = CreateObject('phpgwapi.categories');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user