From 9cdd2cbd8a99799fff18438a040668f2f323e3e0 Mon Sep 17 00:00:00 2001 From: sebastian Date: Tue, 22 Mar 2005 03:08:08 +0000 Subject: [PATCH] all Scheduler views redesigned --- .../htmlUI/var/templates/scheduler/day.tpl | 123 +++++++----------- .../htmlUI/var/templates/scheduler/month.tpl | 91 +++++-------- .../htmlUI/var/templates/scheduler/week.tpl | 106 ++++++++------- .../modules/htmlUI/var/ui_calendar.class.php | 12 +- .../modules/htmlUI/var/ui_scheduler.class.php | 4 + 5 files changed, 150 insertions(+), 186 deletions(-) diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl index 72d3ef26a..37d3f5ae3 100755 --- a/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl +++ b/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl @@ -1,88 +1,65 @@ {$SCHEDULER->buildDay()} {assign var="_scale" value=$SCHEDULER->getDayTimingScale()} +
+
+

##Daily View##

+
 
+

{$SCHEDULER->curr.monthname} {$SCHEDULER->curr.day}, {$SCHEDULER->curr.year}

- - - - - - + +
<<curr.isToday} bgcolor="grey"{/if}>{$SCHEDULER->curr.dayname}, {$SCHEDULER->curr.year}-{$SCHEDULER->curr.month}-{$SCHEDULER->curr.day}>>
- {assign var="_entrys" value=$SCHEDULER->getDayEntrys()} - {foreach from=$_scale item="_hour"} + {* Tag vor/zurück, code um heutigen Tag abzufragen + + + + + + *} - {assign var="_year" value=$_Day.year} - {assign var="_month" value=$_Day.month} + - {* jede Reiehe entspr. einer Stunde *} - {* linke spalte mit Uhrzeit *} - - - + {* Multi-action checkboxen, die brauchen wir aber höchstens bei den Einträgen um mehere auf einmal zu löschen ? + + *} + + - {/foreach} -
<<curr.isToday} bgcolor="grey"{/if}>{$SCHEDULER->curr.dayname}, {$SCHEDULER->curr.year}-{$SCHEDULER->curr.month}-{$SCHEDULER->curr.day}>>
{$_hour} - - {if is_array($_entrys[$_hour])} - {foreach from=$_entrys[$_hour] item="i"} {* hier werden die Einträge welche in der jeweil. h beginnen durchlaufen *} -
- {$i.title} -
- {$i.start}-{$i.end} -
- {$i.creator} -
- {/foreach} - {/if} - -
TimeShow Info
+ {assign var="_entrys" value=$SCHEDULER->getDayEntrys()} + {foreach from=$_scale item="_hour"} + {assign var="_year" value=$_Day.year} + {assign var="_month" value=$_Day.month} - - - - - - - - - -{* timing-ansich - -{assign var="_divisor" value=180} -{assign var="_minwidth" value=10} - - - - - - -
- {$SCHEDULER->curr.year}-{$SCHEDULER->curr.month}-{$SCHEDULER->curr.day} - - {assign var="_oneday" value=$SCHEDULER->getDayTiming($SCHEDULER->curr.year, $SCHEDULER->curr.month, $SCHEDULER->curr.day)} - - {foreach from=$_oneday item="i"} - - {if is_array($i.entry)} - + {* *} + + - {else} - - {/if} - {/foreach} -
- {if $i.length/$_divisor > $_minwidth} - - {$i.entry.title} - {$i.entry.start|regex_replace:"/[0-9]+T/":""}-{$i.entry.end|regex_replace:"/[0-9]+T/":""} - {$i.entry.creator} - +
{$_hour|string_format:"%02d"}:00 + {if is_array($_entrys[$_hour])} + {foreach from=$_entrys[$_hour] item="i"} {* hier werden die Einträge welche in der jeweil. h beginnen durchlaufen *} + {$i.title}: + {$i.start}-{$i.end} + {$i.creator} + {/foreach} {/if} -
-
-*} + {/foreach} + + + + {* Multiaction buttons +
+ + + +
+
 
+ *} + +
+
+ diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/month.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/month.tpl index 630c95738..3a88a5aba 100755 --- a/livesupport/modules/htmlUI/var/templates/scheduler/month.tpl +++ b/livesupport/modules/htmlUI/var/templates/scheduler/month.tpl @@ -2,69 +2,38 @@ {$SCHEDULER->buildWeek()} - -
-
-

