示例#1
0
class ProjectTable(Table):

    view = LinkColumn(
        header='View',
        links=[
            Link(
                text='',
                viewname='project-detail',
                args=(A('id'), ),
                attrs={'class': 'glyphicon glyphicon-eye-open'},
            ),
        ],
        searchable=False,
        sortable=False,
    )

    title = CustomNoneColumn(field='title', header='Title')
    status = TagColumn(field='ajax_status',
                       header='Status',
                       wrap_class='task-status',
                       attrs=center_attrs)
    completion = Column(field='ajax_completion', header='Completion')
    deadline = NoneableDatetimeColumn(field='deadline',
                                      header='Deadline',
                                      format=date_time_format)
    notes = BleachTrimColumn(field='notes', trim_count=250, header='Notes')

    class Meta:
        model = Project
        search = True
        ajax = True
        ajax_source = reverse_lazy('data-project')

        attrs = {'class': 'table-striped table-hover'}
示例#2
0
class pc_listTable(Table):
    #id = Column(field='id',header='ID')

    name = Column(field='host_name', header='Host Name')
    service_tag = Column(field='service_tag', header='Service_Tag')
    hosttype = Column(field='hosttype.name', header='Type')
    host_model = Column(field='host_model', header='Model')
    receive_date = Column(field='receive_date', header='Receive_date')
    user = Column(field='user_list.full_name', header='User Name')
    bl_list = Column(field='user_list.dept_list.bl_list.bl_name', header='BL')
    site = Column(field='site.sitename', header='Site Code')
    host_status = Column(field='host_status', header='Status')
    seatno = Column(field='seat_no', header='Seat No')
    asset_code = Column(field='asset_code', header='Asset Code')
    OP = LinkColumn(header=u'操作',
                    searchable=False,
                    sortable=False,
                    links=[
                        Link(text=u'编辑', viewname='pcedit', args=(A('id'), )),
                    ])

    class Meta:
        model = pc_list
        ext_button = True
        template_name = 'table/buttons_table.html'
        ajax = True
        ajax_source = reverse_lazy('pc_table_data')
示例#3
0
class SiteUserTable(Table):

    first_name = Column(
        field='first_name',
        header='First name',
    )
    last_name = Column(
        field='last_name',
        header='Last name',
    )
    username = Column(field='username', header='Username')
    email = Column(field='email', header='Email')
    # is_superuser=AssertiveColumn(field='is_superuser',header='Is SuperUser')

    Action = LinkColumn(
        header='Action',
        links=[
            LinkColumnDelete(viewname='delete_user',
                             args=(A('id'), ),
                             text='Delete'),
            # Link(viewname='update_user', args=(A('id'),), text='Update'),
            LinkColumnAccess(viewname='access_status',
                             args=(A('id'), ),
                             text='Access change')
        ])

    class Meta:
        model = User
        ajax = True
        ajax_source = reverse_lazy('ajax_site_user_table_data')
示例#4
0
class UserGroupLeaderTable(Table):
	name = LinkColumn(field='name',header=u'Group Name', links=[Link(text=A('name'), viewname='leaders-members-list-view', args=(A('id',),))])
	created_date = Column(field='created_date', header=u'Created Date', attrs={'class': 'custom'})
	last_modified = Column(field='last_modified', header=u'Last Modified date', attrs={'class': 'custom'})
	class Meta:
		model = UserGroup
		info_format = u"Total: _TOTAL_  First: _START_  Last: _END_"
示例#5
0
class CategoryTable(Table, ImageColumnChange):

    name = Column(field='name', header='Name')
    image = ImageColumnChange(field='image.url',
                              header='Image',
                              image_title='image')

    descriptions = Column(field='descriptions', header='Descriptions')

    created_at = Column(field='created_at', header='Create Date')
    updated_at = DatetimeColumn(field='updated_at',
                                header='Update date',
                                format='%d-%m-%Y %H:%I:%S')
    Action = LinkColumn(header='Action',
                        links=[
                            LinkColumnDelete(viewname='delete_category',
                                             args=(A('id'), ),
                                             text='Delete'),
                            LinkColumnUpdate(viewname='update_category',
                                             args=(A('id'), ),
                                             text='Update')
                        ])

    class Meta:
        model = Category
        ajax = True
        ajax_source = reverse_lazy('category_table_data')
