1 | <?php |
---|
2 | /**************************************************************************\ |
---|
3 | * eGroupWare - Calendar's Sidebox-Menu for idots-template * |
---|
4 | * http://www.egroupware.org * |
---|
5 | * Written by Pim Snel <pim@lingewoud.nl> * |
---|
6 | * -------------------------------------------- * |
---|
7 | * This program is free software; you can redistribute it and/or modify it * |
---|
8 | * under the terms of the GNU General Public License as published by the * |
---|
9 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
10 | * option) any later version. * |
---|
11 | \**************************************************************************/ |
---|
12 | |
---|
13 | { |
---|
14 | /* |
---|
15 | $menu_title speaks for itself |
---|
16 | $file is the array with link to app functions |
---|
17 | |
---|
18 | display_sidebox can be called as much as you like |
---|
19 | */ |
---|
20 | |
---|
21 | $menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu'); |
---|
22 | $file = Array( |
---|
23 | 'New Entry' => "javascript:addDetails();", |
---|
24 | '_NewLine_', // give a newline |
---|
25 | 'Today'=>"javascript:calendar.getView('div_main','Day')", |
---|
26 | 'This week'=>"javascript:calendar.getView('div_main','Week')", |
---|
27 | 'This month'=>"javascript:calendar.getView('div_main','Month')", |
---|
28 | 'This year'=>"javascript:calendar.getView('div_main','Year')", |
---|
29 | '_NewLine_', // give a newline |
---|
30 | 'Import'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiicalendar.import'), |
---|
31 | 'Report of hours'=>$GLOBALS['phpgw']->link('/calendar/inc/hourReport.php',''), |
---|
32 | 'Public Calendars'=> "javascript:openwindow('calendar/templates/celepar/publicView.php')" |
---|
33 | ); |
---|
34 | display_sidebox($appname,$menu_title,$file); |
---|
35 | |
---|
36 | if ($GLOBALS['phpgw_info']['user']['apps']['preferences']) |
---|
37 | { |
---|
38 | $menu_title = lang('Preferences'); |
---|
39 | $file = Array( |
---|
40 | 'Calendar preferences'=>$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=calendar'), |
---|
41 | 'Grant Access'=>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app=calendar'), |
---|
42 | 'Edit Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=calendar&cats_level=True&global_cats=True'), |
---|
43 | ); |
---|
44 | display_sidebox($appname,$menu_title,$file); |
---|
45 | } |
---|
46 | |
---|
47 | if ($GLOBALS['phpgw_info']['user']['apps']['admin']) |
---|
48 | { |
---|
49 | $menu_title = lang('Administration'); |
---|
50 | $file = Array( |
---|
51 | 'Configuration'=>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=calendar'), |
---|
52 | 'Custom Fields'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicustom_fields.index'), |
---|
53 | 'Holiday Management'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiholiday.admin'), |
---|
54 | 'Import CSV-File' => $GLOBALS['phpgw']->link('/calendar/csv_import.php'), |
---|
55 | 'Global Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=calendar'), |
---|
56 | ); |
---|
57 | display_sidebox($appname,$menu_title,$file); |
---|
58 | } |
---|
59 | } |
---|
60 | ?> |
---|