{% load cache gravatar_tags humanize %} {% for entry in newsfeed %}
{% if entry.news_type == "registration" %}

{{ entry.sender.username }} joined to dbpatterns

{% elif entry.news_type == "document" %}

{{ entry.sender.username }} created new pattern

{{ entry.related_object.title }}

{% with entry.related_object as document %} {% include "documents/preview.html" %} {% endwith %} {% elif entry.news_type == "fork" %}

{{ entry.sender.username }} forked a pattern

{{ entry.related_object.title }}

{% with entry.related_object as document %} {% include "documents/preview.html" %} {% endwith %} {% elif entry.news_type == "comment" %}

{{ entry.sender.username }} commented on a pattern

{{ entry.related_object.body }}
{% elif entry.news_type == "star" %}

{{ entry.sender.username }} starred {{ entry.related_object.title }} pattern

{% elif entry.news_type == "following" %}

{{ entry.sender.username }} following {{ entry.related_object.username }}

{% endif %}
{% empty %}
Seems to empty your newsfeed. You may follow somebody to see more news.
{% endfor %}