示例#6
0
class ContactTaskTable_Link(Table):
    """
    Meant to be used from the "perspective" of a single Task.
    Displays the associated contacts, and the role of each.
    """
    view =  LinkColumn(
        header='View', 
        links=[
            Link(
                text='',
                viewname='contact-detail', 
                args=(
                    A('con.id'),
                ),
                attrs={
                    'class':
                        'glyphicon glyphicon-eye-open'
                },
            ),
        ],
        searchable=False,
        sortable=False,
    )

    class Meta:
        model = TaskContactAssoc
        search = True
        ajax = False

        attrs = {'class': 'table-striped table-hover'}
示例#7
0
class CultureTable(Table):
    photo = ImageColumn(field='variete.photo', header='Photo', sortable=False)
    appelation = Column(field='variete.nom', header='Appelation')
    date_debut = DatetimeColumn(field='date_debut', header='Cultivée depuis', format="%d %B %Y")
    type_conservation = Column(field='type_conservation', header='Type de conservation')
    action = LinkColumn(header='Action',
                        sortable=False,
                        links=[
                            Link(
                                text='Fiche variété',
                                viewname='s5appadherant:variete_detail',
                                args=(A('variete.id'),))
                        ])

    def __init__(self, *args, **kwargs):
        jardin = kwargs.pop('jardin', None)
        if not isinstance(jardin, Jardin):
            raise ValueError("CultureTable: aucun jardin défini")

        super(CultureTable, self).__init__(*args, **kwargs)

        self.opts.ajax_source = reverse_lazy('s5appadherant:culture_data', kwargs={
            'jardin_id': jardin.id
        })
        self.addons.pagination.length = 5

    class Meta:
        search = False
        pagination_next = 'Suivant'
        pagination_prev = 'Précédent'
        zero_records = "Aucune variété n'est cultivée dans ce jardin"
        ajax = True
        model = Culture
        attrs = {'class': 's5-table table-hover table-striped'}
class OrgTable(Table):
    view = LinkColumn(
        header='View',
        links=[
            Link(
                text='',
                viewname='org-detail',
                args=(A('id'), ),
                attrs={'class': 'glyphicon glyphicon-eye-open'},
            ),
        ],
        searchable=False,
        sortable=False,
    )

    name = CustomNoneColumn(field='name', header='Name')
    cons = Column(field='num_contacts', header='Contacts')
    notes = BleachTrimColumn(field='notes', header='Notes')

    class Meta:
        model = Organization
        search = True
        ajax = True
        ajax_source = reverse_lazy('data-organization')

        attrs = {'class': 'table-striped table-hover'}
示例#9
0
class bl_listTable(Table):
    bl_name = Column(field='bl_name', header='BL Name')
    bl_leader = Column(field='bl_leader', header='BL Leader')

    OP = LinkColumn(header=u'操作', sortable=False, links=[])

    class Meta:
        model = bl_list
示例#10
0
class MenuplanTable(Table):
    name = Column(field='name', header='Name')
    creationDate = Column(field='creationDate', header='Creation Date')
    links = LinkColumn(
        header='Actions',
        links=[
            Link(text='Open', viewname='menuplans.detail', args=(A('pk'), ))
        ]
    )
示例#11
0
class siteTable(Table):
    id = Column(field='id', header='ID')
    sitename = Column(field='sitename', header='Site Code')
    officename = Column(field='officename', header='Office Name')
    address = Column(field='address', header='Address')
    OP = LinkColumn(header=u'操作', sortable=False, links=[])

    class Meta:
        model = site
示例#12
0
class Dept_listTable(Table):
    bl_list = Column(field='bl_list', header='BL Name')
    dept_name = Column(field='dept_name', header='Dept Name')
    dept_leader = Column(field='dept_leader', header='dept_leader')
    #address = Column(field='address', header='Address')
    OP = LinkColumn(header=u'操作', sortable=False, links=[])

    class Meta:
        model = dept_list
