mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 04:41:41 +02:00
added xsl function
This commit is contained in:
parent
fccd2c7a4f
commit
9fea7d76e0
@ -532,15 +532,15 @@
|
|||||||
(
|
(
|
||||||
'id' => $cat['id'],
|
'id' => $cat['id'],
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'selected_cat' => $sel_cat
|
'selected' => $sel_cat
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($i=0;$i<count($cat_list);$i++)
|
for ($i=0;$i<count($cat_list);$i++)
|
||||||
{
|
{
|
||||||
if ($cat_list[$i]['selected_cat'] != 'selected')
|
if ($cat_list[$i]['selected'] != 'selected')
|
||||||
{
|
{
|
||||||
unset($cat_list[$i]['selected_cat']);
|
unset($cat_list[$i]['selected']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $cat_list;
|
return $cat_list;
|
||||||
|
@ -597,6 +597,55 @@
|
|||||||
return $this->template->fp('out','filter');
|
return $this->template->fp('out','filter');
|
||||||
} /* filter() */
|
} /* filter() */
|
||||||
|
|
||||||
|
|
||||||
|
function xslt_filter($data=0)
|
||||||
|
{
|
||||||
|
if(is_array($data))
|
||||||
|
{
|
||||||
|
$filter = (isset($data['filter'])?$data['filter']:'');
|
||||||
|
$yours = (isset($data['yours'])?$data['yours']:'');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$filter = get_var('filter',Array('GET','POST'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$filter_obj = array
|
||||||
|
(
|
||||||
|
array
|
||||||
|
(
|
||||||
|
'key' => 'none',
|
||||||
|
'lang' => lang('show all')
|
||||||
|
),
|
||||||
|
array
|
||||||
|
(
|
||||||
|
'key' => 'yours',
|
||||||
|
'lang' => lang('only yours')
|
||||||
|
),
|
||||||
|
array
|
||||||
|
(
|
||||||
|
'key' => 'private',
|
||||||
|
'lang' => lang('private')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if(is_array($filter_obj))
|
||||||
|
{
|
||||||
|
for($i=0;$i<count($filter_obj);$i++)
|
||||||
|
{
|
||||||
|
if($filter_obj[$i]['key'] == $filter)
|
||||||
|
{
|
||||||
|
$filter_obj[$i]['selected'] = 'yes';
|
||||||
|
}
|
||||||
|
if (!$yours && $filter_obj[$i]['key'] == 'yours')
|
||||||
|
{
|
||||||
|
unset($filter_obj[$i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $filter_obj;
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@function alternate_row_color
|
@function alternate_row_color
|
||||||
@abstract alternate row colour
|
@abstract alternate row colour
|
||||||
|
Loading…
x
Reference in New Issue
Block a user