def fields(self): return [ TD('#').setRender(lambda item: self.clousureForID(item)).setWidth( 60), TD('Name', 'name'), TD('Slug', 'slug'), TD('Created at').setRender( lambda item: item.created_at.to_date_string()) ]
def fields(self): return [ TD('#').setRender(lambda item: self.clousureForID(item)).setWidth( 60), TD('Title', 'title'), TD('Slug', 'slug'), TD('Type', 'type'), TD('Count', 'count') ]
def fields(self): return [ TD('#').setRender(lambda item: self.clousureForID(item)).setWidth( 60), TD('Name', 'name'), TD('Roles').setRender( lambda item: item.roles.implode('name', ', ')), TD('Email', 'email'), TD('Created at').setRender( lambda item: item.created_at.to_date_string()) ]
def fields(self): _fields = self.getQuery('fields') fields = [] id = TD('#').setRender( lambda item: self.clousureForID(item) ).setWidth(60) fields.append(id) author = TD('Author').setRender( lambda item: item.user.name ) fields.append(author) for field in _fields: _field = TD(field.title, field.name) fields.append(_field) click = TD('click').setRender( lambda item: item.click ) fields.append(click) updated_at = TD('Updated at').setRender( lambda item: item.updated_at.to_date_string() ) fields.append(updated_at) created_at = TD('Created at').setRender( lambda item: item.created_at.to_date_string() ) fields.append(created_at) return fields
def fields(self): type = self.getQuery('types').first(lambda item: item.isActive == True) return [ TD('#').loadModalAsync('getField', 'asyncGetField', 'saveField', 'id', 'Edit'), TD('Title', 'title'), TD('Name', 'name'), TD('Type', 'field_type'), TD('Regex', 'regex'), TD('Place', 'place'), TD('Created at').setRender( lambda item: item.created_at.to_date_string()) ]