Exemple #1
0
def table_highest(param,table_title,column_title,limit):
    r = '<table class="table table-bordered"><tr class="active"><th colspan="4" style="text-align:center;">%s</td></tr><tr class="active"><th>&nbsp;</th><th>Teacher Name</th><th>%s</th></tr>'%(table_title,column_title)

    count = 0
    for x in stuyteachers.get(param,-1,limit,0,True):
        x['salary'] = num(x['salary'])
        count += 1
        r += '<tr class="active"><td>'+str(count)+'</td><td><a href="teacher-%(id)d">%(first)s %(last)s</a><br /><small>%(title)s</small></td>'%(x)

        info = str(x[param])
        if param == "salary":
            info = "$"+info
        elif param == "rmt_overall":
            info += "%"

        r += '<td>'+info+'</td></tr>'

    r += '</table>'

    return r
Exemple #2
0
def table_get(param, sort, limit, offset=0):
    sort = int(sort)
    offset = int(offset)
    return table_get2(stuyteachers.get(param, sort, limit, offset),offset)