'Represent a staff type in list views'

@staticmethod
def security_staff_type_multirepresent(opt):

    db = current.db
    table = db.security_staff_type
    set = db((table.id > 0)).select(table.id, table.name).as_dict()
    if isinstance(opt, (list, tuple)):
        opts = opt
        vals = [str(set.get(o)['name']) for o in opts]
        multiple = True
    elif isinstance(opt, int):
        opts = [opt]
        vals = str(set.get(opt)['name'])
        multiple = False
    else:
        try:
            opt = int(opt)
        except:
            return current.messages['NONE']
        else:
            opts = [opt]
            vals = str(set.get(opt)['name'])
            multiple = False
    if multiple:
        if (len(opts) > 1):
            vals = ',    '.join(vals)
        else:
            vals = ((len(vals) and vals[0]) or '')
    return vals
