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] } WPDecorated.__init__(self, rh, **kwargs)
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)
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)) WPDecorated.__init__(self, rh, **kwargs) self._mathjax = kwargs.pop('mathjax', False)
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)
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)) WPDecorated.__init__(self, rh, **kwargs) self._mathjax = kwargs.pop('mathjax', False)
def __init__(self, rh, event_, **kwargs): assert event_ == kwargs.setdefault('event', event_) self.event = event_ WPDecorated.__init__(self, rh, **kwargs) start_dt_local = event_.start_dt_display.astimezone(event_.display_tzinfo) end_dt_local = event_.end_dt_display.astimezone(event_.display_tzinfo) dates = ' ({})'.format(to_unicode(format_date(start_dt_local, format='long'))) if start_dt_local.date() != end_dt_local.date(): if start_dt_local.year == end_dt_local.year and start_dt_local.month == end_dt_local.month: dates = ' ({}-{})'.format(start_dt_local.day, to_unicode(format_date(end_dt_local, format='long'))) else: dates = ' ({} - {})'.format(to_unicode(format_date(start_dt_local, format='long')), to_unicode(format_date(end_dt_local, format='long'))) self.title = '{} {}'.format(strip_tags(self.event.title), dates)
def __init__(self, rh, event_, **kwargs): assert event_ == kwargs.setdefault('event', event_) self.event = event_ WPDecorated.__init__(self, rh, **kwargs) start_dt_local = event_.start_dt_display.astimezone( event_.display_tzinfo) end_dt_local = event_.end_dt_display.astimezone(event_.display_tzinfo) dates = ' ({})'.format(format_date(start_dt_local, format='long')) if start_dt_local.date() != end_dt_local.date(): if start_dt_local.year == end_dt_local.year and start_dt_local.month == end_dt_local.month: dates = ' ({}-{})'.format( start_dt_local.day, format_date(end_dt_local, format='long')) else: dates = ' ({} - {})'.format( format_date(start_dt_local, format='long'), format_date(end_dt_local, format='long')) self.title = f'{strip_tags(self.event.title)} {dates}' page_title = kwargs.get('page_title') if page_title: self.title += f': {strip_tags(page_title)}'
def __init__(self, rh, active_menu_item, **kwargs): kwargs['active_menu_item'] = active_menu_item WPDecorated.__init__(self, rh, **kwargs)
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)
def __init__(self, rh, **kwargs): kwargs['active_menu_item'] = self.sidemenu_option WPDecorated.__init__(self, rh, **kwargs)
def __init__(self, rh, active_menu_item, **kwargs): kwargs['active_menu_item'] = active_menu_item WPDecorated.__init__(self, rh, **kwargs)
def __init__(self, rh, **kwargs): kwargs['active_menu_item'] = self.sidemenu_option kwargs['sprite_url'] = url_for( 'rooms_new.sprite', {'version': _cache.get('rooms-sprite-token')}) WPDecorated.__init__(self, rh, **kwargs)
def __init__(self, rh, **kwargs): kwargs['active_menu_item'] = self.sidemenu_option kwargs['sprite_url'] = url_for('rooms_new.sprite', {'version': _cache.get('rooms-sprite-token')}) WPDecorated.__init__(self, rh, **kwargs)