{*
Calendar template
This Template just displays a calendar displaying the events.
It gets called and filled from $lcc_view->printWeekCalendar()
The names of the weekdays come from the users language file.
The variables are named {#weekdayname_1#} through {#weekdayname_7#},
but of course this is dependant of the language file used.
Variables assigned by LCC_View:
$data The calendars data. The first dimension of the array represents the weeks
of the month, each holding an array of days.
Each day is an associative array containing metadata and the events of that day.
Metadata are in key => value form. The events are stored under the key 'events'
at the same level as the metadata.
'events' is an array containing the data of the events. The key of each event is
the ID of that event. Event data is a associative array with key=>value pairs.
$year The number of the Year (e.g. 2007)
$month The number of the month (1-12)
*}
<table class="calendar">
<caption><a id="prev_month" href="{$smarty.server.SCRIPT_NAME}?lcc_action=show_calendar&lcc_year={$year}&lcc_month={$month-1}"><</a> {$month|toMonthString} {$year} <a id="next_month" href="{$smarty.server.SCRIPT_NAME}?lcc_action=show_calendar&lcc_year={$year}&lcc_month={$month+1}">></a></caption>
<tr>
<th>{$LCC_VIEW->getWeekDayName(0)}</th>
<th>{$LCC_VIEW->getWeekDayName(1)}</th>
<th>{$LCC_VIEW->getWeekDayName(2)}</th>
<th>{$LCC_VIEW->getWeekDayName(3)}</th>
<th>{$LCC_VIEW->getWeekDayName(4)}</th>
<th>{$LCC_VIEW->getWeekDayName(5)}</th>
<th>{$LCC_VIEW->getWeekDayName(6)}</th>
</tr>
{foreach from=$data item=week}
<tr>
{foreach from=$week item=day}
{if $day.current_month}
<td>
<div class="day">{$day.day_of_month}.</div>
{foreach from=$day.events key=event_id item=event_data}
<div class="event" style="background-color:{$event_data.color}">
{if $LCC_CORE->checkRight('event_view')}
<a href="{$smarty.server.SCRIPT_NAME}?lcc_action=show_event&lcc_id={$event_data.id}">{$event_data.title}</a>
{else}
{$event_data.title}
{/if}
</div>
{/foreach}
</td>
{else}
<td class="not_in_month"></td>
{/if}
{/foreach}
</tr>
{/foreach}
</table>
{*
* Display a link for creation of new events
*}
{if $LCC_CORE->checkRight('event_add')}
<div>
<a href="{$smarty.server.SCRIPT_NAME}?lcc_action=edit_event">{#lcc_link_addevent#}</a>
</div>
{/if}