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 | /* |
---|
16 | This hookfile is for generating an app-specific side menu used in the idots |
---|
17 | template set. |
---|
18 | |
---|
19 | $menu_title speaks for itself |
---|
20 | $file is the array with link to app functions |
---|
21 | |
---|
22 | display_sidebox can be called as much as you like |
---|
23 | */ |
---|
24 | |
---|
25 | $menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu'); |
---|
26 | $file = Array( |
---|
27 | 'New Entry' => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.add'), |
---|
28 | '_NewLine_', // give a newline |
---|
29 | 'Today'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.day'), |
---|
30 | 'This week'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.week'), |
---|
31 | 'This month'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.month'), |
---|
32 | 'This year'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.year'), |
---|
33 | 'Group Planner'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.planner'), |
---|
34 | //'Daily Matrix View'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.matrixselect'), |
---|
35 | '_NewLine_', // give a newline |
---|
36 | 'Import'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiicalendar.import'), |
---|
37 | 'Report of hours'=>$GLOBALS['phpgw']->link('/calendar/inc/hourReport.php',''), |
---|
38 | 'Public Calendars'=> "javascript:openwindow('calendar/templates/celepar/publicView.php')" |
---|
39 | ); |
---|
40 | display_sidebox($appname,$menu_title,$file); |
---|
41 | |
---|
42 | if ($GLOBALS['phpgw_info']['user']['apps']['preferences']) |
---|
43 | { |
---|
44 | $menu_title = lang('Preferences'); |
---|
45 | $file = Array( |
---|
46 | 'Calendar preferences'=>$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=calendar'), |
---|
47 | 'Grant Access'=>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app=calendar'), |
---|
48 | 'Edit Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=calendar&cats_level=True&global_cats=True'), |
---|
49 | ); |
---|
50 | display_sidebox($appname,$menu_title,$file); |
---|
51 | } |
---|
52 | |
---|
53 | if ($GLOBALS['phpgw_info']['user']['apps']['admin']) |
---|
54 | { |
---|
55 | $menu_title = lang('Administration'); |
---|
56 | $file = Array( |
---|
57 | 'Configuration'=>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=calendar'), |
---|
58 | 'Custom Fields'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicustom_fields.index'), |
---|
59 | 'Holiday Management'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiholiday.admin'), |
---|
60 | 'Import CSV-File' => $GLOBALS['phpgw']->link('/calendar/csv_import.php'), |
---|
61 | 'Global Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=calendar'), |
---|
62 | ); |
---|
63 | display_sidebox($appname,$menu_title,$file); |
---|
64 | } |
---|
65 | } |
---|
66 | ?> |
---|