Пример #1
0
def no_query_warning_html():
    """
    The html block when no query is entered and searched.

    Returns:
        (dash_html_components.Div): The html block when no query is entered.
    """
    null_txt = (
        f'Please enter a query using the search bar, then hit Enter or "Go".')
    return common_null_warning_html(null_txt)
Пример #2
0
def no_abstract_warning_html():
    """
    Get the html block when no abstract is entered.

    Returns:
        (dash_html_components.Div): The warning for no abstract, as an
            html block.

    """
    return common_null_warning_html("No abstract entered!")
Пример #3
0
def no_results_html(pre_label=None):
    """
    The html block for displaying no results.

    Args:
        pre_label (None, dash_html_components.Div): A label to place before the
            no results html. Alters the formatting of the no results warning.

    Returns:
        (dash_html_components.Div): The html block for no results.

    """
    if pre_label is None:
        return common_null_warning_html("No results found!",
                                        alignment="center")
    else:
        common_warning = common_null_warning_html("No results found.",
                                                  alignment="left",
                                                  top_margin=5)
        return html.Div([pre_label, common_warning])
Пример #4
0
def no_query_warning_html():
    null_txt = \
        f"Please enter a query using the search bar, then hit Enter or \"Go\"."
    return common_null_warning_html(null_txt)
Пример #5
0
def no_abstract_warning_html():
    return common_null_warning_html("No abstract entered!")
Пример #6
0
def no_results_html():
    return common_null_warning_html("No results found!")