'Renders the button to launch the Zxing barcode scanner app
@param event_code: the current event code
@return: the Zxing launch button'

@staticmethod
def get_zxing_launch_button(event_code):

    T = current.T
    template = 'zxing://scan/?ret=%s&SCAN_FORMATS=Code    128,UPC_A,EAN_13'
    scan_vars = {'label': '{CODE}', 'scanner': 'zxing', 'event': '{EVENT}'}
    tmp = URL(args=['register'], vars=scan_vars, host=True)
    tmp = str(tmp).replace('&', '%26')
    if event_code:
        scan_vars['event'] = event_code.replace('&', '%2526')
    ret = URL(args=['register'], vars=scan_vars, host=True)
    ret = str(ret).replace('&', '%26')
    return A(T('Scan    with    Zxing'), _href=(template % ret), _class='tiny    primary    button    zxing-button', data={'tmp': (template % tmp)})
