source: sandbox/2.3-MailArchiver/calendar/inc/hook_sidebox_menu.inc.php @ 6779

Revision 6779, 3.8 KB checked in by rafaelraymundo, 12 years ago (diff)

Ticket #2946 - Liberado Expresso(branch 2.3) integrado ao MailArchiver?.

Line 
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
27        $publicview_php_template_path = $GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'];
28        if (!file_exists($GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$publicview_php_template_path.'/publicView.php'))
29                $publicview_php_template_path = 'default';
30
31        $date = date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime);
32
33        $file = Array(
34                'New Entry'   => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.add'),
35                '_NewLine_', // give a newline
36                'Today'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.day&date='.$date),
37                'This week'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.week&date='.$date),
38                'This month'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.month&date='.$date),
39                'This year'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.year&date='.$date),
40                'Group Planner'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.planner&date='.$date),
41                //'Daily Matrix View'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.matrixselect'),
42                '_NewLine_', // give a newline
43                'Import'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiicalendar.import'),
44                'Report of hours'=>$GLOBALS['phpgw']->link('/calendar/inc/hourReport.php',''),
45                'Public Calendars'=> "javascript:openwindow('calendar/templates/".$publicview_php_template_path."/publicView.php')"
46        );
47        display_sidebox($appname,$menu_title,$file);
48
49        if ($GLOBALS['phpgw_info']['user']['apps']['preferences'])
50        {
51                $menu_title = lang('Preferences');
52                $file = Array(
53                        'Calendar preferences'=>$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=calendar'),
54                        'Grant Access'=>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app=calendar'),
55                        'Edit Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=calendar&cats_level=True&global_cats=True'),
56                );
57                display_sidebox($appname,$menu_title,$file);
58        }
59
60        if ($GLOBALS['phpgw_info']['user']['apps']['admin'])
61        {
62                $menu_title = lang('Administration');
63                $file = Array(
64                        'Configuration'=>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=calendar'),
65                        'Custom Fields'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicustom_fields.index'),
66                        'Holiday Management'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiholiday.admin'),
67                        'Import CSV-File' => $GLOBALS['phpgw']->link('/calendar/csv_import.php'),
68                        'Global Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=calendar'),
69                );
70                display_sidebox($appname,$menu_title,$file);
71        }
72}
73?>
Note: See TracBrowser for help on using the repository browser.