{% extends "base.html" %} {% import "activity/_head.html" as ac with context %} {% block title %}Activity{% endblock %} {% block head %}{{ ac.assets() }}{% endblock %} {% block main_attrs %} data-norefresh{% endblock %} {# One day, sorted (views.day): the totals + week + Smoothed | Raw, per-computer strips over the hours that had anything (hover: what, why), the category tree (time incl. sub-categories; what it was about inside — click one to move it: a learned rule), the unsorted list — "Sort" makes the suggested rule (pattern editable) and the page sorts again (activity.js). #} {% macro node(n, depth) %}
{{ n.cat.name }} {% if n.cat.productive %}●{% endif %}{% if n.cat.distraction %}●{% endif %} {{ hm(n.sec) }} {% if n.top %}{% endif %} {% for c in n.kids %}{{ node(c, depth + 1) }}{% endfor %}
{% endmacro %} {% block page %} {% set rq = "" if v.smoothed else "&raw=1" %} {{ ac.head(ac.day_label(v.day, v.today), v.day.strftime("%A ") ~ v.day.day ~ v.day.strftime(" %B %Y"), v.day == v.today, "/activity" ~ ("?raw=1" if not v.smoothed else ""), "/activity?d=" ~ v.prev.isoformat() ~ rq, ("/activity?d=" ~ v.next.isoformat() ~ rq) if v.next else None, v.next is not none) }}
{{ hm(v.total) }}active
{{ v.pct }} %sorted
{% if v.strips.rows %}
{% for h in v.strips.hours %}{{ h.label }}{% endfor %}
{% for r in v.strips.rows %}
{{ r.source }}
{% for h in v.strips.hours %}{% endfor %}{% for b in r.blocks %}{% endfor %}
{% endfor %}
{% endif %}

By category{% if v.via_cal >= 60 %} {{ hm(v.via_cal) }} by calendar{% endif %}

{% for n in v.tree %}{{ node(n, 0) }}{% else %}

Nothing sorted {{ "yet " if v.day == v.today }}this day.

{% endfor %}

Unsorted{% if v.total > v.sorted %} {{ hm(v.total - v.sorted) }}{% endif %}

{% for u in v.unsorted %}
{{ u.label }}{{ hm(u.sec) }}
{{ u.field | replace("_", " ") }} {{ u.match }}
{% else %}

{{ "All sorted." if v.total else "Nothing recorded this day." }}

{% endfor %} {% if v.unsorted_more %}

… and {{ v.unsorted_more }} more, smaller ones

{% endif %}
{% endblock %} {% block scripts %} {{ ac.script() }}{% endblock %}