summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorNick Palmer <nick@sluggardy.net>2007-06-11 17:32:46 +0000
committerNick Palmer <nick@sluggardy.net>2007-06-11 17:32:46 +0000
commit4ad3554909608b7a239ddbaa971335ca7fec8e10 (patch)
tree528ee38ff1bea3cc7eb2f182a2dc72766e8a299f /templates
parentbd4d5a05e8ab0a81f09a56fe44b77abb996e943d (diff)
downloadcalendar-4ad3554909608b7a239ddbaa971335ca7fec8e10.tar.gz
calendar-4ad3554909608b7a239ddbaa971335ca7fec8e10.tar.bz2
calendar-4ad3554909608b7a239ddbaa971335ca7fec8e10.zip
Add liberty plugin for a mini calendar. Handy for people using events.
Diffstat (limited to 'templates')
-rw-r--r--templates/minical.tpl42
1 files changed, 42 insertions, 0 deletions
diff --git a/templates/minical.tpl b/templates/minical.tpl
new file mode 100644
index 0000000..691bde4
--- /dev/null
+++ b/templates/minical.tpl
@@ -0,0 +1,42 @@
+{strip}
+<link rel="stylesheet" title="{$style}" type="text/css" href="{$smarty.const.CALENDAR_PKG_URL}styles/plain.css" media="all" />
+{assign var=calendar_url value="`$smarty.const.CALENDAR_PKG_URL`index.php?todate="}
+{assign var=calendar_day_url value="`$smarty.const.CALENDAR_PKG_URL`index.php?view_mode=day&todate="}
+<table class="minical" border="0" cellpadding="1" cellspacing="1">
+ <tr>
+ <th class="month odd" colspan="7">
+ {$month_name}&nbsp;{$year}
+ </th>
+ </tr>
+ <tr>
+ <td colspan="3" class="last">
+ <a href="{$calendar_url}{$last_month}"> &lt;&nbsp;&lt </a>
+ </td>
+ <td colspan="4" class="next">
+ <a href="{$calendar_url}{$next_month}"> &gt;&nbsp;&gt; </a>
+ </td>
+ </tr>
+ <tr>
+ {section name="dow" loop=$dow_abbrevs}
+ <th class="dow">{$dow_abbrevs[dow]}</th>
+ {/section}
+ </tr>
+ {section name="row" loop=$calendar}
+ <tr>
+ {section name="col" loop=$calendar[row]}
+ {assign var="date" value=$calendar[row][col]}
+ <td class="day {cycle name=daycolor values="even,odd"}{if $date.today} selected{/if}{if $date.dim} dim{/if}">
+ <a href="{$calendar_day_url}{$date.time}">
+ {$date.time|date_format:"%e"}
+ </a>
+ </td>
+ {/section}
+ </tr>
+ {/section}
+ <tr>
+ <td class="today odd" colspan="7">
+ <a href="{$calendar_url}{$today}">Today</a>
+ </td>
+ </tr>
+</table>
+{/strip}