diff --git a/TracRendezVous/tracrendezvous/event/templates/event_display.html b/TracRendezVous/tracrendezvous/event/templates/event_display.html index 662e45e..508e310 100644 --- a/TracRendezVous/tracrendezvous/event/templates/event_display.html +++ b/TracRendezVous/tracrendezvous/event/templates/event_display.html @@ -1,7 +1,7 @@ - +

${event.name}edit

@@ -22,7 +22,7 @@ - +
${event.location.coordinate_str()}
wiki page
diff --git a/TracRendezVous/tracrendezvous/event/templates/event_list.html b/TracRendezVous/tracrendezvous/event/templates/event_list.html index 7db8793..23084d7 100644 --- a/TracRendezVous/tracrendezvous/event/templates/event_list.html +++ b/TracRendezVous/tracrendezvous/event/templates/event_list.html @@ -19,7 +19,7 @@
E
I
N
Z
E
L
T
E
R
M
I
N
- ${render_event(event, True)} + ${render_event(event, True, wiki_on)}
diff --git a/TracRendezVous/tracrendezvous/event/templates/events.html b/TracRendezVous/tracrendezvous/event/templates/events.html index 8f5f51f..3cff754 100644 --- a/TracRendezVous/tracrendezvous/event/templates/events.html +++ b/TracRendezVous/tracrendezvous/event/templates/events.html @@ -27,7 +27,7 @@ - ${render_event(event)} + ${render_event(event, wiki_on=wiki_on)} diff --git a/TracRendezVous/tracrendezvous/event/web_ui.py b/TracRendezVous/tracrendezvous/event/web_ui.py index 0cf6b63..776f255 100644 --- a/TracRendezVous/tracrendezvous/event/web_ui.py +++ b/TracRendezVous/tracrendezvous/event/web_ui.py @@ -24,6 +24,7 @@ from trac.util.datefmt import get_timezone, utc, format_time, localtz from trac.web.chrome import INavigationContributor, ITemplateProvider, add_stylesheet, add_warning, add_notice, add_ctxtnav, add_script, add_link, Chrome from trac.web import IRequestHandler from trac.wiki import IWikiSyntaxProvider +from trac.wiki.web_ui import WikiModule from dateutil import rrule from genshi.builder import tag @@ -728,7 +729,7 @@ class EventModule(Component): events = sorted(events, key=attrgetter("time_begin")) title = _("Event Overview") session_tzname, selected_tz = get_tz(req.session.get('tz', self.env.config.get("trac", "default_timezone") or None)) - return "event_list.html", {"events" : events, "title" : title, "session_tzname" : session_tzname, "selected_tz" : selected_tz}, None + return "event_list.html", {"wiki_on" : self.env.is_component_enabled(WikiModule), "events" : events, "title" : title, "session_tzname" : session_tzname, "selected_tz" : selected_tz}, None def __display_upcoming_events(self, req): if req.args.get("format") == 'ical': @@ -746,13 +747,13 @@ class EventModule(Component): add_link(req, 'alternate', conversion_href, conversion[1], conversion[3], conversion[0]) session_tzname, selected_tz = get_tz(req.session.get('tz', self.env.config.get("trac", "default_timezone") or None)) - n = datetime.now(utc) + n = utc.localize(datetime.utcnow()) n = n.replace(hour=0, minute=0, second=0, microsecond=0) end = n + timedelta(183) end = end.replace(hour=23, minute=0, second=59, microsecond=999) table, headers = self.__get_upcoming_table(n, end) - return "events.html", {"table" : table, "headers" : headers, "session_tzname" : session_tzname, "format" : "%a, %d.%m.%Y", "selected_tz" : selected_tz, "title" : _("Upcoming Events for"), "title2" : "%s - %s" % (n.strftime('%A, %d.%m.%Y %H:%M'), end.strftime('%A, %d.%m.%Y %H:%M')), "now" : n, "end" : end}, None + return "events.html", {"wiki_on" : self.env.is_component_enabled(WikiModule), "table" : table, "headers" : headers, "session_tzname" : session_tzname, "format" : "%a, %d.%m.%Y", "selected_tz" : selected_tz, "title" : _("Upcoming Events for"), "title2" : "%s - %s" % (n.strftime('%A, %d.%m.%Y %H:%M'), end.strftime('%A, %d.%m.%Y %H:%M')), "now" : n, "end" : end}, None def __display_events_by_day(self, req): add_stylesheet (req, 'hw/css/event.css')