示例#13
0
class ProfilJardinTable(Table):
    appelation = Column(field='appelation', header='Appelation')
    proprietaire = LinkColumn(field='proprietaire',
                              header='Proprietaire',
                              links=[
                                  Link(text=A('proprietaire.user.first_name'),
                                       viewname='s5appadherant:profil_detail',
                                       args=(A('proprietaire.id'), ))
                              ])
    commune = Column(field='adresse.commune', header='Commune')
    exposition = Column(field='exposition', header='Exposition')
    type_sol = Column(field='type_sol', header='Type de sol')
    irrigation = Column(field='irrigation', header='Irrigation')
    superficie = Column(field='superficie', header='Superficie')
    mise_en_culture = Column(field='mise_en_culture', header='Mise en culture')
    action = LinkColumn(header='Action',
                        sortable=False,
                        links=[
                            Link(text='Détail',
                                 viewname='s5appadherant:jardin_detail',
                                 args=(A('id'), ))
                        ])

    def __init__(self, *args, **kwargs):
        adherant = kwargs.pop('adherant', None)
        if not isinstance(adherant, Adherant):
            raise ValueError(u'ProfilJardinTable: aucun adhérant défini')

        super(ProfilJardinTable, self).__init__(*args, **kwargs)

        self.opts.ajax_source = reverse_lazy(
            's5appadherant:profil_jardin_data',
            kwargs={'adherant_id': adherant.id})
        self.addons.pagination.length = 5

    class Meta:
        search = False
        pagination_next = 'Suivant'
        pagination_prev = 'Précédent'
        zero_records = "Aucun jardin cultivé"
        ajax = True
        model = Jardin
        attrs = {'class': 's5-table table-hover table-striped'}
示例#14
0
class GroupmemberLeaderTable(Table):
	member__first_name = LinkColumn(field='member__first_name',header=u'Member Name', links=[Link(text=A('member__first_name'), viewname='leaders-member_schoose_view', args=(A('member_id',),A('user_group_id',),))])
	#member__first_name = Column(field='member__first_name', header=u'Member Name', attrs={'class': 'custom'})
	user_group__name = Column(field='user_group__name', header=u'Group Name', attrs={'class': 'custom'})
	member__mobile_number = Column(field='member__mobile_number', header=u'Mobile Number', attrs={'class': 'custom'})
	member__aadhar_number = Column(field='member__aadhar_number', header=u'QR Code', attrs={'class': 'custom'})
	created_date = Column(field='created_date', header=u'Added Date', attrs={'class': 'custom'})
	class Meta:
		model = Groupmember
		info_format = u"Total: _TOTAL_  First: _START_  Last: _END_"
示例#15
0
class UserleadersTable(Table):
#'leader__name','user__mobile_number','user__aadhar_number','create_date','last_modified'
	user__name = LinkColumn(field='user__name',header=u'Member Name', links=[Link(text=A('user__name'), viewname='leaders Group List Template View', args=(A('user_id',),))])
	user__mobile_number = Column(field='user__mobile_number', header=u'Mobile Number', attrs={'class': 'custom'})
	user__aadhar_number = Column(field='user__aadhar_number', header=u'QR Code', attrs={'class': 'custom'})
	create_date = Column(field='create_date', header=u'Added Date', attrs={'class': 'custom'})
	last_modified = Column(field='last_modified', header=u'Last Modified date', attrs={'class': 'custom'})
	class Meta:
		model = Userleaders
		info_format = u"Total: _TOTAL_  First: _START_  Last: _END_"
示例#16
0
class adm_siteTable(Table):
    username = Column(field='User.username', header='IT Name')
    site = Column(field='site', header='Site Name')
    # pc_dispose = Column(field='pc_dispose',header='PC-Dispose')
    # stat_adm = Column(field='stat_adm',header='Stat Admin')
    # it_adm = Column(field='it_adm',header='IT Admin')
    # system_adm = Column(field='system_adm',header='System Admin')
    OP = LinkColumn(header=u'操作', sortable=False, links=[])

    class Meta:
        model = adm_site
示例#17
0
文件: tables.py 项目: jmrojas2/lemco
class ArchivoTable(Table):
    number = Column(field='number', header=u'Numero de Archivo')
    status = Column(field='status', header=u'Estado')
    actual_time = Column(field='actual_time', header=u'Tiempo en Proceso')
    total_time = Column(field='accumulated_time', header=u'Tiempo Total')
    ver = LinkColumn(header=u'Detalles',
                     links=[
                         Link(text=u'Ver',
                              viewname='dashboard_file_check2',
                              args=(A('number'), ))
                     ],
                     sortable=False)
示例#18
0
class ClassicNoteTable(Table):

    id = LinkColumn(
        header=u'#',
        links=[
            MyLink(field='id', viewname='note_page', args=(A('id'), )),
        ],
    )
    # id = Column(field='id', header=u'#',
    #             header_attrs={'width': '5%'})
    user = Column(field='get_author_name',
                  header=u'用户',
                  header_attrs={'width': '20%'})

    problem_info = LinkColumn(
        header=u'题目信息',
        links=[
            MyLink(field='get_problem_info',
                   viewname='problem_page',
                   args=(A('problem.id'), )),
        ],
        header_attrs={'width': '30%'},
    )
    # problem_info = Column(field='get_problem_info', header=u'题目信息',
    #                       header_attrs={'width': '20%'})

    pub_time = MyDateTimeColumn(field='pub_time',
                                header=u'发表时间',
                                format="%Y年%m月%d日 %H:%I")
    update_time = MyDateTimeColumn(field='update_time',
                                   header=u'最后更新时间',
                                   format="%Y年%m月%d日 %H:%I")

    class Meta:
        model = ClassicNote
        search = True
        search_placeholder = 'search'
        pagination = True
        ajax = True
示例#19
0
class SpectraTable(Table):
    inventory_id = Column(field='standard.inventory_id', header='Inventory ID')
    molecule = Column(field='standard.molecule.name', header='Molecule')
    precursor_mz = MzColumn(field='precursor_mz', header='Precursor m/z')
    adduct = AdductColumn(field='adduct.delta_formula', header='Adduct')
    view = LinkColumn(header='', sortable=False, searchable=False,
                      links=[Link(text='View', viewname='fragmentSpectrum-detail', kwargs={'pk': Accessor('pk')})])

    class Meta:
        model = FragmentationSpectrum
        ajax = True
        ajax_source = reverse_lazy('spectra_table')
        sort = [(0, 'asc')]
class TaskLinkMixin(Table):

    view = LinkColumn(
        header='View',
        links=[
            Link(
                text='',
                viewname='task-detail',
                args=(A('id'), ),
                attrs={'class': 'glyphicon glyphicon-eye-open'},
            ),
        ],
        searchable=False,
        sortable=False,
    )
示例#21
0
class ContactViewMixin(Table):
    """
    A link to a contact
    """
    view = LinkColumn(
        header='View',
        links=[
            Link(
                text='',
                viewname='contact-detail',
                args=(A('id'), ),
                attrs={'class': 'glyphicon glyphicon-eye-open'},
            ),
        ],
        searchable=False,
        sortable=False,
    )
示例#22
0
class adm_infoTable(Table):
    username = Column(field='User.username', header='IT Name')
    #site = Column(field='site', header='Site Name')
    pc_dispose = Column(field='pc_dispose', header='PC-Dispose')
    stat_adm = Column(field='stat_adm', header='Stat Admin')
    it_adm = Column(field='it_adm', header='IT Admin')
    system_adm = Column(field='system_adm', header='System Admin')
    OP = LinkColumn(header=u'操作',
                    sortable=False,
                    links=[
                        Link(text=u'详细',
                             viewname='sitepermission',
                             args=(A('User.id'), )),
                    ])

    class Meta:
        model = adm_info
示例#23
0
class TicketTable(Table):
    id = LinkColumn(header='Id',
                    links=[
                        Link(text=A('id'), viewname='issue', args=(A('id'), )),
                    ])
    creator = Column(field='creator', header='Creador')
    user = Column(field='user', header='Asignado')
    name = Column(field='name', header='Nombre')
    dateraised = Column(field='dateraised', header='Emisión')
    datesolved = Column(field='datesolved', header='Solucionado')
    priority = Column(field='priority', header='Prioridad')
    state = Column(field='state', header='Estado')
    escalated = Column(field='escalated', header='Escalado')
    hidden = Column(field='hidden', header='Archivada')

    class Meta:
        model = Ticket
示例#24
0
class GeneLocationTable(Table):
    gene_id = LinkColumn(field='gene_id',
                         header="SmLINC",
                         links=[
                             Link(text=A('gene_id'),
                                  viewname="sm_view",
                                  kwargs={"gene_id": A('gene_id')})
                         ])
    chromosome = Column(field='chromosome', header="Chromosome")
    chromosome_start = Column(field='chromosome_start',
                              header="Chromosome Start")
    chromosome_end = Column(field='chromosome_end', header="Chromosome End")
    strand = Column(field='strand', header="Strand")
    block_counts = Column(field='block_counts', header="# of Exons")

    class Meta:
        model = GeneLocation
        search_placeholder = "Search for your SmLINC"
示例#25
0
class ProjectAssocViewMixin(Table):
    view =  LinkColumn(
        header='View', 
        links=[
            Link(
                text='',
                viewname='project-detail', 
                args=(
                    A('proj.id'),
                ),
                attrs={
                    'class':
                        'glyphicon glyphicon-eye-open'
                },
            ),
        ],
        searchable=False,
        sortable=False,
    )
示例#26
0
class CampaignTable(Table, LinkColumnStatus):

    title = Column(
        field='title',
        header='Title',
    )
    # story=Column(field='story',header='Story',)
    amount = Column(
        field='amount',
        header='Amount',
    )
    # status=Column(field=get_status(id),header='Status',)

    end_date = Column(
        field='end_date',
        header='End Date',
    )
    publish_date = Column(
        field='publish_date',
        header='Publish date',
    )

    Action = LinkColumn(header='Action',
                        links=[
                            LinkColumnDetails(viewname='campaign_details',
                                              args=(A('id'), ),
                                              text='Details status'),
                            LinkColumnStatus(viewname='campaign_status',
                                             args=(A('id'), ),
                                             text='Change status'),
                            LinkColumnUpdate(viewname='update_campaign',
                                             args=(A('id'), ),
                                             text='Update'),
                            LinkColumnDelete(viewname='delete_campaign',
                                             args=(A('id'), ),
                                             text='Delete'),
                        ])

    class Meta:
        model = Campaign
        ajax = True
        ajax_source = reverse_lazy('ajax_campaign_table_data')
示例#27
0
class PaymentTable(Table):

    user = Column(field='user.username', header='User')
    campaign = Column(field='campaign.title', header='Campaign')
    amount = Column(field='amount', header='Amount')

    Action = LinkColumn(
        header='Action',
        links=[
            LinkColumnDelete(viewname='delete_user',
                             args=(A('id'), ),
                             text='Delete'),
            # Link(viewname='update_user', args=(A('id'),), text='Update'),
            # LinkColumnAccess(viewname='access_status', args=(A('id'),), text='Access change')
        ])

    class Meta:
        model = Donate
        ajax = True
        ajax_source = reverse_lazy('ajax_payment_table_data')
