{% comment %} Displays a table of number of Tweets per year. Expects: * user -- Optional, a single Twitter User object, to restrict counts to that. * type -- Optional, 'tweets' (default) or 'favorites'. {% endcomment %} {% load ditto_twitter %} {% load l10n %} {% if type|default_if_none:'tweets' == 'favorites' %} {% if user %} {% annual_favorite_counts screen_name=user.screen_name as tweets %} {% else %} {% annual_favorite_counts as tweets %} {% endif %} {% else %} {% if user %} {% annual_tweet_counts screen_name=user.screen_name as tweets %} {% else %} {% annual_tweet_counts as tweets %} {% endif %} {% endif %} {% if tweets %}

{% if type|default_if_none:'tweets' == 'favorites' %}Liked tweets{% else %}Tweets{% endif %} per year

{% for s in tweets %} {% endfor %}
Year Tweets
{{ s.year|unlocalize }} {{ s.count }}
{% endif %}