def download_link_or_path(is_local_request, filepath, fp_id, label):
    """Generates a download link or shows the path based on is_local_request

    Parameters
    ----------
    is_local_request : bool
        Whether the request is local or not
    filepath : str
        The local filepath
    fp_id : int
        The filepath id
    label : str
        The label to show in the button

    Returns
    -------
    str
        If is a local request, a string with the filepath. Otherwise a string
        with the html code to create a download link
    """
    if is_local_request:
        resp = "<b>%s:</b> %s" % (label, filepath)
    else:
        resp = ('<a class="btn btn-default glyphicon glyphicon-download-alt" '
                'href="/download/%s" style="word-spacing: -10px;"> %s</a>'
                % (fp_id, label))
    return resp