{% macro action_feed(actions) -%} {# Displays a stream of actions from activity-stream. #}
{% for action in actions %} {{ display_action(action) }} {% endfor %}
{%- endmacro %} {% macro display_action(action) -%} {# Display a single action from activity-stream. #}
{{ action.timestamp|timesince }} {{ _("ago") }}
{% set actor_url = action.actor.get_absolute_url() or action.actor_url %} {{ action.actor }}: {{ action.verb }}
{% if action.action_object %} {% set object_url = action.action_object.get_absolute_url() or action.action_object_url %} {{ action.action_object }} {% endif %} {% if action.action_object and action.target %}to{% endif %} {% if action.target %} {% set target_url = action.target.get_absolute_url() or action.target_url %} {{ action.target }} {% endif %}
{%- endmacro %}