{foreach $weekdays as $weekday} {$dayXpos = 10*$i+3.5} {if $i == 1 && $page == 0}
{$weekday.weekday}
{else if {$weekday.weekday|substr:0:7} != "Samstag" && {$weekday.weekday|substr:0:7} != "Sonntag" && {$weekday.feiertag} == ""}
{$weekday.weekday}
{**}
{*
*} {else if {$weekday.feiertag} == ""}
{$weekday.weekday}
{**}
{*
*} {else}
{$weekday.weekday} {$weekday.feiertag}         
{**}
{*
*} {/if}
{*FULL DAY TERMINE*} {$shift = 0} {$terminlength = 960} {$terminstart = 390} {$height = ($terminlength/15)} {$start = 4 + ($terminstart - 420)/15} {foreach $weekday.fulldaytermine as $key=>$termin}
{$termin.typ|substr:0:3|escape}.
{$shift = $shift+1.1} {/foreach} {$lastFullDayterm = $shift} {*TERMINE IN SLOTS SORTIEREN*} {$termNr = 0} {$currlayer = 0} {$usedslots = 0} {$layer = 0} {foreach $weekday.termine as $key=>$termin} {$terminlength = ({$termin.termdauer|date_format:"%H"}*60 + {$termin.termdauer|date_format:"%M"})} {$terminstart = ({$termin.termtime|date_format:"%H"}*60 + {$termin.termtime|date_format:"%M"})} {if {$terminstart} == 0} {$terminlength = {$termin.termdauer}*60} {$terminstart = 450+$lastarbtermend+15} {$lastarbtermend = $terminstart-450 + $termin.termdauer * 60} {/if} {for $slot = 0 to 10} {if $terminstart > $layer[$slot]} {$weekday.termine[$termNr].slot = $slot} {$layer[$slot] = $terminstart + $terminlength} {if $slot > $usedslots} {$usedslots = $usedslots+1} {/if} {break} {/if} {/for} {$termNr = $termNr + 1} {/foreach} {*TERMINE ANZEIGEN*} {$lastarbtermend = 0} {$width = (10-$lastFullDayterm) / ($usedslots+1)} {foreach $weekday.termine as $key=>$termin} {$shift = $lastFullDayterm + $width*$termin.slot} {$terminlength = ({$termin.termdauer|date_format:"%H"}*60 + {$termin.termdauer|date_format:"%M"})} {$terminstart = ({$termin.termtime|date_format:"%H"}*60 + {$termin.termtime|date_format:"%M"})} {if {$terminstart} == 0} {$terminlength = {$termin.termdauer}*60} {$terminstart = 450+$lastarbtermend+15} {$lastarbtermend = $terminstart-450 + $termin.termdauer * 60} {$termin.typ = 'Arbeitsleistung'} {else} {/if} {$height = ($terminlength/15)} {$start = 4 + ($terminstart - 420)/15} {if {$termin.typ} != 'Arbeitsleistung'}
Dauer {if {$termin.termdauer|date_format:'%k'} > 0} {$termin.termdauer|date_format:'%k'}h{/if} {if {$termin.termdauer|date_format:'%M'} > 0}{$termin.termdauer|date_format:'%M'}min{/if}
In {$termin.ort|escape}{if $termin.ortsteil}-{$termin.ortsteil|escape}{/if}
Bei {$termin.vname|escape} {$termin.nname|escape} {$termin.firma|escape}'> {else}
{/if} {$termin.typ|substr:0:3|escape}.
{/foreach} {*ANWESENDE MITARBEITER ANZEIGEN*} {$ma_nr = 0} {foreach $weekday.ma_check as $key=>$mitarb} {$ma_nr = $ma_nr + 1.2} {$height = 1.2} {$width = 9} {$start = $ma_nr + 0.5}
{if {$mitarb.complete} == 0}{else}{/if}{$mitarb.vname|escape} {$mitarb.nname|substr:0:1|escape}.
{/foreach} {$i=$i+1} {/foreach} {$i = 0} {while $i < 16} {$i = $i+1}
{{$i+6}|str_pad:2:'0':0}:00
{/while} {$time = {$smarty.now|date_format:"%H"}*60 + {$smarty.now|date_format:"%M"}}
{*{if $page == 0} {for $i = 1 to 7}
{$weather.{$i}.low}°C - {$weather.{$i}.high}°C
{/for} {/if}*}
{foreach $users as $user} {if $user.openvacation < 0} {$user.vname|escape} {$user.nname|escape} ({$user.openvacation|escape}) {else} {$user.vname|escape} {$user.nname|escape} ({$user.openvacation|escape}) {/if} {/foreach}