'Provide the column-width class for the widgets
@param r: the S3Request
@param widget: the widget config (dict)'

@staticmethod
def _lookup_class(r, widget):

    page_cols = current.s3db.get_config(r.tablename, 'profile_cols')
    if (not page_cols):
        page_cols = 2
    widget_cols = widget.get('colspan', 1)
    span = (int((12 / page_cols)) * widget_cols)
    formstyle = current.deployment_settings.ui.get('formstyle', 'default')
    if (current.deployment_settings.ui.get('formstyle') == 'bootstrap'):
        return ('profile-widget    span%s' % span)
    return ('profile-widget    medium-%s    columns' % span)
