{# Current space in the left bar: its name (space home and search), the gear to its settings, the "Inbox ยท N" row (with a badge if the tidy-up left items aside), then the tree. Tidying and Activity are tabs of the inbox and of the settings. #} {% from "space-tree.html" import tree_children with context %} {% set base = '/o/' ~ org.slug ~ '/' ~ space.slug %} {% set here = request.url.path %} {# Current section from the URL; forms (POST under /-/) are not settings. #} {% set settings_paths = ['/-/settings', '/-/git', '/-/members', '/-/tidy-settings', '/-/semantic', '/-/compare'] %} {% set rest = here[base|length:] %} {% set in_settings = rest in settings_paths or rest.startswith(('/-/git/', '/-/members/', '/-/compare')) %} {% set in_inbox = here.startswith(base ~ '/inbox') or here.startswith(base ~ '/-/inbox') %} {% set counts = inbox_counts if inbox_counts is defined else none %}