{% macro render_tags(tags) %} {% for tag in tags %} {% if not tag in ['auto-logged', 'auto-timed'] %} {{ tag }} {% endif %} {% endfor %} {% endmacro %} {% macro render_delta(fact) %} +{{ fact.delta }}{% if not fact.end_time %}...{% endif %} {% endmacro %} {% macro render_facts(facts, hide_date=False, hide_activity=False, hide_category=False, hide_tags=False, hide_actions=False) %}
Start | Duration | {% if not hide_category %}Category | {% endif %} {% if not hide_activity %}Activity | {% endif %}Description | {% if not hide_tags %}Tags | {% endif %} {% if not hide_actions %}Actions | {% endif %}
---|---|---|---|---|---|---|
{% if hide_date %} {{ fact.start_time.strftime('%H:%M') }} {% else %} {{ fact.start_time.strftime('%d.%m.%Y %H:%M') }} {% endif %} | {{ render_delta(fact) }} | {% if not hide_category %}{{ fact.category }} | {% endif %} {% if not hide_activity %}{{ fact.activity }} | {% endif %}{% if fact.description %}{{ fact.description|replace('\n',' ')|safe|urlize }}{% endif %} |
{% if not hide_category %}
{{ render_tags(fact.tags) }} | {% endif %} {% if not hide_actions %}{% endif %} |