Beispiel #1
0
 def __init__(self, rh, event_, active_menu_item=None, **kwargs):
     assert event_ == kwargs.setdefault('event', event_)
     self.event = event_
     kwargs['base_layout_params'] = {
         'active_menu_item': active_menu_item or self.sidemenu_option,
         'event_types': [(et.name, et.title) for et in EventType]
     }
     WPMainBase.__init__(self, rh, **kwargs)
Beispiel #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._setTitle('Indico [{}]'.format(
             category.title).encode('utf-8'))
     WPMainBase.__init__(self, rh, **kwargs)
     self._mathjax = kwargs.pop('mathjax', False)
Beispiel #3
0
 def _getHeadContent(self):
     head_content = WPMainBase._getHeadContent(self)
     if self.atom_feed_url:
         title = self.atom_feed_title or _("Indico 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
Beispiel #4
0
 def getJSFiles(self):
     return (WPMainBase.getJSFiles(self) +
             self._includeJSPackage('Management') +
             self._asset_env['modules_event_cloning_js'].urls() +
             self._asset_env['modules_event_management_js'].urls())
Beispiel #5
0
 def getJSFiles(self):
     return WPMainBase.getJSFiles(self) + self._includeJSPackage(
         'Management')
Beispiel #6
0
 def __init__(self, rh, active_menu_item, **kwargs):
     kwargs['active_menu_item'] = active_menu_item
     WPMainBase.__init__(self, rh, **kwargs)
Beispiel #7
0
 def __init__(self, rh, goBack=""):
     WPMainBase.__init__(self, rh)
     self._goBack = goBack
Beispiel #8
0
 def __init__(self, rh, active_menu_item=None, **kwargs):
     kwargs['active_menu_item'] = active_menu_item or self.sidemenu_option
     WPMainBase.__init__(self, rh, **kwargs)
Beispiel #9
0
 def getJSFiles(self):
     return WPMainBase.getJSFiles(
         self) + self._asset_env['modules_categories_js'].urls()
Beispiel #10
0
 def getJSFiles(self):
     return WPMainBase.getJSFiles(self) + self._includeJSPackage(
         ['Management', 'RoomBooking'])
Beispiel #11
0
 def _getTitle(self):
     return '{} - {}'.format(WPMainBase._getTitle(self), _('Room Booking'))