{% from "_macros.html" import icon %} {# Rows of the tick tree (api/access_ui.py). One row per path: the tick (does this path have a rule of its own?), the name, indented by depth, with what the rules give it said underneath, and the level -- only for a ticked row. The three things a row can say, and js/ticks.js keeps them true as you tick: * ticked: its own level; * unticked under a ticked folder: that folder's level, and where it comes from; * unticked with a tick somewhere below and none above: a **passage** -- not listed and not readable; what is ticked inside it is reached only by its full path. Drawn dashed, so it reads as a way through, not a place. A grid with a track per part and each row a subgrid: a long name wraps in its own track and never moves the level select. #} {% for r in rows %}
{% if r.is_dir %} {% else %}{% endif %} {{ icon("folder" if r.is_dir else "file-text", "icon--sm") }} {{ r.name }} {%- if r.rule -%} {%- elif r.passage -%}{{ t("Passage: not listed or readable; what is ticked inside is reached by its full path.") }} {%- elif r.effective != "none" -%}{{ t("As above: %(level)s", level=t(level_labels[r.effective])) }} {%- else -%}{{ t("No access") }}{%- endif -%}
{% endfor %}