Exemple #1
0
 def __init__(self, rh, event_, active_menu_item=None, **kwargs):
     assert event_ == kwargs.setdefault('event', event_)
     self.event = event_
     self.title = strip_tags(self.event.title)
     kwargs['base_layout_params'] = {
         'active_menu_item': active_menu_item or self.sidemenu_option,
         'event_types': [(et.name, et.title) for et in EventType]
     }
     WPDecorated.__init__(self, rh, **kwargs)
Exemple #2
0
 def __init__(self, rh, category, **kwargs):
     kwargs['category'] = category
     self.category = category
     self.atom_feed_url = kwargs.get('atom_feed_url')
     self.atom_feed_title = kwargs.get('atom_feed_title')
     if category:
         self.title = category.title
     WPDecorated.__init__(self, rh, **kwargs)
     self._mathjax = kwargs.pop('mathjax', False)
Exemple #3
0
 def _getHeadContent(self):
     head_content = WPDecorated._getHeadContent(self)
     if self.atom_feed_url:
         title = self.atom_feed_title or _("fossir Atom feed")
         head_content += (
             '<link rel="alternate" type="application/atom+xml" title="{}" href="{}">'
             .format(escape(title), self.atom_feed_url))
     if self._mathjax:
         head_content += MathjaxMixin._getHeadContent(self)
     return head_content
Exemple #4
0
 def __init__(self, rh, active_menu_item=None, **kwargs):
     kwargs['active_menu_item'] = active_menu_item or self.sidemenu_option
     WPDecorated.__init__(self, rh, **kwargs)
Exemple #5
0
 def getJSFiles(self):
     return (WPDecorated.getJSFiles(self) +
             self._includeJSPackage('Management') +
             self._asset_env['modules_event_cloning_js'].urls() +
             self._asset_env['modules_event_management_js'].urls())
 def __init__(self, rh, active_menu_item, **kwargs):
     kwargs['active_menu_item'] = active_menu_item
     WPDecorated.__init__(self, rh, **kwargs)
Exemple #7
0
 def getJSFiles(self):
     return WPDecorated.getJSFiles(
         self) + self._asset_env['modules_categories_js'].urls()
Exemple #8
0
 def getJSFiles(self):
     return WPDecorated.getJSFiles(self) + self._includeJSPackage(
         ['Management', 'RoomBooking'])