forked from extern/egroupware
add toolbar hook for idots2 template set
add notify hook for idots2 template set add menu hook for idots2 template set
This commit is contained in:
parent
c0e2558652
commit
b47c0977f3
60
calendar/inc/class.calendarmenu.inc.php
Executable file
60
calendar/inc/class.calendarmenu.inc.php
Executable file
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
/**************************************************************************\
|
||||||
|
* eGroupWare - Calendar *
|
||||||
|
* http://www.egroupware.org *
|
||||||
|
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||||
|
* http://www.radix.net/~cknudsen *
|
||||||
|
* Modified by Mark Peters <skeeter@phpgroupware.org> *
|
||||||
|
* -------------------------------------------- *
|
||||||
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
|
* under the terms of the GNU General Public License as published by the *
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
|
* option) any later version. *
|
||||||
|
\**************************************************************************/
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
class calendarmenu
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
function calendarmenu()
|
||||||
|
{
|
||||||
|
$menu = Array();
|
||||||
|
$menu['File'] = Array(
|
||||||
|
'New Entry' => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.add'),
|
||||||
|
'Export'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.export'),
|
||||||
|
'Import'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiicalendar.import')
|
||||||
|
);
|
||||||
|
|
||||||
|
$menu['View'] = Array(
|
||||||
|
'Today'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.day'),
|
||||||
|
'This week'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.week'),
|
||||||
|
'This month'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.month'),
|
||||||
|
'This year'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.year'),
|
||||||
|
'Group Planner'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.planner'),
|
||||||
|
'Daily Matrix'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.matrixselect')
|
||||||
|
);
|
||||||
|
|
||||||
|
$menu['Preferences'] = Array(
|
||||||
|
'Calendar preferences'=>$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=calendar'),
|
||||||
|
'Grant Access'=>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app=calendar'),
|
||||||
|
'Edit Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=calendar&cats_level=True&global_cats=True')
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($GLOBALS['phpgw_info']['user']['apps']['admin']) {
|
||||||
|
$menu['Administration'] = Array(
|
||||||
|
'Configuration'=>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=calendar'),
|
||||||
|
'Custom Fields'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicustom_fields.index'),
|
||||||
|
'Holiday Management'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiholiday.admin'),
|
||||||
|
'Import CSV-File' => $GLOBALS['phpgw']->link('/calendar/csv_import.php'),
|
||||||
|
'Global Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=calendar')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $menu;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
61
calendar/inc/class.calendernotify.inc.php
Executable file
61
calendar/inc/class.calendernotify.inc.php
Executable file
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
/**************************************************************************\
|
||||||
|
* eGroupWare - Calendar Notify Hook *
|
||||||
|
* http://www.egroupware.org *
|
||||||
|
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||||
|
* http://www.radix.net/~cknudsen *
|
||||||
|
* File created by Edo van Bruggen <edovanbruggen@raketnet.nl> *
|
||||||
|
* -------------------------------------------- *
|
||||||
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
|
* under the terms of the GNU General Public License as published by the *
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
|
* option) any later version. *
|
||||||
|
\**************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
class calendernotify
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
function notify()
|
||||||
|
{
|
||||||
|
$db;
|
||||||
|
$table = 'phpgw_cal';
|
||||||
|
$owner;
|
||||||
|
$this->db = $GLOBALS['phpgw']->db;
|
||||||
|
$this->owner = $GLOBALS['phpgw_info']['user']['account_id'];
|
||||||
|
$config = CreateObject('phpgwapi.config');
|
||||||
|
$config->read_repository();
|
||||||
|
$GLOBALS['phpgw_info']['server']['calendar'] = $config->config_data;
|
||||||
|
unset($config);
|
||||||
|
$messages = array();
|
||||||
|
$count = 0;
|
||||||
|
$time = time();
|
||||||
|
$date_new = time()+ 604800;
|
||||||
|
$this->db->limit_query('SELECT * FROM `'. $table .'` WHERE cal_owner =\''
|
||||||
|
. $this->owner.'\' ',"",__LINE__,__FILE__);
|
||||||
|
|
||||||
|
while($this->db->next_record())
|
||||||
|
{
|
||||||
|
if($this->db->f('cal_starttime') - $time < 604800 and $this->db->f('cal_starttime') - $time > 0)
|
||||||
|
{
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($count > 0)
|
||||||
|
{
|
||||||
|
if($count == 1)
|
||||||
|
{
|
||||||
|
return "You have ".$count." new appointment.";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "You have ".$count." new appointments.";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return False;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
71
calendar/inc/class.toolbar.inc.php
Executable file
71
calendar/inc/class.toolbar.inc.php
Executable file
@ -0,0 +1,71 @@
|
|||||||
|
<?php
|
||||||
|
/**************************************************************************\
|
||||||
|
* eGroupWare - Calendar *
|
||||||
|
* http://www.egroupware.org *
|
||||||
|
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||||
|
* http://www.radix.net/~cknudsen *
|
||||||
|
* Modified by Mark Peters <skeeter@phpgroupware.org> *
|
||||||
|
* -------------------------------------------- *
|
||||||
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
|
* under the terms of the GNU General Public License as published by the *
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
|
* option) any later version. *
|
||||||
|
\**************************************************************************/
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
class toolbar
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
function toolbar()
|
||||||
|
{
|
||||||
|
$toolbar = Array();
|
||||||
|
$toolbar['viewday'] = Array(
|
||||||
|
'title' => "Today",
|
||||||
|
'image' => 'today.png',
|
||||||
|
'url'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.day')
|
||||||
|
);
|
||||||
|
|
||||||
|
$toolbar['viewweek'] = Array(
|
||||||
|
'title' => "This week",
|
||||||
|
'image' => 'week.png',
|
||||||
|
'url'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.week')
|
||||||
|
);
|
||||||
|
|
||||||
|
$toolbar['viewmonth'] = Array(
|
||||||
|
'title' => "This month",
|
||||||
|
'image' => 'month.png',
|
||||||
|
'url'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.month')
|
||||||
|
);
|
||||||
|
|
||||||
|
$toolbar['viewyear'] = Array(
|
||||||
|
'title' => "This year",
|
||||||
|
'image' => 'year.png',
|
||||||
|
'url'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.year')
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$toolbar['planner'] = Array(
|
||||||
|
'title' => "Group Planner",
|
||||||
|
'image' => 'planner.png',
|
||||||
|
'url'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.planner')
|
||||||
|
);
|
||||||
|
|
||||||
|
$toolbar['view'] = 'Separator';
|
||||||
|
|
||||||
|
$toolbar['matrixselect'] = Array(
|
||||||
|
'title' => "Daily Matrix",
|
||||||
|
'image' => 'view.png',
|
||||||
|
'url'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.matrixselect')
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return $toolbar;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
@ -12,7 +12,7 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$setup_info['calendar']['name'] = 'calendar';
|
$setup_info['calendar']['name'] = 'calendar';
|
||||||
$setup_info['calendar']['version'] = '1.0.0.005';
|
$setup_info['calendar']['version'] = '1.0.0';
|
||||||
$setup_info['calendar']['app_order'] = 3;
|
$setup_info['calendar']['app_order'] = 3;
|
||||||
$setup_info['calendar']['enable'] = 1;
|
$setup_info['calendar']['enable'] = 1;
|
||||||
|
|
||||||
@ -44,22 +44,13 @@
|
|||||||
$setup_info['calendar']['hooks'][] = 'home_month';
|
$setup_info['calendar']['hooks'][] = 'home_month';
|
||||||
$setup_info['calendar']['hooks'][] = 'home_week';
|
$setup_info['calendar']['hooks'][] = 'home_week';
|
||||||
$setup_info['calendar']['hooks'][] = 'home_year';
|
$setup_info['calendar']['hooks'][] = 'home_year';
|
||||||
|
$setup_info['calendar']['hooks'][] = 'manual';
|
||||||
$setup_info['calendar']['hooks'][] = 'preferences';
|
$setup_info['calendar']['hooks'][] = 'preferences';
|
||||||
$setup_info['calendar']['hooks'][] = 'settings';
|
$setup_info['calendar']['hooks'][] = 'settings';
|
||||||
$setup_info['calendar']['hooks']['sidebox_menu'] = 'calendar.uical.sidebox_menu';
|
$setup_info['calendar']['hooks'][] = 'sidebox_menu';
|
||||||
|
|
||||||
/* Dependencies for this app to work */
|
$setup_info['calendar']['hooks']['toolbar'] = 'calendar.toolbar.toolbar';
|
||||||
$setup_info['calendar']['depends'][] = array(
|
$setup_info['calendar']['hooks']['menu'] = 'calendar.calendarmenu.calendarmenu';
|
||||||
'appname' => 'phpgwapi',
|
|
||||||
'versions' => Array('0.9.14','0.9.15','0.9.16','1.0.0','1.0.1')
|
$setup_info['calendar']['hooks']['notify'] = 'calendar.calendernotify.notify';
|
||||||
);
|
|
||||||
$setup_info['calendar']['depends'][] = array(
|
|
||||||
'appname' => 'etemplate',
|
|
||||||
'versions' => Array('1.0.0','1.0.1')
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user