{# This file was part of Flask-Bootstrap and was modified under the terms of its BSD License. Copyright (c) 2013, Marc Brinkmann. All rights reserved. #} {# This file was part of Bootstrap-Flask and was modified under the terms of its MIT License. Copyright (c) 2018 Grey Li. All rights reserved.#} {% macro render_ui_messages(messages=None, title=None, container=True, transform={ 'critical': 'danger', 'error': 'danger', 'info': 'info', 'warning': 'warning', 'debug': 'info', 'notset': 'info', 'message': 'info', 'success': 'info', 'list': 'info' }, default_category=config.FOMANTIC_MSG_CATEGORY, dismissible=False) -%} {% with messages = messages or get_flashed_messages(with_categories=true) %} {% if messages %} {% if container -%}
{% endif %} {% for category, message in messages %}
{% if dismissible %}{% endif %}
{% if category in ['danger','debug','critical', 'error', 'info','warning', 'success'] %}{{ category.title() }}: {% if title %}{{title}}{% endif %}{% else %}{% endif %}
{% if category == 'list' %} {% for msg in message %} {% endfor %} {% else %}

{{ message }}

{% endif %}
{% endfor %} {% if container %}
{% endif -%} {% endif %} {% endwith %} {% endmacro -%} {% macro render_ui_icon(type=None, color=config.FOMANTIC_ICON_COLOR) -%} {% set fomantic_colors = ["primary", "secondary", "red", "orange", "yellow", "olive", "green", "teal", "blue", "violet", "purple", "pink","brown", "grey", "black"] %} {%- endmacro %} {% macro form_button(url, content, method="post", class_buttton="ui submit button") -%}
{%- endmacro %} {% macro render_static(type, filename_or_url, local=True) %} {% if local -%}{% set filename_or_url = url_for('static', filename=filename_or_url) %}{%- endif %} {% if type == 'css' -%} {%- elif type == 'js' -%} {%- elif type == 'icon' -%} {%- endif %} {% endmacro %} {% macro arg_url_for(endpoint, base) %} {# calls url_for() with a given endpoint and **base as the parameters, additionally passing on all keyword_arguments (may overwrite existing ones) #} {%- with kargs = base.copy() -%} {%- do kargs.update(kwargs) -%} {{ url_for(endpoint, **kargs) }} {%- endwith %} {%- endmacro %}