Author: ralfbecker
New Revision: 28973
URL: http://www.egroupware.org/viewvc/egroupware?rev=28973&view=rev
Log:
first version of a yearly planner
Modified:
trunk/calendar/inc/class.calendar_ui.inc.php
trunk/calendar/inc/class.calendar_uiviews.inc.php
trunk/calendar/lang/egw_de.lang
trunk/calendar/lang/egw_en.lang
trunk/calendar/templates/default/app.css
Modified: trunk/calendar/inc/class.calendar_ui.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/calendar/inc/class.calendar_ui.inc.php?rev=28973&r1=28972&r2=28973&view=diff
— trunk/calendar/inc/class.calendar_ui.inc.php (original)
+++ trunk/calendar/inc/class.calendar_ui.inc.php Fri Jan 15 04:53:12 2010
@@ -629,6 +629,11 @@
‘selected’ => $this->view == ‘planner’ && $this->sortby == ‘user’,
),
array(
-
'text' => lang('yearly planner'), -
'value' => 'menuaction=calendar.calendar_uiviews.planner&sortby=month', -
'selected' => $this->view == 'planner' && $this->sortby == 'month', -
), -
array( 'text' => lang('listview'), 'value' => 'menuaction=calendar.calendar_uilist.listview', 'selected' => $this->view == 'listview',
Modified: trunk/calendar/inc/class.calendar_uiviews.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/calendar/inc/class.calendar_uiviews.inc.php?rev=28973&r1=28972&r2=28973&view=diff
— trunk/calendar/inc/class.calendar_uiviews.inc.php (original)
+++ trunk/calendar/inc/class.calendar_uiviews.inc.php Fri Jan 15 04:53:12 2010
@@ -238,7 +238,19 @@
*/
function &planner($home=false)
{
-
if (!$this->planner_days) // planner monthview
-
if ($this->sortby == 'month') // yearly planner with month rows -
{ -
$this->first = $this->bo->date2array($this->date); -
$this->first['day'] = 1; -
unset($this->first['raw']); -
$this->last = $this->first; -
$this->last['year']++; -
$this->last = $this->bo->date2ts($this->last)-1; -
$GLOBALS['egw_info']['flags']['app_header'] .= ': '.lang('yearly planner').' '. -
lang(egw_time::to($this->first,'F')).' '.egw_time::to($this->first,'Y').' - '. -
lang(egw_time::to($this->last,'F')).' '.egw_time::to($this->last,'Y'); -
} -
elseif (!$this->planner_days) // planner monthview { if ($this->day < 15) // show one complete month {
@@ -278,11 +290,11 @@
$search_params[‘start’] = $this->first;
$search_params[‘end’] = $this->last;
$search_params[‘enum_groups’] = $this->sortby == ‘user’;
-
$events = $this->bo->search($search_params);
-
$events =& $this->bo->search($search_params); if ($this->debug > 0) $this->bo->debug_message('uiviews::planner() date=%1: first=%2, last=%3',False,$this->date,$this->bo->date2string($this->first),$this->bo->date2string($this->last));
-
$content =& $this->plannerWidget($events,$this->first,$this->last,$this->sortby == 'user' ? false : (int) $this->cat_id);
-
$content =& $this->plannerWidget($events,$this->first,$this->last,$this->sortby != 'category' ? $this->sortby : (int) $this->cat_id); if (!$home) {
@@ -1441,18 +1453,39 @@
* @param array $events events to show
* @param mixed $start start-time of the grid
* @param mixed $end end-time of the grid
-
- @param boolean/int $by_cat rows by sub-categories of $by_cat (cat_id or 0 for upmost level) or by users (false)
-
- @param string|int $by_cat rows by sub-categories of $by_cat (cat_id or 0 for upmost level) or by ‘user’ or ‘month’
- @param string $indent=’’ string for correct indention
-
@return string with widget
*/
- function &plannerWidget($events,$start,$end,$by_cat=0,$indent=’’)
-
function &plannerWidget(&$events,$start,$end,$by_cat=0,$indent=’’)
{
$content = $indent.’’."\n";// display the header, containing a headerTitle and multiple headerRows with the scales $content .= $indent."\t".'<div class="plannerHeader">'."\n";-
// display the headerTitle -
$title = $by_cat === false ? lang('User') : lang('Category');
-
// display the headerTitle, and get sort2labels -
switch($by_cat) -
{ -
case 'user': -
$title = lang('User'); -
$sort2label = $this->_get_planner_users(); -
break; -
case 'month': -
$title = lang('Month'); -
$sort2label = array(); -
$time = new egw_time($start); -
for($n = 0; $n < 12; ++$n) -
{ -
$sort2label[$time->format('Y-m')] = lang($time->format('F')).' '.$time->format('Y'); -
$time->modify('+1 month'); -
} -
break; -
default: -
$title = lang('Category'); -
$sort2label = array(); -
break; -
} $content .= $indent."\t\t".'<div class="plannerHeaderTitle th">'.$title."</div>\n"; // display the headerRows with the scales
@@ -1467,34 +1500,37 @@
${$v}[‘minute’] = ${$v}[‘second’] = 0;
${$v} = $this->bo->date2ts($$v);
}-
$days = 1 + (int) round(($last - $first) / DAY_s); // we have to use round to get the right number if daylight saving changes -
if ($days >= 28) // display the month scale -
{ -
$content .= $this->plannerMonthScale($first,$days,$indent."\t\t\t"); -
} -
if ($days >= 5) // display the week scale -
{ -
$content .= $this->plannerWeekScale($first,$days,$indent."\t\t\t"); -
} -
$content .= $this->plannerDayScale($first,$days,$indent."\t\t\t"); // day-scale, always displayed -
if ($days <= 7) // display the hour scale -
{ -
$content .= $this->plannerHourScale($start,$days,$indent."\t\t\t");
-
if ($by_cat === 'month') -
{ -
$content .= $this->plannerDayOfMonthScale($indent."\t\t\t"); -
} -
else -
{ -
$days = 1 + (int) round(($last - $first) / DAY_s); // we have to use round to get the right number if daylight saving changes -
if ($days >= 28) // display the month scale -
{ -
$content .= $this->plannerMonthScale($first,$days,$indent."\t\t\t"); -
} -
if ($days >= 5) // display the week scale -
{ -
$content .= $this->plannerWeekScale($first,$days,$indent."\t\t\t"); -
} -
$content .= $this->plannerDayScale($first,$days,$indent."\t\t\t"); // day-scale, always displayed -
if ($days <= 7) // display the hour scale -
{ -
$content .= $this->plannerHourScale($start,$days,$indent."\t\t\t"); -
} } $content .= $indent."\t\t</div>\n"; // end of the plannerHeaderRows $content .= $indent."\t</div>\n"; // end of the plannerHeader // sort the events after user or category
-
$rows = $sort2label = array(); -
if ($by_cat === false) // planner by user -
{ -
$sort2label = $this->_get_planner_users(); -
}
-
$rows = array(); if (!is_array($events)) $events = array(); foreach($events as $key => $event) {
-
if ($by_cat === false) // planner by user
-
if ($by_cat === 'user') // planner by user { foreach($event['participants'] as $sort => $status) {
@@ -1505,6 +1541,16 @@
}
}
}-
elseif ($by_cat === 'month') // planner by month / yearly planner -
{ -
$sort = date('Y-m',$event['start']); -
$rows[$sort][] =& $events[$key]; -
// end in a different month? -
if ($sort != ($end_sort = date('Y-m',$event['end']))) -
{ -
$rows[$end_sort][] =& $events[$key]; -
} -
} else // planner by cat { foreach($this->_get_planner_cats($event['category'],$sort2label,$sort2color) as $sort)
@@ -1519,12 +1565,20 @@
foreach($sort2label as $sort => $label)
{
if (!isset($rows[$sort]) && (!$this->cal_prefs[‘planner_show_empty_rows’] ||-
$by_cat === false && $this->cal_prefs['planner_show_empty_rows'] == 'cat' || -
$by_cat !== false && $this->cal_prefs['planner_show_empty_rows'] == 'user'))
-
$by_cat === 'user' && $this->cal_prefs['planner_show_empty_rows'] == 'cat' || -
is_int($by_cat) && $this->cal_prefs['planner_show_empty_rows'] == 'user')) { continue; // dont show empty categories or user rows } $class = $class == 'row_on' ? 'row_off' : 'row_on'; -
if ($by_cat === 'month') -
{ -
$time = new egw_time($sort.'-01'); -
$start = $time->format('ts'); -
$time->modify('+1month -1second'); -
$end = $time->format('ts'); -
if ($sort == date('Y-m')) $class = 'calToday'; -
} $content .= $this->plannerRowWidget(isset($rows[$sort]) ? $rows[$sort] : array(),$start,$end,$label,$class,$indent."\t"); } $content .= $indent."</div>\n"; // end of the plannerWidget
@@ -1811,6 +1865,29 @@
return $content; }-
/**
-
- Creates DayOfMonth scale for planner by month
-
-
- @param string $indent
-
- @return string
-
*/
-
function plannerDayOfMonthScale($indent)
-
{
-
$day_width = round(100 / 31,2); -
$content .= $indent.'<div class="plannerScale">'."\n"; -
$today = egw_time::to('now','d'); -
for($left = 0,$i = 0; $i < 31; $left += $day_width,++$i) -
{ -
$class = 1+$i == $today ? 'calToday' : ($i & 1 ? 'row_on' : 'row_off'); -
$content .= $indent."\t".'<div class="plannerDayOfMonthScale '.$class.'" style="left: '.$left.'%; width: '.$day_width.'%;">'. -
(1+$i)."</div>\n"; -
} -
$content .= $indent."</div>\n"; // end of plannerScale -
return $content; -
}
/**
- Creates hour scale for the planner
@@ -1935,7 +2012,7 @@
if ($time <= $start) return 0; // we are left of our scale
if ($time >= $end) return 100; // we are right of our scale
- Creates hour scale for the planner
-
if ($this->planner_days)
-
if ($this->planner_days || $this->sortby == 'month') { $percent = ($time - $start) / ($end - $start); }
Modified: trunk/calendar/lang/egw_de.lang
URL: http://www.egroupware.org/viewvc/egroupware/trunk/calendar/lang/egw_de.lang?rev=28973&r1=28972&r2=28973&view=diff— trunk/calendar/lang/egw_de.lang (original)
+++ trunk/calendar/lang/egw_de.lang Fri Jan 15 04:53:12 2010
@@ -99,7 +99,6 @@
displays your default calendar view on the startpage (page you get when you enter egroupware or click on the homepage icon)? calendar de Soll Ihre Standard-Kalender-Ansicht auf der Startseite angezeigt werden (die Seite die sich nach dem Login öffnet oder wenn Sie auf Home klicken)?
do not include events of group members calendar de Zeige nicht die Termine der Gruppenmitglieder
do you want a weekview with or without weekend? calendar de Wollen Sie eine Wochenansicht mit oder ohne Wochenende?
-do you want to be notified about new or changed appointments? you be notified about changes you make yourself.
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 de Wollen Sie über neue oder geänderte Termine benachrichtigt werden? Sie werden nie über eigene Ãnderungen benachrichtigt.
Sie können die Benachrichtigungen auf verschiedene Ãnderungen begrenzen. Jede Zeile enthält die Benachrichtigungen der darüber liegenden. Alle Ãnderungen umfasst den Titel, die Beschreibung, Teilnehmer, aber keine Antworten der Teilnehmer. Wenn der Ersteller eines Termins irgendeine Benachrichtigung will, erhält er automatisch auch die Antworten der Teilnehmer, wie Zusagen oder Absagen.
do you want to edit serialevent als exception? - ok = edit exception, abort = edit serial calendar de Möchten Sie den Termin der Serie als Ausnahme bearbeiten? Klicken Sie OK um den Termin als Einzeltermin (Ausnahme) zu bearbeiten, Abbrechen um die Terminserie zu verändern.
do you want to receive a regulary summary of your appointsments via email?
the summary is sent to your standard email-address on the morning of that day or on monday for weekly summarys.
it is only sent when you have any appointments on that day or week. calendar de Möchten Sie eine regelmäÃige Zusammenfassung Ihrer Termine via E-Mail erhalten?
Die Zusammenfassung wird täglich (jeden Morgen), oder für eine wöchentliche Zusammenfassung Montags an Ihre standard E-Mail Adresse gesendet.
Die Benachrichtigung wird nur versendet wenn Sie am nächsten Tag oder in der nächsten Woche auch einen Termin haben.
do you wish to autoload calendar holidays files dynamically? admin de Sollen die Feiertage automatisch geladen werden?
@@ -207,6 +206,7 @@
minutes calendar de Minuten
modified calendar de Geändert
mon calendar de Mo
+month calendar de Monat
monthly calendar de Monatlich
monthly (by date) calendar de Monatlich (nach Datum)
monthly (by day) calendar de Monatlich (nach Wochentag)
@@ -393,6 +393,7 @@
workday calendar de Arbeitstag
workdays calendar de Arbeitstage
yearly calendar de Jährlich
+yearly planner calendar de Jahresplaner
yearview calendar de Jahresansicht
you are not allowed to book the resource selected: calendar de Sie sind nicht berechtigt die ausgewählte Ressource zu buchen.
you can either set a year or a occurence, not both !!! calendar de Sie können nur entweder das Jahr oder die Wiederholung angeben, nicht beides!Modified: trunk/calendar/lang/egw_en.lang
URL: http://www.egroupware.org/viewvc/egroupware/trunk/calendar/lang/egw_en.lang?rev=28973&r1=28972&r2=28973&view=diff— trunk/calendar/lang/egw_en.lang (original)
+++ trunk/calendar/lang/egw_en.lang Fri Jan 15 04:53:12 2010
@@ -207,6 +207,7 @@
minutes calendar en Minutes
modified calendar en Modified
mon calendar en Mon
+month calendar en Month
monthly calendar en Monthly
monthly (by date) calendar en Monthly (by date)
monthly (by day) calendar en Monthly (by day)
@@ -393,6 +394,7 @@
workday calendar en Work day
workdays calendar en Work days
yearly calendar en Yearly
+yearly planner calendar en Yearly planner
yearview calendar en Year view
you are not allowed to book the resource selected: calendar en You are not allowed to book the resource selected:
you can either set a year or a occurence, not both !!! calendar en You can either set a Year or a Occurrence, not both !!!Modified: trunk/calendar/templates/default/app.css
URL: http://www.egroupware.org/viewvc/egroupware/trunk/calendar/templates/default/app.css?rev=28973&r1=28972&r2=28973&view=diff— trunk/calendar/templates/default/app.css (original)
+++ trunk/calendar/templates/default/app.css Fri Jan 15 04:53:12 2010
@@ -367,7 +367,7 @@/* plannerScale represents a scale-row of the plannerHeader, containing multiple planner{Day|Week|Month}Scales
/
-.plannerScale,.plannerScaleDay{
+.plannerScale,.plannerScaleDay {
position: relative;
top: 0px;
left: 0%;
@@ -379,7 +379,7 @@
height: 28px;
line-height: 14px;
}
-.plannerDayScale,.plannerMonthScale,.plannerWeekScale,.plannerHourScale {
+.plannerDayScale,.plannerMonthScale,.plannerWeekScale,.plannerHourScale,.plannerDayOfMonthScale {
position: absolute;
top: 0px;
/ left+width: is set by the code on runtime */
@@ -403,7 +403,7 @@
.plannerMonthScale {
font-weight: bold;
}
-.plannerDayScale img,.plannerWeekScale img,.plannerMonthScale img {
+.plannerDayScale img,.plannerWeekScale img,.plannerMonthScale img,.plannerDayOfMonthScale img {
vertical-align: middle;
}
Throughout its 18-year history, RSA Conference consistently attracts the
world’s best and brightest in the field, creating opportunities for Conference
attendees to learn about information security’s most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs -