'Render the table footer
@param table: the TABLE instance'

def html_render_table_footer(self, table):

    data = self.data
    columns = data.get('c')
    totals = data.get('t')
    if (not totals):
        return
    footer_row = TR(_class='gi-column-totals')
    if columns:
        label = None
        span = 0
        for column in columns:
            has_value = (column in totals)
            if (label is None):
                if (not has_value):
                    span += 1
                    continue
                else:
                    label = TD(SPAN(self.totals_label), _class='gi-column-totals-label', _colspan=span)
                    footer_row.append(label)
            value = (totals[column] if has_value else '')
            footer_row.append(TD(value))
    table.append(TFOOT(footer_row))
