forked from extern/egroupware
show advanced search/add AND Typeselection if you have more than one addressbooktypes. If you have only one type, use this one as filter not 'n'
This commit is contained in:
parent
ddfcdfff06
commit
3ea7a80876
@ -299,15 +299,13 @@ class addressbook_ui extends addressbook_bo
|
|||||||
if (!array_key_exists('importexport',$GLOBALS['egw_info']['user']['apps'])) unset($sel_options['action']['export']);
|
if (!array_key_exists('importexport',$GLOBALS['egw_info']['user']['apps'])) unset($sel_options['action']['export']);
|
||||||
|
|
||||||
// dont show tid-selection if we have only one content_type
|
// dont show tid-selection if we have only one content_type
|
||||||
if (count($this->content_types) <= 1)
|
// be a bit more sophisticated asbout it
|
||||||
{
|
|
||||||
$content['nm']['col_filter']['tid'] = 'n';
|
|
||||||
$content['nm']['header_right'] = 'addressbook.index.right_add';
|
$content['nm']['header_right'] = 'addressbook.index.right_add';
|
||||||
}
|
$availabletypes = array_keys($this->content_types);
|
||||||
else
|
if (!isset($content['nm']['col_filter']['tid'])) $content['nm']['col_filter']['tid'] = $availabletypes[0];
|
||||||
|
if (count($this->content_types) > 1)
|
||||||
{
|
{
|
||||||
if (!isset($content['nm']['col_filter']['tid'])) $content['nm']['col_filter']['tid'] = 'n';
|
$content['nm']['header_right'] = 'addressbook.index.right_addplus';
|
||||||
$content['nm']['header_right'] = 'addressbook.index.right';
|
|
||||||
foreach($this->content_types as $tid => $data)
|
foreach($this->content_types as $tid => $data)
|
||||||
{
|
{
|
||||||
$sel_options['col_filter[tid]'][$tid] = $data['name'];
|
$sel_options['col_filter[tid]'][$tid] = $data['name'];
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user