{% extends "base.html" %} {% import "activity/_head.html" as ac with context %} {% block title %}Activity — categories & rules{% endblock %} {% block head %}{{ ac.assets() }}{% endblock %} {% block main_attrs %} data-norefresh{% endblock %} {# Every category (tree order, indented by depth) with its rules. ▸ folds a category open (its rules + sub-categories; closed by default, remembered per browser), Open all / Close all at the top. A click on a category or rule edits it in place; + Rule under a category, + Category at the top; the filter box narrows the list (and opens what matches). The data for the editors is in #ac-data (activity.js); saving reloads the page. #} {% block page %} {{ ac.head("Activity", v.cats | length ~ " categories · " ~ v.n_rules ~ " rules", True, "/activity") }}
{% for c in v.cats %}
{{ c.name }} {% if c.productive %}●{% endif %}{% if c.distraction %}●{% endif %}{% if c.vague %}◌{% endif %} {{ c.rules | length or "" }}
{% for r in c.rules %}
{{ r.field | replace("_", " ") }}{{ r.match }} {{ r.pattern }}{{ r.priority }}
{% endfor %}
{% endfor %}
{% endblock %} {% block scripts %}{{ ac.script() }}{% endblock %}