mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-12 17:08:34 +01:00
- Added small view of upcoming events for main screen display.
- Added pref setting for selecting small home view. - English translations.
This commit is contained in:
parent
6232988b65
commit
1e9f5d229f
@ -3335,9 +3335,14 @@
|
||||
$p = CreateObject('phpgwapi.Template',$this->template_dir);
|
||||
$p->set_unknowns('keep');
|
||||
|
||||
$templates = Array(
|
||||
'day_cal' => 'day_cal.tpl'
|
||||
);
|
||||
$tpl = 'day_cal.tpl';
|
||||
if(intval($GLOBALS['phpgw_info']['user']['preferences']['calendar']['mainscreen_showevents'])==2)
|
||||
{
|
||||
$tpl = 'day_list.tpl';
|
||||
}
|
||||
$templates = Array(
|
||||
'day_cal' => $tpl
|
||||
);
|
||||
$p->set_file($templates);
|
||||
$p->set_block('day_cal','day','day');
|
||||
$p->set_block('day_cal','day_row','day_row');
|
||||
|
@ -22,7 +22,8 @@
|
||||
}
|
||||
unset($d1);
|
||||
|
||||
if ($GLOBALS['phpgw_info']['user']['preferences']['calendar']['mainscreen_showevents'])
|
||||
$showevents = intval($GLOBALS['phpgw_info']['user']['preferences']['calendar']['mainscreen_showevents']);
|
||||
if($showevents>0)
|
||||
{
|
||||
$GLOBALS['phpgw']->translation->add_app('calendar');
|
||||
if(!is_object($GLOBALS['phpgw']->datetime))
|
||||
@ -38,13 +39,20 @@
|
||||
$GLOBALS['css'] = "\n".'<style type="text/css">'."\n".'<!--'."\n"
|
||||
. ExecMethod('calendar.uicalendar.css').'-->'."\n".'</style>';
|
||||
|
||||
$page_ = explode('.',$GLOBALS['phpgw_info']['user']['preferences']['calendar']['defaultcalendar']);
|
||||
$_page = substr($page_[0],0,7); // makes planner from planner_{user|category}
|
||||
if ($_page=='index' || ($_page != 'day' && $_page != 'week' && $_page != 'month' && $_page != 'year' && $_page != 'planner'))
|
||||
if($showevents==2)
|
||||
{
|
||||
$_page = 'month';
|
||||
$_page = "small";
|
||||
}
|
||||
else
|
||||
{
|
||||
$page_ = explode('.',$GLOBALS['phpgw_info']['user']['preferences']['calendar']['defaultcalendar']);
|
||||
$_page = substr($page_[0],0,7); // makes planner from planner_{user|category}
|
||||
if ($_page=='index' || ($_page != 'day' && $_page != 'week' && $_page != 'month' && $_page != 'year' && $_page != 'planner'))
|
||||
{
|
||||
$_page = 'month';
|
||||
// $GLOBALS['phpgw']->preferences->add('calendar','defaultcalendar','month');
|
||||
// $GLOBALS['phpgw']->preferences->save_repository();
|
||||
}
|
||||
}
|
||||
|
||||
if(!@file_exists(PHPGW_INCLUDE_ROOT.'/calendar/inc/hook_home_'.$_page.'.inc.php'))
|
||||
@ -88,4 +96,5 @@
|
||||
unset($cal);
|
||||
}
|
||||
flush();
|
||||
unset($showevents);
|
||||
?>
|
||||
|
54
calendar/inc/hook_home_small.inc.php
Executable file
54
calendar/inc/hook_home_small.inc.php
Executable file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Calendar *
|
||||
* http://www.phpgroupware.org *
|
||||
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||
* http://www.radix.net/~cknudsen *
|
||||
* Written 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$ */
|
||||
|
||||
$d1 = strtolower(substr(PHPGW_APP_INC,0,3));
|
||||
if($d1 == 'htt' || $d1 == 'ftp' )
|
||||
{
|
||||
echo 'Failed attempt to break in via an old Security Hole!<br>'."\n";
|
||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||
}
|
||||
unset($d1);
|
||||
|
||||
$today = $GLOBALS['phpgw']->datetime->users_localtime;
|
||||
$dates = array($today);
|
||||
if(date('w',$today)=='5') // if it's Friday, show the weekend, plus Monday
|
||||
{
|
||||
$dates[] = $today + 86400; // Saturday
|
||||
$dates[] = $today + (2*86400); // Sunday
|
||||
}
|
||||
$dates[] = $dates[count($dates)-1] + 86400;
|
||||
|
||||
$extra_data = $GLOBALS['css']."\n"
|
||||
. '<table border="0" width="100%" cellspacing="0" cellpadding="1">'
|
||||
. '<tr><td valign="top" width="100%">';
|
||||
foreach($dates as $id=>$day)
|
||||
{
|
||||
$dayprint = ExecMethod('calendar.uicalendar.print_day',
|
||||
Array(
|
||||
'year' => date('Y',$day),
|
||||
'month' => date('m',$day),
|
||||
'day' => date('d',$day)
|
||||
));
|
||||
$extra_data .= '<font class="event-on" style="font-weight: bold">'.date('l',$day) .'</font><br />' . $dayprint;
|
||||
}
|
||||
$extra_data .= '</td></tr></table>'."\n";
|
||||
|
||||
$GLOBALS['extra_data'] = $extra_data;
|
||||
|
||||
unset($dates);
|
||||
unset($today);
|
||||
unset($extra_data);
|
||||
?>
|
@ -28,8 +28,18 @@
|
||||
create_select_box('default calendar view','defaultcalendar',$default,
|
||||
'Which of calendar view do you want to see, when you start calendar ?');
|
||||
|
||||
create_check_box('show default view on main screen','mainscreen_showevents',
|
||||
'Displays your default calendar view on the startpage (page you get when you enter phpGroupWare or click on the homepage icon)?');
|
||||
/* Selection of list for home page is different from default calendar,
|
||||
since the decision for the front page is different for the decision
|
||||
for the main calendar page. But the list could be added to the
|
||||
default list above, if requested. - shrykedude. */
|
||||
$mainpage = array(
|
||||
'1' => lang('Yes'),
|
||||
'0' => lang('No'),
|
||||
'2' => lang('No').' - '.lang('show list of upcoming events'),
|
||||
);
|
||||
create_select_box('show default view on main screen','mainscreen_showevents',$mainpage,
|
||||
'Displays your default calendar view on the startpage (page you get when you enter eGroupWare or click on the homepage icon)?');
|
||||
unset($mainpage);
|
||||
/*
|
||||
$summary = array(
|
||||
'no' => lang('Never'),
|
||||
|
@ -73,7 +73,7 @@ disabled calendar en disabled
|
||||
display interval in day view calendar en Display interval in Day View
|
||||
display mini calendars when printing calendar en Display mini calendars when printing
|
||||
display status of events calendar en Display Status of Events
|
||||
displays your default calendar view on the startpage (page you get when you enter phpgroupware or click on the homepage icon)? calendar en Displays your default calendar view on the startpage (page you get when you enter phpGroupWare or click on the homepage icon)?
|
||||
displays your default calendar view on the startpage (page you get when you enter phpgroupware or click on the homepage icon)? calendar en Displays your default calendar view on the startpage (page you get when you enter eGroupWare or click on the homepage icon)?
|
||||
do you want to be notified about new or changed appointments? you be notified about changes you make yourself.<br>you can limit the notifications to certain changes only. each item includes all the notification listed above it. all modifications include changes of title, description, participants, but no participant responses. if the owner of an event requested any notifcations, he will always get the participant responses like acceptions and rejections too. calendar en Do you want to be notified about new or changed appointments? You be notified about changes you make yourself.<br>You can limit the notifications to certain changes only. Each item includes all the notification listed above it. All modifications include changes of title, description, participants, but no participant responses. If the owner of an event requested any notifcations, he will always get the participant responses like acceptions and rejections too.
|
||||
do you want to receive a regulary summary of your appointsments via email?<br>the summary is sent to your standard email-address on the morning of that day or on monday for weekly summarys.<br>it is only sent when you have any appointments on that day or week. calendar en Do you want to receive a regulary summary of your appointsments via email?<br>The summary is sent to your standard email-address on the morning of that day or on Monday for weekly summarys.<br>It is only sent when you have any appointments on that day or week.
|
||||
do you wish to autoload calendar holidays files dynamically? admin en Do you wish to autoload calendar holidays files dynamically?
|
||||
@ -229,6 +229,7 @@ show day view on main screen calendar en show day view on main screen
|
||||
show default view on main screen calendar en Show default view on main screen
|
||||
show high priority events on main screen calendar en Show high priority events on main screen
|
||||
show invitations you rejected calendar en Show invitations you rejected
|
||||
show list of upcoming events calendar en Show list of upcoming events
|
||||
single event calendar en single event
|
||||
sorry, the owner has just deleted this event calendar en Sorry, the owner has just deleted this event
|
||||
sorry, this event does not exist calendar en Sorry, this event does not exist
|
||||
|
29
calendar/templates/default/day_list.tpl
Executable file
29
calendar/templates/default/day_list.tpl
Executable file
@ -0,0 +1,29 @@
|
||||
<!-- $Id$ -->
|
||||
<!-- BEGIN day -->
|
||||
<div class="event-off">
|
||||
<table border="0" width="100%" cellpadding="0">
|
||||
<tr>
|
||||
<td class="event-on">
|
||||
{row}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- END day -->
|
||||
<!-- BEGIN day_row -->
|
||||
{event}
|
||||
<!-- END day_row -->
|
||||
<!-- BEGIN day_event_on -->
|
||||
<font class="event-on">{event}</font>
|
||||
<!-- END day_event_on -->
|
||||
<!-- BEGIN day_event_off -->
|
||||
<font class="event-on">{event}</font>
|
||||
<!-- END day_event_off -->
|
||||
<!-- BEGIN day_event_holiday -->
|
||||
{event}
|
||||
<!-- END day_event_holiday -->
|
||||
<!-- BEGIN day_time -->
|
||||
{time}
|
||||
<!--<td class="time" nowrap>{open_link}{time}{close_link}</td>-->
|
||||
<!-- END day_time -->
|
||||
|
Loading…
Reference in New Issue
Block a user