@staticmethod
    def action_button(label, url, icon=None, **attr):
        """
            Add a link to response.s3.actions

            @param label: the link label
            @param url: the target URL
            @param attr: attributes for the link (default: {"_class":"action-btn"})
        """

        link = dict(attr)
        link["label"] = str(label) #s3_unicode(label).encode("utf8")
        link["url"] = url
        if icon and current.deployment_settings.get_ui_use_button_icons():
            link["icon"] = ICON.css_class(icon)
        if "_class" not in link:
            link["_class"] = "action-btn"

        s3 = current.response.s3
        if s3.actions is None:
            s3.actions = [link]
        else:
            s3.actions.append(link)

    # -------------------------------------------------------------------------
dataset/ETHPy150Open sahana/eden/modules/s3/s3crud.py/S3CRUD.action_button/original