global cats are showed now for all admins

This commit is contained in:
bettina 2001-06-19 05:03:58 +00:00
parent 8f748c932c
commit adeba0e1eb

View File

@ -50,7 +50,7 @@
$c = CreateObject('phpgwapi.categories'); $c = CreateObject('phpgwapi.categories');
$c->app_name = 'phpgw'; $c->app_name = 'phpgw';
$categories = $c->return_array('all',$start,True,$query,$sort,$order); $categories = $c->return_array('all',$start,True,$query,$sort,$order,True);
//--------------------------------- nextmatch -------------------------------------------- //--------------------------------- nextmatch --------------------------------------------
@ -83,62 +83,42 @@
for ($i=0;$i<count($categories);$i++) for ($i=0;$i<count($categories);$i++)
{ {
if ($categories[$i]['owner'] == $phpgw_info['user']['account_id'] && $categories[$i]['app_name'] == 'phpgw') $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
$t->set_var(tr_color,$tr_color);
$cat_id = $categories[$i]['id'];
$space = '&nbsp;&nbsp;';
$level = $categories[$i]['level'];
if ($level > 0)
{ {
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color); $spaceset = str_repeat($space,$level);
$t->set_var(tr_color,$tr_color); $name = $spaceset . $phpgw->strip_html($categories[$i]['name']);
}
$cat_id = $categories[$i]['id']; $descr = $phpgw->strip_html($categories[$i]['description']);
$owner = $categories[$i]['owner']; if (!$descr) { $descr = '&nbsp;'; }
$space = '&nbsp;&nbsp;';
$level = $categories[$i]['level'];
if ($level > 0) if ($level == 0)
{ {
$spaceset = str_repeat($space,$level); $name = '<font color="FF0000"><b>' . $phpgw->strip_html($categories[$i]['name']) . '</b></font>';
$name = $spaceset . $phpgw->strip_html($categories[$i]['name']); $descr = '<font color="FF0000"><b>' . $descr . '</b></font>';
} }
$descr = $phpgw->strip_html($categories[$i]['description']);
if (!$descr) { $descr = '&nbsp;'; }
if ($level == 0)
{
$name = '<font color="FF0000"><b>' . $phpgw->strip_html($categories[$i]['name']) . '</b></font>';
$descr = '<font color="FF0000"><b>' . $descr . '</b></font>';
}
//-------------------------- template declaration for list records --------------------------- //-------------------------- template declaration for list records ---------------------------
$t->set_var(array('name' => $name, $t->set_var(array('name' => $name,
'descr' => $descr)); 'descr' => $descr));
if ($categories[$i]['owner'] == $phpgw_info['user']['account_id']) $t->set_var('edit',$phpgw->link('/admin/editcategory.php','cat_id=' . $cat_id . '&start=' . $start . '&query=' . $query . '&sort=' . $sort
{ . '&order=' . $order . '&filter=' . $filter));
$t->set_var('edit',$phpgw->link('/admin/editcategory.php','cat_id=' . $cat_id . '&start=' . $start . '&query=' . $query . '&sort=' . $sort $t->set_var('lang_edit_entry',lang('Edit'));
. '&order=' . $order . '&filter=' . $filter));
$t->set_var('lang_edit_entry',lang('Edit'));
}
else
{
$t->set_var('edit','');
$t->set_var('lang_edit_entry','&nbsp;');
}
if ($categories[$i]['owner'] == $phpgw_info['user']['account_id']) $t->set_var('delete',$phpgw->link('/admin/deletecategory.php','cat_id=' . $cat_id . '&start=' . $start . '&query=' . $query . '&sort=' . $sort . '&order='
{ . $order . '&filter=' . $filter));
$t->set_var('delete',$phpgw->link('/admin/deletecategory.php','cat_id=' . $cat_id . '&start=' . $start . '&query=' . $query . '&sort=' . $sort . '&order=' $t->set_var('lang_delete_entry',lang('Delete'));
. $order . '&filter=' . $filter));
$t->set_var('lang_delete_entry',lang('Delete'));
}
else
{
$t->set_var('delete','');
$t->set_var('lang_delete_entry','&nbsp;');
}
$t->parse('list','cat_list',True); $t->parse('list','cat_list',True);
}
} }
// ---------------------------- end record declaration ----------------------------------------- // ---------------------------- end record declaration -----------------------------------------