##Monthly View##

- - - {foreach from=$SCHEDULER->Week item="_Weekday"} - - {/foreach} - - -{foreach from=$SCHEDULER->Month item="_Day"} - {if $_Day.isSelected} - {assign var="percentage" value=$SCHEDULER->getDayUsagePercentage($_Day.year, $_Day.month, $_Day.day)} - {else} - {assign var="percentage" value="0"} - {/if} - - {if $_Day.isFirst} + +
+
+

##Monthly View##

+
{$_Weekday.label.full}
- {/if} + {foreach from=$SCHEDULER->Week item="_Weekday"} + + {/foreach} + - + {foreach from=$SCHEDULER->Month item="_Day"} + {if $_Day.isSelected} + {assign var="percentage" value=$SCHEDULER->getDayUsagePercentage($_Day.year, $_Day.month, $_Day.day)} + {else} + {assign var="percentage" value="0"} + {/if} - {if $_Day.isLast} + {if $_Day.isFirst} + + {/if} + + + + {if $_Day.isLast} - {/if} -{/foreach} - -{* -
{$_Weekday.label.full}
-

{$_Day.day}

-
-
-
-
+

{$_Day.day}

+
+
+
+
- - - {foreach from=$SCHEDULER->Week item="_Weekday"} - + {/if} {/foreach} - - -{foreach from=$SCHEDULER->Month item="_Day"} - {if $_Day.isSelected} - {assign var="percentage" value=$SCHEDULER->getDayUsagePercentage($_Day.year, $_Day.month, $_Day.day)} - {else} - {assign var="percentage" value="0"} - {/if} - - {if $_Day.isFirst} - - {/if} - - - - {if $_Day.isLast} - - {/if} -{/foreach} - -
{$_Weekday.label.full}
- {$_Day.day} -
-
-*} \ No newline at end of file +
+
diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl index 0e9495061..24bea088c 100755 --- a/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl +++ b/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl @@ -1,58 +1,70 @@ {$SCHEDULER->buildWeek()} {assign var="_scale" value=$SCHEDULER->getDayTimingScale()} - +
+ +
+

##Weekly View##

-
- - - {foreach from=$SCHEDULER->Week item="_Day"} {* hier werden die Tagesnamen angezeigt *} - - {/foreach} - - + {* +
+ + +
+ *} - - - {foreach from=$SCHEDULER->Week item="_Day"} {* hier werden die Tagesnummern angezeigt *} - - {/foreach} - +
 
+

{$SCHEDULER->curr.week}. ##KW## {$SCHEDULER->curr.year}

+
<< {$_Day.label.full}>>
- {$_Day.day} -
+ + {* Link Woche zurück << *} + + {foreach from=$SCHEDULER->Week item="_Day"} {* hier werden die Tagesnamen angezeigt *} + + + {/foreach} + {* Link Woche vor >> *} + - {assign var="_entrys" value=$SCHEDULER->getWeekEntrys()} - {foreach from=$_scale item="_hour"} + + + {foreach from=$SCHEDULER->Week item="_Day"} {* hier werden die Tagesnummern angezeigt *} + + + {/foreach} + - {assign var="_year" value=$_Day.year} - {assign var="_month" value=$_Day.month} + {assign var="_entrys" value=$SCHEDULER->getWeekEntrys()} + {foreach from=$_scale item="_hour"} + {assign var="_year" value=$_Day.year} + {assign var="_month" value=$_Day.month} - {* jede Reiehe entspr. einer Stunde *} - {* linke spalte mit Uhrzeit *} - - {foreach from=$SCHEDULER->Week item="_day"} - {* jede Zelle entpr. einem Tag (natürlich nur einer h davon) *} - + + + {foreach from=$SCHEDULER->Week item="_day"} + {if is_array($_entrys[$_day.day][$_hour])} + + + {else} + + + {/if} + {/foreach} + {/foreach} - - - {/foreach} - - -
{$_Day.label.full}
+ {$_Day.day} +
{$_hour} - - {if is_array($_entrys[$_day.day][$_hour])} - {foreach from=$_entrys[$_day.day][$_hour] item="i"} {* hier werden die Einträge welche in der jeweil. h beginnen durchlaufen *} -
- {$i.title} -
- {$i.start}-{$i.end} -
- {$i.creator} -
- {/foreach} - {/if} - -
{$_hour} + {foreach from=$_entrys[$_day.day][$_hour] item="i"} +

