mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-01 04:13:28 +01:00
display "grant access" link only when we have NOT user grants disabled
This commit is contained in:
parent
7871067e98
commit
babecd6862
26
addressbook/inc/hook_preferences.inc.php
Normal file
26
addressbook/inc/hook_preferences.inc.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**************************************************************************\
|
||||||
|
* eGroupWare *
|
||||||
|
* http://www.egroupware.org *
|
||||||
|
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||||
|
* -------------------------------------------- *
|
||||||
|
* 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$ */
|
||||||
|
{
|
||||||
|
// Only Modify the $file and $title variables.....
|
||||||
|
$title = $appname;
|
||||||
|
$file = array();
|
||||||
|
$file['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='.$appname);
|
||||||
|
$file['Edit Categories'] = $GLOBALS['egw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app='.$appname . '&cats_level=True&global_cats=True');
|
||||||
|
|
||||||
|
//Do not modify below this line
|
||||||
|
display_section($appname,$title,$file);
|
||||||
|
}
|
||||||
|
?>
|
58
addressbook/inc/hook_sidebox_menu.inc.php
Normal file
58
addressbook/inc/hook_sidebox_menu.inc.php
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
/**************************************************************************\
|
||||||
|
* eGroupWare - Calendar's Sidebox-Menu for idots-template *
|
||||||
|
* http://www.egroupware.org *
|
||||||
|
* 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['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu');
|
||||||
|
$file = Array(
|
||||||
|
'Add'=>$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.add'),
|
||||||
|
'_NewLine_', // give a newline
|
||||||
|
'import contacts' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.import'),
|
||||||
|
'export contacts' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.export')
|
||||||
|
);
|
||||||
|
display_sidebox($appname,$menu_title,$file);
|
||||||
|
|
||||||
|
if($GLOBALS['phpgw_info']['user']['apps']['preferences'])
|
||||||
|
{
|
||||||
|
$menu_title = lang('Preferences');
|
||||||
|
$file = array();
|
||||||
|
$file['Addressbook preferences'] = $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.preferences');
|
||||||
|
if(!$GLOBALS['egw_info']['server']['deny_user_grants_access'])
|
||||||
|
$file['Grant Access'] = $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app=addressbook');
|
||||||
|
$file['Edit Categories'] = $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=addressbook&cats_level=True&global_cats=True');
|
||||||
|
|
||||||
|
display_sidebox($appname,$menu_title,$file);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($GLOBALS['phpgw_info']['user']['apps']['admin'])
|
||||||
|
{
|
||||||
|
$menu_title = lang('Administration');
|
||||||
|
$file = Array(
|
||||||
|
'Configuration'=>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=addressbook'),
|
||||||
|
'Custom Fields'=>$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.index'),
|
||||||
|
'Global Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=addressbook')
|
||||||
|
);
|
||||||
|
display_sidebox($appname,$menu_title,$file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
Loading…
Reference in New Issue
Block a user