function get_menu()
 {
     $incoming_app = $GLOBALS['phpgw_info']['flags']['currentapp'];
     $GLOBALS['phpgw_info']['flags']['currentapp'] = 'activitycalendar';
     $menus = array();
     $menus['navbar'] = array('activitycalendar' => array('text' => lang('Activitycalendar'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'activitycalendar.uidashboard.index')), 'image' => array('property', 'location'), 'order' => 10, 'group' => 'office'));
     $menus['navigation'] = array('dashboard' => array('text' => lang('dashboard'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'activitycalendar.uidashboard.index')), 'image' => array('property', 'location_tenant')), 'activities' => array('text' => lang('Activities'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'activitycalendar.uiactivities.index')), 'image' => array('property', 'location_tenant')), 'arena' => array('text' => lang('Arena'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'activitycalendar.uiarena.index')), 'image' => array('property', 'location_1')), 'organizationList' => array('text' => lang('OrganizationList'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'activitycalendar.uiorganization.index')), 'image' => array('property', 'location_tenant'), 'children' => array('changed_organizations' => array('text' => lang('changed_org_group'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'activitycalendar.uiorganization.changed_organizations')), 'image' => array('property', 'location_tenant')))));
     $menus['folders'] = phpgwapi_menu::get_categories('bergen');
     $GLOBALS['phpgw_info']['flags']['currentapp'] = $incoming_app;
     return $menus;
 }
 /**
  * Get the menus for the notes
  *
  * @return array available menus for the current user
  */
 function get_menu()
 {
     $menus = array();
     $menus['navbar'] = array('notes' => array('text' => $GLOBALS['phpgw']->translation->translate('notes', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'notes.uinotes.index')), 'image' => array('notes', 'navbar'), 'order' => 8, 'group' => 'office'));
     $menus['toolbar'] = array(array('url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'notes.uinotes.edit')), 'text' => $GLOBALS['phpgw']->translation->translate('New', array(), true), 'image' => array('notes', 'new')));
     if (isset($GLOBALS['phpgw_info']['user']['apps']['admin'])) {
         $menus['admin'] = array(array('text' => 'Global Categories', 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'admin.uicategories.index', 'appname' => 'notes', 'global_cats' => 'true'))));
     }
     if (isset($GLOBALS['phpgw_info']['user']['apps']['preferences'])) {
         $menus['preferences'] = array(array('text' => 'Grant Access', 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'preferences.uiadmin_acl.aclprefs', 'acl_app' => 'notes'))), array('text' => 'Edit categories', 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'preferences.uicategories.index', 'cats_app' => 'notes', 'cats_level' => true, 'global_cats' => true))));
     }
     $menus['navigation'] = array(array('url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'notes.uinotes.edit')), 'text' => $GLOBALS['phpgw']->translation->translate('New', array(), true), 'image' => array('notes', 'new')));
     $menus['folders'] = phpgwapi_menu::get_categories('notes');
     return $menus;
 }
 /**
  * Get the menus for the calendar
  *
  * @return array available menus for the current user
  */
 function get_menu()
 {
     $menus = array();
     $menus['navbar'] = array('calendar' => array('text' => $GLOBALS['phpgw']->translation->translate('Calendar', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.index')), 'image' => array('calendar', 'navbar'), 'order' => 4, 'group' => 'office'));
     $menus['toolbar'] = array(array('text' => $GLOBALS['phpgw']->translation->translate('New', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.add')), 'image' => array('calendar', 'new')), array('text' => $GLOBALS['phpgw']->translation->translate('Today', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.day')), 'image' => array('calendar', 'today')), array('text' => $GLOBALS['phpgw']->translation->translate('Week', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.week')), 'image' => array('calendar', 'week')), array('text' => $GLOBALS['phpgw']->translation->translate('Week Detailed', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.week_new')), 'image' => array('calendar', 'week_detailed')), array('text' => $GLOBALS['phpgw']->translation->translate('Month', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.month')), 'image' => array('calendar', 'month')), array('text' => $GLOBALS['phpgw']->translation->translate('Year', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.year')), 'image' => array('calendar', 'year')), array('text' => $GLOBALS['phpgw']->translation->translate('Group Planner', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.planner')), 'image' => array('calendar', 'planner')), array('text' => $GLOBALS['phpgw']->translation->translate('Busy/Free', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.matrixselect')), 'image' => array('calendar', 'busy_free')), array('text' => $GLOBALS['phpgw']->translation->translate('Import', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uiicalendar.import')), 'image' => array('calendar', 'import')));
     if (isset($GLOBALS['phpgw_info']['user']['apps']['admin'])) {
         $menus['admin'] = array('index' => array('text' => $GLOBALS['phpgw']->translation->translate('Site Configuration', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'admin.uiconfig.index', 'appname' => 'calendar'))), 'custom' => array('text' => $GLOBALS['phpgw']->translation->translate('Custom fields and sorting', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicustom_fields.index'))), 'holiday' => array('text' => $GLOBALS['phpgw']->translation->translate('Calendar Holiday Management', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uiholiday.admin'))), 'categories' => array('text' => $GLOBALS['phpgw']->translation->translate('Global Categories', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'admin.uicategories.index', 'appname' => 'calendar'))));
     }
     if (isset($GLOBALS['phpgw_info']['user']['apps']['preferences'])) {
         $menus['preferences'] = array('preferences' => array('text' => $GLOBALS['phpgw']->translation->translate('Preferences', array(), true), 'url' => $GLOBALS['phpgw']->link('/preferences/preferences.php', array('appname' => 'calendar'))), 'acls' => array('text' => $GLOBALS['phpgw']->translation->translate('Grant Access', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'preferences.uiaclprefs.index', 'acl_app' => 'calendar'))), 'categories' => array('text' => $GLOBALS['phpgw']->translation->translate('Edit Categories', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'preferences.uicategories.index', 'cats_app' => 'calendar', 'cats_level' => 1, 'global_cats' => true))));
         $menus['toolbar'][] = array('text' => $GLOBALS['phpgw']->translation->translate('Preferences', array(), true), 'url' => $GLOBALS['phpgw']->link('/preferences/preferences.php', array('appname' => 'calendar')), 'image' => array('calendar', 'preferences'));
     }
     $menus['navigation'] = array(array('text' => $GLOBALS['phpgw']->translation->translate('New', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.add'))), array('text' => $GLOBALS['phpgw']->translation->translate('view', array(), true), 'url' => '#', 'children' => array(array('text' => $GLOBALS['phpgw']->translation->translate('Today', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.day'))), array('text' => $GLOBALS['phpgw']->translation->translate('Week', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.week'))), array('text' => $GLOBALS['phpgw']->translation->translate('Week Detailed', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.week_new'))), array('text' => $GLOBALS['phpgw']->translation->translate('Month', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.month'))), array('text' => $GLOBALS['phpgw']->translation->translate('Year', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.year'))), array('text' => $GLOBALS['phpgw']->translation->translate('Group Planner', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.planner'))), array('text' => $GLOBALS['phpgw']->translation->translate('Daily Matrix View', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.matrixselect'))))), array('text' => $GLOBALS['phpgw']->translation->translate('Import', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uiicalendar.import'))));
     $menus['folders'] = phpgwapi_menu::get_categories('calendar');
     return $menus;
 }
 /**
  * Get the menus for the addressbook
  *
  * @return array available menus for the current user
  */
 function get_menu()
 {
     $menus = array();
     $menus['navbar'] = array('addressbook' => array('text' => $GLOBALS['phpgw']->translation->translate('Contacts', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uiaddressbook.index', 'section' => 'Persons')), 'image' => array('addressbook', 'navbar'), 'order' => 2, 'group' => 'office'));
     //			if ( isset($GLOBALS['phpgw_info']['user']['apps']['admin']) )
     if ($GLOBALS['phpgw']->acl->check('run', phpgwapi_acl::READ, 'admin') || $GLOBALS['phpgw']->acl->check('admin', phpgwapi_acl::ADD, 'addressbook')) {
         $menus['admin'] = array(array('text' => $GLOBALS['phpgw']->translation->translate('Site Configuration', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'admin.uiconfig.index', 'appname' => 'addressbook'))), array('text' => $GLOBALS['phpgw']->translation->translate('Edit custom fields', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uifields.index'))), array('text' => $GLOBALS['phpgw']->translation->translate('Global Categories', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'admin.uicategories.index', 'appname' => 'addressbook'))), array('text' => $GLOBALS['phpgw']->translation->translate('Communication Types Manager', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uicatalog_contact_comm_type.view'))), array('text' => $GLOBALS['phpgw']->translation->translate('Communication Descriptions Manager', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uicatalog_contact_comm_descr.view'))), array('text' => $GLOBALS['phpgw']->translation->translate('Location Manager', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uicatalog_contact_addr_type.view'))), array('text' => 'Notes Types Manager', 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uicatalog_contact_note_type.view'))), array('text' => lang('Custom fields on org-person'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'admin.ui_custom.list_attribute', 'appname' => 'addressbook', 'location' => 'org_person', 'menu_selection' => ''))));
     }
     $menus['toolbar'] = array(array('text' => $GLOBALS['phpgw']->translation->translate('New Person', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uiaddressbook.add_person'))), array('text' => $GLOBALS['phpgw']->translation->translate('New Organisation', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uiaddressbook.add_org'))));
     $menus['navigation'] = array(array('text' => $GLOBALS['phpgw']->translation->translate('New Person', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uiaddressbook.add_person'))), array('text' => $GLOBALS['phpgw']->translation->translate('New Organisation', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uiaddressbook.add_org'))), array('text' => $GLOBALS['phpgw']->translation->translate('Import VCard', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uivcard.in'))), array('text' => $GLOBALS['phpgw']->translation->translate('Categorise Persons', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uicategorize_contacts.index'))), array('text' => $GLOBALS['phpgw']->translation->translate('Bulk Import - Contacts', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uiXport.import'))), array('text' => $GLOBALS['phpgw']->translation->translate('Bulk Import - CSV', array(), true), 'url' => $GLOBALS['phpgw']->link('/addressbook/csv_import.php')), array('text' => $GLOBALS['phpgw']->translation->translate('Export Contacts', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uiXport.export'))));
     if (isset($GLOBALS['phpgw_info']['user']['apps']['preferences'])) {
         $menus['preferences'] = array(array('text' => $GLOBALS['phpgw']->translation->translate('Preferences', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uiaddressbook_prefs.index'))), array('text' => $GLOBALS['phpgw']->translation->translate('Grant Access', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'preferences.uiadmin_acl.aclprefs', 'acl_app' => 'addressbook'))), array('text' => $GLOBALS['phpgw']->translation->translate('Edit Categories', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'preferences.uicategories.index', 'cats_app' => 'addressbook', 'cats_level' => true, 'global_cats' => true))));
         $menus['toolbar'][] = array('text' => $GLOBALS['phpgw']->translation->translate('Preferences', array(), true), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'addressbook.uiaddressbook_prefs.index')));
     }
     $menus['folders'] = phpgwapi_menu::get_categories('addressbook');
     return $menus;
 }
 function get_menu()
 {
     $bodoc = CreateObject('booking.bodocumentation');
     $manual = $bodoc->so->getBackendDoc();
     $incoming_app = $GLOBALS['phpgw_info']['flags']['currentapp'];
     $GLOBALS['phpgw_info']['flags']['currentapp'] = 'booking';
     $menus = array();
     $menus['navbar'] = array('booking' => array('text' => lang('Booking'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uidashboard.index')), 'image' => array('property', 'location'), 'order' => 10, 'group' => 'office'));
     $menus['navigation'] = array('dashboard' => array('text' => lang('Dashboard'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uidashboard.index')), 'image' => array('property', 'location')), 'messages' => array('text' => lang('Messages'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uisystem_message.index')), 'image' => array('property', 'location')), 'applications' => array('text' => lang('Applications'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiapplication.index')), 'image' => array('property', 'project_request'), 'children' => array('allocations' => array('text' => lang('Allocations'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiallocation.index')), 'image' => array('property', 'project_request')), 'bookings' => array('text' => lang('Bookings'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uibooking.index')), 'image' => array('property', 'project_request')), 'events' => array('text' => lang('Events'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uievent.index')), 'image' => array('property', 'project_request')), 'massbookings' => array('text' => lang('Bookings and allocations'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uimassbooking.index')), 'image' => array('property', 'project_request')))), 'buildings' => array('text' => lang('Buildings'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uibuilding.index')), 'image' => array('property', 'location_1'), 'children' => array('documents' => array('text' => lang('Documents'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uidocument_building.index')), 'image' => array('property', 'documentation')), 'permissions' => array('text' => lang('Permissions'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uipermission_building.index')), 'image' => array('property', 'agreement')), 'resources' => array('text' => lang('Resources'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiresource.index')), 'image' => array('property', 'location'), 'children' => array('documents' => array('text' => lang('Documents'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uidocument_resource.index')), 'image' => array('property', 'documentation')), 'permissions' => array('text' => lang('Permissions'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uipermission_resource.index')), 'image' => array('property', 'agreement')))), 'seasons' => array('text' => lang('Seasons'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiseason.index')), 'image' => array('property', 'location_gabnr'), 'children' => array('permissions' => array('text' => lang('Permissions'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uipermission_season.index')), 'image' => array('property', 'agreement')))))), 'organizations' => array('text' => lang('Organizations'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiorganization.index')), 'image' => array('property', 'location_tenant'), 'children' => array('groups' => array('text' => lang('Groups'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uigroup.index')), 'image' => array('property', 'location_tenant')))), 'invoice_center' => array('text' => lang('Invoice Data Exports'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uicompleted_reservation.index')), 'image' => array('property', 'invoice'), 'children' => array('completed_reservations' => array('text' => lang('Completed'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uicompleted_reservation.index')), 'image' => array('property', 'invoice')), 'exported_files' => array('text' => lang('Exported Files'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uicompleted_reservation_export.index')), 'image' => array('property', 'invoice')), 'generated_files' => array('text' => lang('Generated Files'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uicompleted_reservation_export_file.index')), 'image' => array('property', 'invoice')))), 'mailing' => array('text' => lang('Send e-mail'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uisend_email.index')), 'image' => array('property', 'helpdesk')), 'reportcenter' => array('text' => lang('Reports'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uireports.index')), 'image' => array('property', 'report'), 'children' => array('participants' => array('text' => lang('Participants'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uireports.participants')), 'image' => array('property', 'report')), 'free_time' => array('text' => lang('Free time'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uireports.freetime')), 'image' => array('property', 'report')))));
     if (isset($GLOBALS['phpgw_info']['user']['apps']['admin'])) {
         $menus['navigation']['settings'] = array('text' => lang('Settings'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uipermission_root.index', 'appname' => 'booking')), 'image' => array('admin', 'navbar'), 'children' => array('permissions' => array('text' => lang('Root Permissions'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uipermission_root.index', 'appname' => 'booking'))), 'activity' => array('text' => lang('Activity'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiactivity.index', 'appname' => 'booking'))), 'audience' => array('text' => lang('Audience'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiaudience.index', 'appname' => 'booking'))), 'agegroup' => array('text' => lang('Age group'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiagegroup.index', 'appname' => 'booking'))), 'account_code_sets' => array('text' => lang('Account Codes'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiaccount_code_set.index', 'appname' => 'booking'))), 'account_code_dimensions' => array('text' => lang('Account Code Dimension'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiaccount_code_dimension.index', 'appname' => 'booking'))), 'async_settings' => array('text' => lang('Asynchronous Tasks'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiasync_settings.index', 'appname' => 'booking'))), 'documentation' => array('text' => lang('Documentation'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uidocumentation.index', 'appname' => 'booking'))), 'mail_settings' => array('text' => lang('Mail Settings'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uimail_settings.index', 'appname' => 'booking'))), 'event_mail_settings' => array('text' => lang('Event Mail Settings'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uievent_mail_settings.index', 'appname' => 'booking'))), 'application_settings' => array('text' => lang('Application Settings'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiapplication_settings.index', 'appname' => 'booking'))), 'office' => array('text' => lang('office'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'property.uigeneric.index', 'type' => 'bb_office')), 'children' => array('office_user' => array('text' => lang('office user'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'property.uigeneric.index', 'type' => 'bb_office_user')))))));
         if ($manual !== null) {
             $menus['navigation']['documentation'] = array('text' => lang('Documentation'), 'url' => $manual, 'image' => array('property', 'documentation'));
         }
     }
     if ($GLOBALS['phpgw']->acl->check('run', phpgwapi_acl::READ, 'admin') || $GLOBALS['phpgw']->acl->check('admin', phpgwapi_acl::ADD, 'booking')) {
         $menus['admin'] = array('index' => array('text' => lang('Configuration'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'admin.uiconfig.index', 'appname' => 'booking'))), 'permissions' => array('text' => lang('Root Permissions'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uipermission_root.index', 'appname' => 'booking'))), 'acl' => array('text' => lang('Configure Access Permissions'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'preferences.uiadmin_acl.list_acl', 'acl_app' => 'booking'))), 'activity' => array('text' => lang('Activity'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiactivity.index', 'appname' => 'booking'))), 'audience' => array('text' => lang('Audience'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiaudience.index', 'appname' => 'booking'))), 'agegroup' => array('text' => lang('Agegroup'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiagegroup.index', 'appname' => 'booking'))), 'async_settings' => array('text' => lang('Asynchronous Tasks'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uiasync_settings.index', 'appname' => 'booking'))), 'settings' => array('text' => lang('Settings'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'booking.uisettings.index', 'appname' => 'booking'))));
     }
     $menus['folders'] = phpgwapi_menu::get_categories('bergen');
     $GLOBALS['phpgw_info']['flags']['currentapp'] = $incoming_app;
     return $menus;
 }
 function get_menu()
 {
     $incoming_app = $GLOBALS['phpgw_info']['flags']['currentapp'];
     $GLOBALS['phpgw_info']['flags']['currentapp'] = 'logistic';
     $menus = array();
     $menus['navbar'] = array('logistic' => array('text' => lang('logistic'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'logistic.uiproject.index')), 'image' => array('property', 'location'), 'order' => 10, 'group' => 'office'));
     $favorites_children = array();
     if (isset($GLOBALS['phpgw_info']['user']['preferences']['logistic']['menu_favorites']) && $GLOBALS['phpgw_info']['user']['preferences']['logistic']['menu_favorites']) {
         $menu_favorites = $GLOBALS['phpgw_info']['user']['preferences']['logistic']['menu_favorites'];
         foreach ($menu_favorites as $type => $targets) {
             foreach ($targets as $target => $target_name) {
                 $favorites_children["{$type}{$target}"] = array('text' => $target_name, 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => "logistic.ui{$type}.index", 'filter' => $target)), 'image' => array('property', 'location_tenant'));
             }
         }
     }
     $menus['navigation'] = array('project' => array('text' => lang('project'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'logistic.uiproject.index')), 'image' => array('property', 'location_tenant'), 'children' => array('activity' => array('text' => lang('activity'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'logistic.uiactivity.index')), 'image' => array('property', 'location_tenant')))), 'favorites' => array('text' => lang('favorites'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'logistic.uiactivity.index')), 'image' => array('property', 'location_tenant'), 'children' => $favorites_children));
     if ($GLOBALS['phpgw']->acl->check('run', phpgwapi_acl::READ, 'admin') || $GLOBALS['phpgw']->acl->check('admin', phpgwapi_acl::ADD, 'logistic')) {
         $menus['admin'] = array('index' => array('text' => lang('Configuration'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'admin.uiconfig.index', 'appname' => 'logistic'))), 'acl' => array('text' => lang('Configure Access Permissions'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'preferences.uiadmin_acl.list_acl', 'acl_app' => 'logistic'))), 'project_types' => array('text' => lang('Project types'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'logistic.uiproject.project_types'))), 'resource_type_requirement' => array('text' => lang('resource_type_requirement'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'logistic.uiresource_type_requirement.index'))));
     }
     $menus['folders'] = phpgwapi_menu::get_categories('bergen');
     $GLOBALS['phpgw_info']['flags']['currentapp'] = $incoming_app;
     return $menus;
 }
 function get_menu()
 {
     $incoming_app = $GLOBALS['phpgw_info']['flags']['currentapp'];
     $GLOBALS['phpgw_info']['flags']['currentapp'] = 'rental';
     $config = CreateObject('phpgwapi.config', 'rental');
     $config->read();
     $use_fellesdata = $config->config_data['use_fellesdata'];
     $menus = array();
     $menus['navbar'] = array('rental' => array('text' => lang('rental'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'rental.uifrontpage.index')), 'image' => array('rental', 'user-home'), 'order' => 10, 'group' => 'office'));
     if ($GLOBALS['phpgw']->acl->check(rental_uicommon::LOCATION_IN, PHPGW_ACL_ADD, 'rental') || $GLOBALS['phpgw']->acl->check(rental_uicommon::LOCATION_OUT, PHPGW_ACL_ADD, 'rental') || $GLOBALS['phpgw']->acl->check(rental_uicommon::LOCATION_INTERNAL, PHPGW_ACL_ADD, 'rental')) {
         $billing = array('invoice' => array('text' => lang('invoice_menu'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'rental.uibilling.index', 'appname' => 'rental')), 'image' => array('rental', 'x-office-document')), 'price_item_list' => array('text' => lang('price_list'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'rental.uiprice_item.index', 'appname' => 'rental')), 'image' => array('rental', 'x-office-spreadsheet'), 'children' => array('manual_adjustment' => array('text' => lang('manual_adjustment'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'rental.uiprice_item.manual_adjustment', 'appname' => 'rental')), 'image' => array('rental', 'x-office-spreadsheet')))), 'adjustment' => array('text' => lang('adjustment'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'rental.uiadjustment.index', 'appname' => 'rental')), 'image' => array('rental', 'x-office-spreadsheet')));
         $sync_choices = array('sync_org_unit' => array('text' => lang('sync_org_unit'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'rental.uiparty.sync', 'sync' => 'org_unit', 'appname' => 'rental')), 'image' => array('rental', 'x-office-document')), 'sync_resp_and_service' => array('text' => lang('sync_resp_and_service'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'rental.uiparty.sync', 'sync' => 'resp_and_service', 'appname' => 'rental')), 'image' => array('rental', 'x-office-document')), 'sync_res_units' => array('text' => lang('sync_res_units'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'rental.uiparty.sync', 'sync' => 'res_unit_number', 'appname' => 'rental')), 'image' => array('rental', 'x-office-document')), 'sync_identifier' => array('text' => lang('sync_identifier'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'rental.uiparty.sync', 'sync' => 'identifier', 'appname' => 'rental')), 'image' => array('rental', 'x-office-document')));
         $sub_parties = array('sync' => array('text' => lang('sync_menu'), 'url' => '', 'image' => array('rental', 'x-office-document'), 'children' => $sync_choices), 'resultunit' => array('text' => lang('delegates'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'rental.uiresultunit.index', 'appname' => 'rental')), 'image' => array('rental', 'system-users')));
     }
     $menus['navigation'] = array('contracts' => array('text' => lang('contracts'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'rental.uicontract.index')), 'image' => array('rental', 'text-x-generic'), 'children' => $billing), 'composites' => array('text' => lang('rc'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'rental.uicomposite.index')), 'image' => array('rental', 'go-home')), 'parties' => array('text' => lang('parties'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'rental.uiparty.index')), 'image' => array('rental', 'x-office-address-book')));
     if ($use_fellesdata) {
         $menus['navigation']['parties']['children'] = $sub_parties;
     }
     $menus['admin'] = array('index' => array('text' => lang('Configuration'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'admin.uiconfig.index', 'appname' => 'rental'))), 'acl' => array('text' => lang('Configure Access Permissions'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'preferences.uiadmin_acl.list_acl', 'acl_app' => 'rental'))), 'composite_standard' => array('text' => lang('composite standard'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'property.uigeneric.index', 'type' => 'composite_standard', 'admin' => true))), 'responsibility_unit' => array('text' => lang('responsibility'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'property.uigeneric.index', 'type' => 'responsibility_unit', 'admin' => true))), 'import' => array('text' => lang('facilit_import'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'rental.uiimport.index', 'appname' => 'rental')), 'image' => array('rental', 'document-save')), 'import_adjustments' => array('text' => lang('import_adjustments'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'rental.uiimport.import_regulations', 'appname' => 'rental')), 'image' => array('rental', 'document-save')), 'custom_functions' => array('text' => lang('custom functions'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'admin.ui_custom.list_custom_function', 'appname' => 'rental', 'location' => '.contract', 'menu_selection' => 'admin::rental::custom_functions'))));
     $menus['folders'] = phpgwapi_menu::get_categories('bergen');
     $menus['preferences'] = array(array('text' => lang('Preferences'), 'url' => $GLOBALS['phpgw']->link('/preferences/preferences.php', array('appname' => 'rental', 'type' => 'user'))), array('text' => lang('Grant Access'), 'url' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'preferences.uiadmin_acl.list_acl', 'acl_app' => 'rental'))));
     $GLOBALS['phpgw_info']['flags']['currentapp'] = $incoming_app;
     return $menus;
 }