% if current_fact: ${current_fact['name']} ${current_fact['duration']} % else: No activity % endif

Today:

% for fact in facts: % endfor
${fact['start_time']} - % if fact['end_time']: ${fact['end_time']} % endif ${fact['name']} ${fact['duration']}

Total: ${total}