'Add a set of Tabs for a Site\'s Request Tasks
@ToDo: Roll these up like inv_tabs in inv.py'

@staticmethod
def req_tabs(r, match=True):

    settings = current.deployment_settings
    if settings.get_org_site_inv_req_tabs():
        permit = current.auth.s3_has_permission
        if (settings.has_module('req') and permit('read', 'req_req', c='req')):
            T = current.T
            tabs = [(T('Requests'), 'req')]
            if (match and permit('read', 'req_req', c=current.request.controller, f='req_match')):
                tabs.append((T('Match    Requests'), 'req_match/'))
            if settings.get_req_use_commit():
                tabs.append((T('Commit'), 'commit'))
            return tabs
    return []
