diff options
Diffstat (limited to 'scripts/calendar_plugin2.py')
-rw-r--r-- | scripts/calendar_plugin2.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/calendar_plugin2.py b/scripts/calendar_plugin2.py index a7f752c..71a7a0c 100644 --- a/scripts/calendar_plugin2.py +++ b/scripts/calendar_plugin2.py @@ -97,10 +97,18 @@ class TabularCalendarPlugin: self.template_env = jinja2.Environment(loader=template_loader) locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8') - def _get_calendar(self): + def _get_calendar_tabs(self): return self.template_env.get_template('tabcalendar.j2').render({ 'months': self.months, 'events': self.events, + 'class': 'expanded' + }).encode('utf-8') + + def _get_calendar_events(self): + return self.template_env.get_template('calendar.j2').render({ + 'months': self.months, + 'events': self.events, + 'class': 'expanded' }).encode('utf-8') def process_content(self, page_content): @@ -108,7 +116,8 @@ class TabularCalendarPlugin: for filename, content in page_content.iteritems(): t = string.Template(content) return_value[filename] = t.safe_substitute( - tabcalendar = self._get_calendar(), + tabcalendar_tabs = self._get_calendar_tabs(), + tabcalendar_events = self._get_calendar_events(), ) return return_value |