Location: PHPKode > scripts > Lightweight Club Calendar > lc-calendar-0.9.4/designs/default/calendar.tpl
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>
	{foreach from=$data item=week}
		{foreach from=$week item=day}
			{if $day.current_month}
					<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>
				<td class="not_in_month"></td>

* Display a link for creation of new events
{if $LCC_CORE->checkRight('event_add')}
		<a href="{$smarty.server.SCRIPT_NAME}?lcc_action=edit_event">{#lcc_link_addevent#}</a>
Return current item: Lightweight Club Calendar