egroupware_official/resources/inc/class.resources_hooks.inc.php

89 lines
3.3 KiB
PHP
Raw Normal View History

2005-02-23 12:48:59 +01:00
<?php
/**************************************************************************\
2005-02-25 12:35:51 +01:00
* eGroupWare - resources hooks *
2005-02-23 12:48:59 +01:00
* http://www.eGroupWare.org *
* Originally written by Ralf Becker <RalfBecker@outdoor-training.de> *
* Changes for resources by Cornelius Wei<EFBFBD> <egw@von-und-zu-weiss.de> *
* *
* ------------------------------------------------------- *
* 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$ */
2005-02-25 12:35:51 +01:00
class resources_hooks
2005-02-23 12:48:59 +01:00
{
2005-02-25 12:35:51 +01:00
function admin_prefs_sidebox($args)
2005-02-23 12:48:59 +01:00
{
$appname = 'resources';
$location = is_array($args) ? $args['location'] : $args;
if ($location == 'sidebox_menu')
{
$file = array(
'resources list' => $GLOBALS['phpgw']->link('/index.php',array(
'menuaction' => 'resources.ui_resources.index' )),
'add' => $GLOBALS['phpgw']->link('/index.php',array(
'menuaction' => 'resources.ui_resources.edit' ))
);
display_sidebox($appname,$GLOBALS['phpgw_info']['apps']['resources']['title'].' '.lang('Menu'),$file);
}
/* if ($GLOBALS['phpgw_info']['user']['apps']['preferences'] && $location != 'admin')
{
$file = array(
'Preferences' => $GLOBALS['phpgw']->link('/preferences/preferences.php','appname='.$appname),
'Grant Access' => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname),
'Edit Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=' . $appname . '&cats_level=True&global_cats=True')
);
if ($location == 'preferences')
{
display_section($appname,$file);
}
else
{
display_sidebox($appname,lang('Preferences'),$file);
}
}
*/
if ($GLOBALS['phpgw_info']['user']['apps']['admin'] && $location != 'preferences')
{
$file = Array(
'Site configuration' => $GLOBALS['phpgw']->link('/index.php',array(
'menuaction' => 'resources.ui_resources.admin' )),
'Global Categories' => $GLOBALS['phpgw']->link('/index.php',array(
'menuaction' => 'admin.uicategories.index',
'appname' => $appname,
'global_cats'=> True)),
'Configure Access Permissions' => $GLOBALS['phpgw']->link('/index.php',
'menuaction=resources.ui_acl.acllist')
// 'Custom fields, typ and status' => $GLOBALS['phpgw']->link('/index.php',array(
// 'menuaction' => 'infolog.uicustomfields.edit')),
// 'CSV-Import' => $GLOBALS['phpgw']->link('/infolog/csv_import.php')
);
if ($location == 'admin')
{
display_section($appname,$file);
}
else
{
display_sidebox($appname,lang('Admin'),$file);
}
}
2005-02-25 09:55:37 +01:00
}
function search_link($args)
{
$appname = 'resources';
2005-02-25 12:15:27 +01:00
return array( 'query' => 'resources.bo_resources.link_query',
'title' => 'resources.bo_resources.link_title',
2005-02-25 09:55:37 +01:00
'view' => array('menuaction' => 'resources.ui_resources.view'),
'view_id' => 'id'
2005-02-25 12:15:27 +01:00
);
2005-02-23 12:48:59 +01:00
}
}
?>