% macro menu_icon(item) % set # icon_type = item.get_icon_type() % if # icon_type % set # icon_value = item.get_icon_value() % if # icon_type == 'fas' % elif # icon_type == 'image' menu image % elif # icon_type == 'image-url' menu image % endif % endif % endmacro % macro menu(menu_root=None) % if menu_root is none % set menu_root = admin_view.admin.menu() % endif % for item in menu_root[1:] % if item.is_accessible() and item.is_visible() % set class_name = item.get_class_name() [[ item.name ]] ## [[ menu_icon(item) ]][[ item.name ]] % endif % endfor % endmacro % macro menu_tabs(menu_root=None) % if menu_root is none % set menu_root = admin_view.admin.menu() % endif % for item in menu_root[1:] % if item.is_accessible() and item.is_visible() % set class_name = item.get_class_name()
  • [[ item.name ]] ## [[ menu_icon(item) ]][[ item.name ]]
  • % endif % endfor % endmacro % macro menu_links(links=None) % if links is none % set links = admin_view.admin.menu_links() % endif % for item in links % if item.is_accessible() and item.is_visible() [[ menu_icon(item) ]][[ item.name ]] % endif % endfor % endmacro % macro messages() % with messages = get_flashed_messages(with_categories=True) % if messages % set mapping = {'message': 'info', 'error': 'danger', 'warning': 'warning', 'info': 'info'} % for category, m in messages % if category %else % endif % endfor % endif % endwith % endmacro