egroupware_official/addressbook/inc/hook_sidebox_menu.inc.php

68 lines
3.0 KiB
PHP
Raw Normal View History

2003-11-06 03:00:53 +01:00
<?php
/**************************************************************************\
2004-01-25 23:02:59 +01:00
* eGroupWare - Calendar's Sidebox-Menu for idots-template *
* http://www.egroupware.org *
2003-11-06 03:00:53 +01:00
* Written by Pim Snel <pim@lingewoud.nl> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
{
/*
This hookfile is for generating an app-specific side menu used in the idots
template set.
$menu_title speaks for itself
$file is the array with link to app functions
display_sidebox can be called as much as you like
*/
$menu_title = $GLOBALS['egw_info']['apps'][$appname]['title'];
2003-11-06 03:00:53 +01:00
$file = Array(
array(
'text' => '<a class="textSidebox" href="'.$GLOBALS['egw']->link('/index.php',array('menuaction' => 'addressbook.uicontacts.edit')).
2005-11-14 18:45:53 +01:00
'" onclick="window.open(this.href,\'_blank\',\'dependent=yes,width=850,height=440,scrollbars=yes,status=yes\');
return false;">'.lang('Add').'</a>',
'no_lang' => true,
'link' => false
),
// 'Add'=>$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.add'),
'Advanced search'=>$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uicontacts.search'),
2003-11-06 03:00:53 +01:00
'_NewLine_', // give a newline
2005-05-01 16:34:59 +02:00
'import contacts' => $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.import'),
'export contacts' => $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.export')
2003-11-06 03:00:53 +01:00
);
display_sidebox($appname,$menu_title,$file);
2005-05-01 16:34:59 +02:00
if($GLOBALS['egw_info']['user']['apps']['preferences'])
2003-11-06 03:00:53 +01:00
{
$menu_title = lang('Preferences');
$file = array();
$file['Addressbook preferences'] = $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.preferences');
if(!$GLOBALS['egw_info']['server']['deny_user_grants_access'])
$file['Grant Access'] = $GLOBALS['egw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app=addressbook');
$file['Edit Categories'] = $GLOBALS['egw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=addressbook&cats_level=True&global_cats=True');
2003-11-06 03:00:53 +01:00
display_sidebox($appname,$menu_title,$file);
}
2005-05-01 16:34:59 +02:00
if ($GLOBALS['egw_info']['user']['apps']['admin'])
2003-11-06 03:00:53 +01:00
{
$menu_title = lang('Administration');
$file = Array(
2005-05-01 16:34:59 +02:00
'Configuration'=>$GLOBALS['egw']->link('/index.php','menuaction=admin.uiconfig.index&appname=addressbook'),
'Custom Fields'=>$GLOBALS['egw']->link('/index.php','menuaction=admin.customfields.edit&appname=addressbook'),
2005-05-01 16:34:59 +02:00
'Global Categories' =>$GLOBALS['egw']->link('/index.php','menuaction=admin.uicategories.index&appname=addressbook')
2003-11-06 03:00:53 +01:00
);
display_sidebox($appname,$menu_title,$file);
}
}
?>