{% comment %} Displays links to varieties of a page, each one for a different kind of item (tweet, favorite tweet, photo, etc). Expects: * variety_counts -- A list of dicts, each dict with 'count', 'app_name', 'app_slug', 'variety_name' and 'variety_slug' elements. * ditto_app_name -- eg 'twitter' or 'flickr'. * ditto_variety_name -- eg 'tweets' or 'favorites'. And one of: * day -- If this is the Day Archive page, the date we're viewing. * tag_slug -- If this is the Tag page we're viewing. {% endcomment %}
{% for variety in variety_counts %} {% if variety.count == 0 or variety.is_active %} {{ variety.count }} {% if variety.app_name == 'pinboard' %} Pinboard bookmarks {% elif variety.app_name == 'flickr' %} {% if variety.variety_name == 'photo-taken' %} Flickr photos (taken) {% else %} Flickr photos (uploaded) {% endif %} {% elif variety.app_name == 'twitter' %} {% if variety.variety_name == 'favorite' %} Twitter likes {% else %} Twitter tweets {% endif %} {% endif %} {% if variety.count == 0 or variety.is_active %} {% else %} {% endif %} {% endfor %}