source: sandbox/2.2.0.2/calendar/inc/hook_sidebox_menu.inc.php @ 4474

Revision 4474, 3.7 KB checked in by airton, 13 years ago (diff)

Ticket #1820 - Dinamizar utilizacao de edit.js, publicView.php - corrigir erro em AddAttach? no IE - r4459

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