[-*Smarty*-] [-config_load file="default.conf"-] [-*Load the Language Definitions*-] [-config_load file="lang.$USER_LANG"-] [-* we want to include out stylesheet for this view*-] [-fetch file="$TPL_STYLE_PATH/year.css" assign="css"-] [-eval var=$css-] [-if $PRINT_VIEW != 1-] [-*Main Navigation*-] [-include file="$TPL_NAME/views/global/navigation.html"-] [-/if-] [-/if-]
<< [-$DATE|date_format:#_PC_DATE_FORMAT_Y#-] >> [-if $PRINT_VIEW != 1-] [-pc_view_select label=#_PC_TPL_VIEW_LABEL# class=""-]
[-strip-]
[-* Loop through each month of the year *-] [-foreach name=months item=month key=monthnum from=$CAL_FORMAT-] [-* check to see if we're starting a new row *-] [-if $smarty.foreach.months.iteration %4 eq 1 -] [-/if-] [-if $smarty.foreach.months.iteration %3 eq 1 -] [-/if-]
[-* get the current year we're viewing *-] [-assign var="y" value=$DATE|date_format:"%Y"-] [-* figure out what month we are in *-] [-assign var="m" value=$monthnum+1-] [-* make sure we have a preceeding 0 on the month number *-] [-assign var="m" value=$m|string_format:"%02d"-] [-* create our link to the month *-] [-foreach name=daynames item=day from=$S_SHORT_DAY_NAMES-] [-/foreach-] [-foreach name=weeks item=days from=$month-] [-foreach name=day item=date from=$days-] [-assign var="themonth" value=$date|date_format:"%m"-] [-if $date == $TODAY_DATE && $themonth == $smarty.foreach.months.iteration-] [-assign var="stylesheet" value="monthtoday"-] [-elseif $themonth == $smarty.foreach.months.iteration-] [-assign var="stylesheet" value="monthon"-] [-else-] [-assign var="stylesheet" value="monthoff"-] [-/if-] [-/foreach-] [-/foreach-]
[-$A_MONTH_NAMES.$monthnum-]
[-$day-]
[-if $A_EVENTS.$date|@count > 2 -] [-assign var="classname" value="event-three"-] [-elseif $A_EVENTS.$date|@count > 1 -] [-assign var="classname" value="event-two"-] [-elseif $A_EVENTS.$date|@count > 0 -] [-assign var="classname" value="event-one"-] [-else-] [-assign var="classname" value="event-none"-] [-/if-] [-$date|date_format:"%d"-]
[-/foreach-]
[-/strip-] [-if $PRINT_VIEW != 1-]
[-#_PC_THEME_PRINT#-]
[-/if-] [-*footer*-] [-include file="$TPL_NAME/views/global/footer.html"-]