def valid_options(self, workspace): questions = Qa.available_for_user(request.identity['user']._id, workspace) return dict(questions=[{ '_id': qa._id, 'title': qa.title } for qa in questions])
def get_all(self, workspace, **kw): return dict(page='qa-index', fields={ 'columns_name': [_('Label'), _('Question'), _('Filter'), _('Id')], 'fields_name': 'title question parent_precondition hash'.split() }, entities=Qa.available_for_user( request.identity['user']._id, workspace), actions=False, workspace=workspace)