'Render the header row with field labels
@param data: the input field data as Python object
@param readonly: whether the form is read-only'

def headers(self, data, readonly=False):

    fields = data['fields']
    render_header = False
    header_row = TR(_class='label-row    static')
    happend = header_row.append
    for f in fields:
        label = f['label']
        if label:
            render_header = True
        label = TD(LABEL(label))
        happend(label)
    if render_header:
        if (not readonly):
            happend(TD())
            happend(TD())
        return THEAD(header_row)
    else:
        return THEAD(_class='hide')