{$i.title|truncate:12}

+

{$i.start|truncate:5:""} - {$i.end|truncate:5:""}

+

{$i.creator}

+ {/foreach} +
+ + +
 
+ + + diff --git a/livesupport/modules/htmlUI/var/ui_calendar.class.php b/livesupport/modules/htmlUI/var/ui_calendar.class.php index 334bafab8..736bd092f 100755 --- a/livesupport/modules/htmlUI/var/ui_calendar.class.php +++ b/livesupport/modules/htmlUI/var/ui_calendar.class.php @@ -9,7 +9,7 @@ class uiCalendar function buildDecade() { - if (is_array($this->Decade)) return TRUE; + if (is_array($this->Decade)) return; for ($Year = $this->curr['year']-5; $Year<=$this->curr['year']+5; $Year++) { $this->Decade[] = array( @@ -23,6 +23,8 @@ class uiCalendar function buildYear() { + if (is_array($this->Year)) return; + require_once 'Calendar/Year.php'; require_once 'Calendar/Month.php'; @@ -44,7 +46,7 @@ class uiCalendar function buildMonth() { - if (is_array($this->Month)) return TRUE; + if (is_array($this->Month)) return; require_once 'Calendar/Month/Weekdays.php'; require_once 'Calendar/Day.php'; @@ -74,7 +76,7 @@ class uiCalendar function buildWeek() { - if (is_array($this->Week)) return FALSE; + if (is_array($this->Week)) return; require_once 'Calendar/Week.php'; @@ -100,7 +102,7 @@ class uiCalendar function buildDay() { - if (is_array($this->Day)) return FALSE; + if (is_array($this->Day)) return; require_once 'Calendar/Day.php'; @@ -126,7 +128,7 @@ class uiCalendar function buildHour() { - if (is_array($this->Hour)) return FALSE; + if (is_array($this->Hour)) return; require_once 'Calendar/Hour.php'; diff --git a/livesupport/modules/htmlUI/var/ui_scheduler.class.php b/livesupport/modules/htmlUI/var/ui_scheduler.class.php index 81d109c73..f60d44dce 100755 --- a/livesupport/modules/htmlUI/var/ui_scheduler.class.php +++ b/livesupport/modules/htmlUI/var/ui_scheduler.class.php @@ -8,9 +8,11 @@ class uiScheduler extends uiCalendar $this->curr['view'] = 'month'; $this->curr['year'] = strftime("%Y"); $this->curr['month'] = strftime("%m"); + $this->curr['week'] = strftime("%V"); $this->curr['day'] = strftime("%d"); $this->curr['hour'] = strftime("%H"); $this->curr['dayname'] = strftime("%A"); + $this->curr['monthname']= strftime("%B"); $this->curr['isToday'] = TRUE; } @@ -59,9 +61,11 @@ class uiScheduler extends uiCalendar $this->curr['year'] = strftime("%Y", $stampTarget); $this->curr['month'] = strftime("%m", $stampTarget); + $this->curr['week'] = strftime("%V", $stampTarget); $this->curr['day'] = strftime("%d", $stampTarget); $this->curr['hour'] = strftime("%H", $stampTarget); $this->curr['dayname'] = strftime("%A", $stampTarget); + $this->curr['monthname']= strftime("%B", $stampTarget); if ($this->curr['year'] == strftime("%Y") && $this->curr['month'] == strftime("%m") && $this->curr['day'] == strftime("%d")) $this->curr['isToday'] = TRUE;