diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl
index bfa9623ca..91a3bb49b 100644
--- a/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl
+++ b/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl
@@ -1,7 +1,7 @@
{$SCHEDULER->buildDay()}
{assign var="_scale" value=$SCHEDULER->getDayTimingScale()} {* get the 24h scale *}
{assign var="_entrys" value=$SCHEDULER->getDayEntrys()} {* get all entrys on given day from scheduler *}
-{assign var="_day" value=$SCHEDULER->curr} {* to have year, month, day in between_additem.tpl *}
+{assign var="_day" value=$SCHEDULER->curr} {* to have year, month, day in between_additem.tpl *}
@@ -22,25 +22,42 @@
{if is_array($_entrys[$_hour])}
-
- {$_hour|string_format:"%02d"}:00
- |
-
+ |
+ {$_hour|string_format:"%02d"}:00
+ |
+
{if $_entrys[$_hour].end}
+ {foreach from=$_entrys[$_hour].end item="i"}
+ {if $i.startsyesterday}
+
+ 
+
+ {$i.title}
+ ##yesterday## {$i.start} - {$i.end}
+ {$i.creator}
+
+ {/if}
+ {/foreach}
{include file="scheduler/between_additem.tpl"}
{/if}
- {if $_entrys[$_hour].start}
+ {if $_entrys[$_hour].start}
{foreach from=$_entrys[$_hour].start item="i"}
{$i.title}
- {$i.start}-{$i.end}
- {$i.creator}
- {if $i.endshere}
- {include file="scheduler/between_additem.tpl"}
- {/if}
+
+ {if $i.endstoday}
+ {$i.start} - {$i.end}
+ {$i.creator}
+ {if $i.endshere}
+ {include file="scheduler/between_additem.tpl"}
+ {/if}
+ {else}
+ {$i.start} - ##tomorrow## {$i.end}
+ {$i.creator}
+ {/if}
{/foreach}
{/if}
@@ -48,7 +65,7 @@
{if $_entrys.span[$_hour]}
span
{/if}
- |
+
{else}
diff --git a/livesupport/modules/htmlUI/var/ui_scheduler.class.php b/livesupport/modules/htmlUI/var/ui_scheduler.class.php
index 0f3e6a597..db00a259f 100755
--- a/livesupport/modules/htmlUI/var/ui_scheduler.class.php
+++ b/livesupport/modules/htmlUI/var/ui_scheduler.class.php
@@ -227,15 +227,15 @@ class uiScheduler extends uiCalendar
return FALSE;
foreach ($arr as $key => $val) {
- $start = $this->_datetime2timestamp($val['start']);
+ $start = $this->_datetime2timestamp($val['start']);
$end = $this->_datetime2timestamp($val['end']);
- $Y = strftime('%Y', $start);
+ $Y = strftime('%Y', $start);
$m = number_format(strftime('%m', $start));
$d = number_format(strftime('%d', $start));
$h = number_format(strftime('%H', $start));
$M = number_format(strftime('%i', $start));
- ## item starts today -> put metadata to array
+ ## item starts today
if (strftime('%Y%m%d', $start) === $thisDay) {
$items[number_format(strftime('%H', $start))]['start'][] = array(
'id' => $this->Base->gb->_idFromGunid($val['playlistId']),
@@ -245,16 +245,30 @@ class uiScheduler extends uiCalendar
'title' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_TITLE),
'creator' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_CREATOR),
'type' => 'Playlist',
- 'endshere' => strftime('%H', $start) === strftime('%H', $end) ? TRUE : FALSE
+ 'endstoday' => strftime('%d', $start) === strftime('%d', $end) ? TRUE : FALSE,
+ 'endshere' => strftime('%H', $start) === strftime('%H', $end) ? TRUE : FALSE
);
}
+
/* mark the span as in use
for ($n = number_format(strftime('%H', $start))+1; $n <= number_format(strftime('%H', $end)); $n++) {
$items['span'][$n] = TRUE;
- } */
- ## item which end today
+ }
+ */
+
+ ## item ends today
if (strftime('%Y%m%d', $end) === $thisDay && strftime('%H', $start) !== strftime('%H', $end)) {
- $items[number_format(strftime('%H', $end))]['end'] = TRUE;
+ $items[number_format(strftime('%H', $end))]['end'][] =
+ array(
+ 'id' => $this->Base->gb->_idFromGunid($val['playlistId']),
+ 'scheduleid'=> $val['id'],
+ 'start' => substr($val['start'], strpos($val['start'], 'T')+1),
+ 'end' => substr($val['end'], strpos($val['end'], 'T') + 1),
+ 'title' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_TITLE),
+ 'creator' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_CREATOR),
+ 'type' => 'Playlist',
+ 'startsyesterday' => strftime('%d', $start) === strftime('%d', $end) ? FALSE : TRUE,
+ );
}
}