From 0fe18d887e5b48b3c2f2e42de601fbc33917a9ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 9 Dec 2011 16:41:01 +0100 Subject: [PATCH] add a "today" class to events in list view --- tabellio/agenda/event.py | 5 +++++ tabellio/agenda/folder_templates/view.pt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tabellio/agenda/event.py b/tabellio/agenda/event.py index 95d561e..72ed8f6 100644 --- a/tabellio/agenda/event.py +++ b/tabellio/agenda/event.py @@ -102,6 +102,11 @@ class Event(BaseEvent): def klass(self): return 'generic-event' + def todayclass(self): + if self.start.timetuple()[:3] == datetime.datetime.today().timetuple()[:3]: + return 'today' + return '' + class EventBaseView: def next_event_url(self, portal_type=None): # do not go more than 100 days in the future diff --git a/tabellio/agenda/folder_templates/view.pt b/tabellio/agenda/folder_templates/view.pt index 065014f..2f1cb74 100644 --- a/tabellio/agenda/folder_templates/view.pt +++ b/tabellio/agenda/folder_templates/view.pt @@ -205,7 +205,7 @@ jq('#tabellio-agenda tbody a').click(