From b07f854b5a84c626fc3f6ef0f2fc0e0d75b657f1 Mon Sep 17 00:00:00 2001
From: Graham Cole <chckens@sucs.org>
Date: Fri, 6 Mar 2009 12:48:03 +0000
Subject: [PATCH] deal better with there being no events. Of course, that will
 never happen... ;-)

---
 templates/events.tpl | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/templates/events.tpl b/templates/events.tpl
index 89a6b14..c42ddf4 100644
--- a/templates/events.tpl
+++ b/templates/events.tpl
@@ -4,6 +4,10 @@
 <div class="box">
 <div class="boxhead"><h2>Upcoming Events</h2></div>
 <div class="boxcontent">
+{if $events|@count < 1}
+<p>No events :(</p> 
+<p>Pester <tt>exec AT sucs.org</tt> to organise some!</p>
+{else}
 {foreach from=$events item=event}
 <h3>{$event.name}
 {if $editable}<a href="{$event.category}_{$event.id}?action=edit">(Edit)</a>{/if} 
@@ -13,6 +17,7 @@
 {$event.description}
 </p>
 {/foreach}
+{/if}
 </div>
 <div class="hollowfoot"><div><div></div></div></div>
 </div>
-- 
GitLab