def _before(self, *args, **kw): '''Prepare tmpl_context with navigation menus''' if self.assignment: c.sub_menu = menu(self.assignment, True) elif self.sheet: c.sub_menu = menu(self.sheet, True) elif self.event: c.sub_menu = menu(self.event, True)
def _before(self, *args, **kwargs): '''Prepare tmpl_context with navigation menus''' c.sub_menu = menu(self.submission) if request.user: c.newer = self.submission.newer_submissions() if c.newer: log.debug('Newer submissions than %d: ' % (self.submission.id) + ','.join(str(s.id) for s in c.newer)) else: c.newer = []
def _before(self, *args, **kwargs): '''Prepare tmpl_context with navigation menus''' c.sub_menu = menu(self.submission) if request.user: c.newer = self.submission.newer_submissions() if c.newer: log.debug('Newer submissions than %r: %s', self.submission, ','.join(str(s.id) for s in c.newer)) else: c.newer = []
def __init__(self, event): self.event = event self.sheets = SheetsController(event=self.event) self.lessons = LessonsController(event=self.event) self.admin = EventAdminController(event=self.event) c.event = self.event self.allow_only = Any( is_public(self.event), has_teacher(self.event), has_permission('manage'), msg=u'This Event is not public' ) c.sub_menu = menu(self.event, True)
def _before(self, *args, **kwargs): '''Prepare tmpl_context with navigation menus''' #c.side_menu = entity_menu(self.event, 'Sheets', self.event.sheets) c.sub_menu = menu(self.event)
def _before(self, *args, **kwargs): '''Prepare tmpl_context with navigation menus''' c.sub_menu = menu(self.assignment)
def _before(self, *args, **kw): '''Prepare tmpl_context with navigation menus''' c.sub_menu = menu(self.lesson.event, True) super(LessonController, self)._before(*args, **kw)