Example #1
0
 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())
     ]
Example #2
0
File: tags.py Project: algha/tarim
 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')
     ]
Example #3
0
 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())
     ]
Example #4
0
File: post.py Project: algha/tarim
    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
Example #5
0
File: field.py Project: algha/tarim
    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())
        ]