示例#28
0
class GroupmemberTable(Table):
	member__first_name = LinkColumn(field='member__first_name',header=u'Member Name', links=[Link(text=A('member__first_name'), viewname='choose View', args=(A('member_id',),A('user_group_id',),))])
	member__last_name = Column(field='member__last_name', header=u'Last Name')
	member__latitude = Column(field='member__latitude', header=u'Latitude')
	member__longitude = Column(field='member__longitude', header=u'Longitude')
	member__house_number = Column(field='member__house_number', header=u'House Number')
	member__village = Column(field='member__village', header=u'Village')
	member__sub_district_or_mandal = Column(field='member__sub_district_or_mandal', header=u'Mandal')
	member__district = Column(field='member__district', header=u'District')
	member__city_name = Column(field='member__city_name', header=u'City Name')
	member__state_name = Column(field='member__state_name', header=u'State Name')
	member__country_name = Column(field='member__country_name', header=u'Country Name')
	member__pincode = Column(field='member__pincode', header=u'Pincode')
	user_group__name = Column(field='user_group__name', header=u'Group Name')
	member__mobile_number = Column(field='member__mobile_number', header=u'Mobile Number')
	member__aadhar_number = Column(field='member__aadhar_number', header=u'QR Code')
	created_date = Column(field='created_date', header=u'Added Date')
	class Meta:
		model = Groupmember
		info_format = u"Total: _TOTAL_  First: _START_  Last: _END_"
示例#29
0
class UserPeopleTable(Table):

	people__first_name = LinkColumn(field='people__first_name',header=u'Name', links=[Link(text=A('people__first_name'), viewname='people choose View', args=(A('people_id',),))], header_attrs={'width':'20%'})
	people__last_name = Column(field='people__last_name', header=u'Last Name', attrs={'class': 'custom'}, header_attrs={'width':'20%'})
	user__mobile_number = Column(field='people__mobile_number', header=u'Mobile Number', attrs={'class': 'custom'}, header_attrs={'width':'20%'})
	user__aadhar_number = Column(field='people__aadhar_number', header=u'Aadhar Number', attrs={'class': 'custom'}, header_attrs={'width':'20%'})
	people__house_number = Column(field='people__house_number', header=u'House Number', attrs={'class': 'custom'}, header_attrs={'width':'20%'})
	people__village = Column(field='people__village', header=u'Village', attrs={'class': 'custom'}, header_attrs={'width':'20%'})
	people__sub_district_or_mandal = Column(field='people__sub_district_or_mandal', header=u'Mandal', attrs={'class': 'custom'}, header_attrs={'width':'20%'})
	people__district = Column(field='people__district', header=u'District', attrs={'class': 'custom'}, header_attrs={'width':'20%'})
	people__city_name = Column(field='people__city_name', header=u'City Name', attrs={'class': 'custom'}, header_attrs={'width':'20%'})
	people__state_name = Column(field='people__state_name', header=u'State Name', attrs={'class': 'custom'}, header_attrs={'width':'20%'})
	people__pincode = Column(field='people__pincode', header=u'Pincode', attrs={'class': 'custom'}, header_attrs={'width':'20%'})
	created_date = Column(field='created_date', header=u'Created Date', attrs={'class': 'custom'}, header_attrs={'width':'20%'})
	date_modified = Column(field='date_modified', header=u'Last Modified Date', attrs={'class': 'custom'}, header_attrs={'width':'20%'})
	class Meta:
		model = UserPeople
		info_format = u"Total: _TOTAL_  First: _START_  Last: _END_"
		sort = [(0, 'asc'), (1, 'desc')]
		pagination = True
示例#30
0
class User_listTable(Table):
    id = Column(field='id', header='ID')
    user_name = Column(field='user_name', header='User Name')
    full_name = Column(field='full_name', header='Full Name')
    email_address = Column(field='email_address', header='Email')
    bl_list = Column(field='dept_list.bl_list', header='BL')
    dept_list = Column(field='dept_list', header='Department')
    Regdate = Column(field='regdate', header='RegisterDate')
    # resigndate = Column(field='resigndate', header='ResignDate')
    lastupdate = Column(field='lastupdate', header='Last Update')
    #user_status = Column(field='user_status',header='Status')
    OP = LinkColumn(header=u'操作',
                    sortable=False,
                    links=[
                        Link(text=u'详细',
                             viewname='userdetailtable2',
                             args=(A('id'), )),
                    ])

    class Meta:
        model = user_list
        ext_button = True
        template_name = 'table/buttons_table.html'