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

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

    display_apps = []
    if (not self.app.config.enable_old_display_applications):
        return display_apps
    display_link_fn = hda.datatype.get_display_links
    for display_app in hda.datatype.get_display_types():
        (target_frame, display_links) = display_link_fn(hda, display_app, self.app, trans.request.base)
        if (len(display_links) > 0):
            display_label = hda.datatype.get_display_label(display_app)
            app_links = []
            for (display_name, display_link) in display_links:
                app_links.append({'target': target_frame, 'href': display_link, 'text': gettext.gettext(display_name)})
            if app_links:
                display_apps.append(dict(label=display_label, links=app_links))
    return display_apps
