forked from extern/egroupware
Multiple week view and fix for daylight saving time change problem reported by Manfred on the german list
This commit is contained in:
parent
2912ec7c61
commit
0544890713
@ -5,7 +5,7 @@
|
||||
* @link http://www.egroupware.org
|
||||
* @package calendar
|
||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @copyright (c) 2004-7 by RalfBecker-At-outdoor-training.de
|
||||
* @copyright (c) 2004-8 by RalfBecker-At-outdoor-training.de
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
@ -585,6 +585,11 @@ class uical
|
||||
'value' => 'menuaction=calendar.uiviews.week&days=5',
|
||||
'selected' => $this->view == 'week' && $this->cal_prefs['days_in_weekview'] == 5,
|
||||
),
|
||||
array(
|
||||
'text' => lang('Multiple week view'),
|
||||
'value' => 'menuaction=calendar.uiviews.weekN',
|
||||
'selected' => $this->view == 'weekN',
|
||||
),
|
||||
array(
|
||||
'text' => lang('monthview'),
|
||||
'value' => 'menuaction=calendar.uiviews.month',
|
||||
@ -641,6 +646,10 @@ class uical
|
||||
}
|
||||
$link_vars['menuaction'] = $this->view_menuaction; // stay in the planner
|
||||
}
|
||||
elseif(substr($this->view,0,4) == 'week' && $view == 'week')
|
||||
{
|
||||
$link_vars['menuaction'] = $this->view_menuaction; // stay in the N-week-view
|
||||
}
|
||||
elseif ($view == 'day' && $this->view == 'day4')
|
||||
{
|
||||
$link_vars['menuaction'] = $this->view_menuaction; // stay in the day-view
|
||||
|
@ -5,7 +5,7 @@
|
||||
* @link http://www.egroupware.org
|
||||
* @package calendar
|
||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @copyright (c) 2004-7 by RalfBecker-At-outdoor-training.de
|
||||
* @copyright (c) 2004-8 by RalfBecker-At-outdoor-training.de
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
@ -33,6 +33,7 @@ class uiviews extends uical
|
||||
'day' => True,
|
||||
'day4' => True,
|
||||
'week' => True,
|
||||
'weekN' => True,
|
||||
'month' => True,
|
||||
'planner' => True,
|
||||
);
|
||||
@ -284,6 +285,18 @@ class uiviews extends uical
|
||||
}
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a multiple week-view
|
||||
*
|
||||
* @param boolean $home=false if true return content suitable for home-page
|
||||
*/
|
||||
function &weekN($home=false)
|
||||
{
|
||||
if (($num = (int)$this->cal_prefs['multiple_weeks']) < 2) $num = 3; // default 3 weeks
|
||||
|
||||
return $this->month($num,$home);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the monthview or a multiple week-view
|
||||
@ -299,8 +312,8 @@ class uiviews extends uical
|
||||
|
||||
if ($weeks)
|
||||
{
|
||||
$this->first = $this->datetime->get_weekday_start($this->year,$this->month,$this->day=1);
|
||||
$this->last = $this->first + $weeks * 7 * DAY_s - 1;
|
||||
$this->first = $this->datetime->get_weekday_start($this->year,$this->month,$this->day);
|
||||
$this->last = strtotime("+$weeks weeks",$this->first) - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -317,12 +330,12 @@ class uiviews extends uical
|
||||
|
||||
$content = '';
|
||||
// we add DAY_s/2 to $this->first (using 12h), to deal with daylight saving changes
|
||||
for ($week_start = $this->first+DAY_s/2; $week_start < $this->last; $week_start += WEEK_s)
|
||||
for ($week_start = $this->first; $week_start < $this->last; $week_start = strtotime("+1 week",$week_start))
|
||||
{
|
||||
$week = array();
|
||||
for ($i = 0; $i < 7; ++$i)
|
||||
{
|
||||
$day_ymd = $this->bo->date2string($week_start+$i*DAY_s);
|
||||
$day_ymd = $this->bo->date2string($i ? strtotime("+$i days",$week_start) : $week_start);
|
||||
$week[$day_ymd] = array_shift($days);
|
||||
}
|
||||
$week_view = array(
|
||||
@ -332,7 +345,7 @@ class uiviews extends uical
|
||||
$title = lang('Wk').' '.adodb_date('W',$week_start);
|
||||
$title = $this->html->a_href($title,$week_view,'',' title="'.lang('Weekview').'"');
|
||||
|
||||
$content .= $this->timeGridWidget($this->tagWholeDayOnTop($week),60,200,'',$title,0,$week_start+WEEK_s >= $this->last);
|
||||
$content .= $this->timeGridWidget($this->tagWholeDayOnTop($week),$weeks == 2 ? 30 : 60,200,'',$title,0,$week_start+WEEK_s >= $this->last);
|
||||
}
|
||||
if (!$home)
|
||||
{
|
||||
@ -414,7 +427,7 @@ class uiviews extends uical
|
||||
if ($days == 4) // next 4 days view
|
||||
{
|
||||
$wd_start = $this->first = $this->bo->date2ts($this->date);
|
||||
$this->last = $this->first + $days * DAY_s - 1;
|
||||
$this->last = strtotime("+$days days",$this->first) - 1;
|
||||
$GLOBALS['egw_info']['flags']['app_header'] .= ': '.lang('Four days view').' '.$this->bo->long_date($this->first,$this->last);
|
||||
}
|
||||
else
|
||||
@ -425,14 +438,14 @@ class uiviews extends uical
|
||||
switch($this->cal_prefs['weekdaystarts'])
|
||||
{
|
||||
case 'Saturday':
|
||||
$this->first += DAY_s;
|
||||
// fall through
|
||||
$this->first = strtotime("+2 days",$this->first);
|
||||
break;
|
||||
case 'Sunday':
|
||||
$this->first += DAY_s;
|
||||
$this->first = strtotime("+1 day",$this->first);
|
||||
break;
|
||||
}
|
||||
}
|
||||
$this->last = $this->first + $days * DAY_s - 1;
|
||||
$this->last = strtotime("+$days days",$this->first) - 1;
|
||||
$GLOBALS['egw_info']['flags']['app_header'] .= ': '.lang('Week').' '.adodb_date('W',$this->first).': '.$this->bo->long_date($this->first,$this->last);
|
||||
}
|
||||
|
||||
@ -1155,6 +1168,7 @@ class uiviews extends uical
|
||||
|
||||
$tpl->set_var(array(
|
||||
// event-content, some of it displays only if it really has content or is needed
|
||||
'owner' => $GLOBALS['egw']->common->grab_owner_name($event['owner']),
|
||||
'header_icons' => $small ? '' : implode("",$icons),
|
||||
'body_icons' => $small ? implode("\n",$icons) : '',
|
||||
'icons' => implode('',$icons),
|
||||
|
@ -1,19 +1,16 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare - Calendar Preferences *
|
||||
* 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> *
|
||||
* Modified by Ralf Becker <ralfbecker@outdoor-training.de> *
|
||||
* -------------------------------------------- *
|
||||
* 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$ */
|
||||
/**
|
||||
* eGroupWare - Calendar Preferences
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @package calendar
|
||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @author Mark Peters <skeeter@phpgroupware.org>
|
||||
* Originally based on Webcalendar by Craig Knudsen <cknudsen@radix.net>
|
||||
* http://www.radix.net/~cknudsen
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
$bocal =& CreateObject('calendar.bocal');
|
||||
$bocal->check_set_default_prefs();
|
||||
@ -22,6 +19,7 @@
|
||||
'day' => lang('Dayview'),
|
||||
'day4' => lang('Four days view'),
|
||||
'week' => lang('Weekview'),
|
||||
'weekN' => lang('Multiple week view'),
|
||||
'month' => lang('Monthview'),
|
||||
'planner_cat' => lang('Planner by category'),
|
||||
'planner_user' => lang('Planner by user'),
|
||||
@ -94,6 +92,11 @@
|
||||
{
|
||||
$times[$i] = $GLOBALS['egw']->common->formattime($i,'00');
|
||||
}
|
||||
|
||||
for ($i = 2; $i <= 9; ++$i)
|
||||
{
|
||||
$muliple_weeks[$i.' weeks'] = lang('%1 weeks',$i);
|
||||
}
|
||||
|
||||
$intervals = array(
|
||||
5 => '5',
|
||||
@ -144,6 +147,15 @@
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'multiple_weeks' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Weeks in multiple week view',
|
||||
'name' => 'multiple_weeks',
|
||||
'values' => $muliple_weeks,
|
||||
'help' => 'How many weeks should the multiple week view show?',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'mainscreen_showevents' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'show default view on main screen',
|
||||
@ -228,7 +240,7 @@
|
||||
'label' => 'Show empty rows in Planner',
|
||||
'name' => 'planner_show_empty_rows',
|
||||
'values' => array(
|
||||
'' => lang('no'),
|
||||
0 => lang('no'),
|
||||
'user' => lang('Planner by user'),
|
||||
'cat' => lang('Planner by category'),
|
||||
'both' => lang('All'),
|
||||
|
@ -1,6 +1,7 @@
|
||||
%1 %2 in %3 calendar de %1 %2 im %3
|
||||
%1 records imported calendar de %1 Datensätze importiert
|
||||
%1 records read (not yet imported, you may go back and uncheck test import) calendar de %1 Datensätze gelesen (noch nicht importiert, sie können zurück gehen und Test Import ausschalten)
|
||||
%1 weeks calendar de %1 Wochen
|
||||
<b>please note</b>: the calendar use the holidays of your country, which is set to %1. you can change it in your %2.<br />holidays are %3 automatic installed from %4. you can changed it in %5. calendar de <b>Bitte beachten</b>: Der Kalender verwendet die Feiertages Ihres Landes, welches auf %1 eingestellt ist. Das können Sie in Ihren %2 ändern.<br />Feiertage werden %3 automatisch von %4 installiert, was in %5 änderbar ist.
|
||||
a non blocking event will not conflict with other events calendar de Ein nicht blockierender Termin ergibt keine Konflikt mit anderen Terminen
|
||||
accept or reject an invitation calendar de Einladung zu- oder absagen
|
||||
@ -152,6 +153,7 @@ holidays calendar de Feiertage
|
||||
hours calendar de Stunden
|
||||
how far to search (from startdate) calendar de wie weit suchen (vom Startdatum)
|
||||
how many minutes should each interval last? calendar de Wie viele Minute soll jedes Interval dauern?
|
||||
how many weeks should the multiple week view show? calendar de Wie viele Wochen soll die Mehrwochenansicht zeigen?
|
||||
ical calendar de iCal
|
||||
ical / rfc2445 calendar de iCal / RFC2445
|
||||
ical export calendar de iCal Export
|
||||
@ -185,6 +187,7 @@ monthly calendar de Monatlich
|
||||
monthly (by date) calendar de Monatlich (nach Datum)
|
||||
monthly (by day) calendar de Monatlich (nach Wochentag)
|
||||
monthview calendar de Monatsansicht
|
||||
multiple week view calendar de Mehrwochenansicht
|
||||
new search with the above parameters calendar de neue Suche mit den obigen Parametern
|
||||
no events found calendar de Keine Termine gefunden
|
||||
no filter calendar de Kein Filter
|
||||
@ -318,6 +321,7 @@ weekday starts on calendar de Arbeitswoche beginnt am
|
||||
weekdays calendar de Wochentage
|
||||
weekdays to use in search calendar de Wochentage für die Suche
|
||||
weekly calendar de Wöchentlich
|
||||
weeks in multiple week view calendar de Wochen in der Mehrwochenansicht
|
||||
weekview calendar de Wochenansicht
|
||||
weekview with weekend calendar de Wochenansicht mit Wochenende
|
||||
weekview without weekend calendar de Wochenansicht ohne Wochenende
|
||||
|
@ -1,6 +1,7 @@
|
||||
%1 %2 in %3 calendar en %1 %2 in %3
|
||||
%1 records imported calendar en %1 records imported
|
||||
%1 records read (not yet imported, you may go back and uncheck test import) calendar en %1 records read (not yet imported, you may go back and uncheck Test Import)
|
||||
%1 weeks calendar en %1 weeks
|
||||
<b>please note</b>: the calendar use the holidays of your country, which is set to %1. you can change it in your %2.<br />holidays are %3 automatic installed from %4. you can changed it in %5. calendar en <b>Please note</b>: The calendar use the holidays of your country, which is set to %1. You can change it in your %2.<br />Holidays are %3 automatic installed from %4. You can changed it in %5.
|
||||
a non blocking event will not conflict with other events calendar en A non blocking event will not conflict with other events
|
||||
accept or reject an invitation calendar en Accept or reject an invitation
|
||||
@ -152,6 +153,7 @@ holidays calendar en Holidays
|
||||
hours calendar en hours
|
||||
how far to search (from startdate) calendar en how far to search (from startdate)
|
||||
how many minutes should each interval last? calendar en How many minutes should each interval last?
|
||||
how many weeks should the multiple week view show? calendar en How many weeks should the multiple week view show?
|
||||
ical calendar en iCal
|
||||
ical / rfc2445 calendar en iCal / rfc2445
|
||||
ical export calendar en iCal Export
|
||||
@ -185,6 +187,7 @@ monthly calendar en Monthly
|
||||
monthly (by date) calendar en Monthly (by date)
|
||||
monthly (by day) calendar en Monthly (by day)
|
||||
monthview calendar en Monthview
|
||||
multiple week view calendar en Multiple week view
|
||||
new search with the above parameters calendar en new search with the above parameters
|
||||
no events found calendar en No events found
|
||||
no filter calendar en No filter
|
||||
@ -260,7 +263,6 @@ setting lock time calender admin en Setting Datalock Time for Calendar (default
|
||||
should invitations you rejected still be shown in your calendar ?<br>you can only accept them later (eg. when your scheduling conflict is removed), if they are still shown in your calendar! calendar en Should invitations you rejected still be shown in your calendar ?<br>You can only accept them later (eg. when your scheduling conflict is removed), if they are still shown in your calendar!
|
||||
should new events created as private by default ? calendar en Should new events created as private by default ?
|
||||
should not loged in persons be able to see your freebusy information? you can set an extra password, different from your normal password, to protect this informations. the freebusy information is in ical format and only include the times when you are busy. it does not include the event-name, description or locations. the url to your freebusy information is %1. calendar en Should not loged in persons be able to see your freebusy information? You can set an extra password, different from your normal password, to protect this informations. The freebusy information is in iCal format and only include the times when you are busy. It does not include the event-name, description or locations. The URL to your freebusy information is %1.
|
||||
should not loged in persons be able to see your freebusy information? you can set an extra password, different from your normal password, to protect this informations. the freebusy information is in ical format and only include the times when you are busy. it does not include the event-name, description or locations. the url to your freebusy information is <a href="https://localhost/egroupware/calendar/freebusy.php?user=leithoff_net_002" target="_blank">https://localhost/egroupware/calendar/freebusy.php?user=leithoff_net_002</a>. calendar en Should not loged in persons be able to see your freebusy information? You can set an extra password, different from your normal password, to protect this informations. The freebusy information is in iCal format and only include the times when you are busy. It does not include the event-name, description or locations. The URL to your freebusy information is <a href="https://localhost/egroupware/calendar/freebusy.php?user=leithoff_net_002" target="_blank">https://localhost/egroupware/calendar/freebusy.php?user=leithoff_net_002</a>.
|
||||
should the planner display an empty row for users or categories without any appointment. calendar en Should the planner display an empty row for users or categories without any appointment.
|
||||
should the status of the event-participants (accept, reject, ...) be shown in brakets after each participants name ? calendar en Should the status of the event-participants (accept, reject, ...) be shown in brakets after each participants name ?
|
||||
show birthdays from addressbook admin en Show birthdays from addressbook
|
||||
@ -319,6 +321,7 @@ weekday starts on calendar en weekday starts on
|
||||
weekdays calendar en Weekdays
|
||||
weekdays to use in search calendar en Weekdays to use in search
|
||||
weekly calendar en Weekly
|
||||
weeks in multiple week view calendar en Weeks in multiple week view
|
||||
weekview calendar en Weekview
|
||||
weekview with weekend calendar en Weekview with weekend
|
||||
weekview without weekend calendar en Weekview without weekend
|
||||
|
Loading…
Reference in New Issue
Block a user