'Return dictionary containing new-style display app urls.'

def serialize_display_apps(self, hda, key, trans=None, **context):

    display_apps = []
    for display_app in hda.get_display_applications(trans).itervalues():
        app_links = []
        for link_app in display_app.links.itervalues():
            app_links.append({'target': link_app.url.get('target_frame', '_blank'), 'href': link_app.get_display_url(hda, trans), 'text': gettext.gettext(link_app.name)})
        if app_links:
            display_apps.append(dict(label=display_app.name, links=app_links))
    return display_apps
