{% extends "planet/base.html" %}
{% load i18n pagination_tags tagging_tags planet_tags %}
{% load url from future %}

{% block head_title %}
  {{ tag|safe }}: {% trans "django blog posts news" %}
{% endblock %}

{% block extra_head %}
    <meta name="title" content="{{ tag|safe }}: {% trans 'django blog posts news' %}" />
    <meta name="description" content="{{ tag|safe }}: {% trans 'django web framework related blog posts, news and articles' %}" />
    <meta name="robots" content="index, follow" />
    <link rel="canonical" href="http://{{ site.domain }}{% url 'planet.views.tag_detail' tag.name %}"/>
{% endblock %}

{% block head_feeds %}
    <link rel="alternate" type="application/rss+xml" title="{% trans 'tag' %} {{ tag|safe }} {% trans 'in' %} {{ site.name }} - RSS 2.0 Feed" href="{% url planet_tag_rss_feed tag %}" />
    <link rel="alternate" type="application/rss+xml" title="{% trans 'Posts in' %} {{ site.name }} - RSS 2.0 Feed" href="{% url planet_rss_feed %}" />
{% endblock %}

{% block rss_feed %}
    <a href="{% url 'planet_tag_rss_feed' tag %}" title="{% trans 'Subscribe to RSS feed for tag' %} {{ tag|safe }}">
        <img src="{{ MEDIA_URL }}images/rss20.png" alt="RSS 2.0 Feed"/>
    </a>
{% endblock %}

{% block breadcrumb_section %}<li><a href="{% url 'planet.views.tags_cloud' %}">Tags</a> <span class="divider">/</span></li>{% endblock %}
{% block breadcrumb_detail %}<li class="active">{{ tag.name }}</li>{% endblock %}

{% block content %}
    <h1>{% trans "Tag" %}: {{ tag|safe }}</h1>
    {% autopaginate posts 20 %}
    {% for post in posts %}
        <div class="post short {% cycle 'even' 'odd' %} clearfix">
          {% post_details post "planet/posts/short.html" %}
        </div>
    {% endfor %}

    {% paginate %}
{% endblock %}

{% block right_column %}
    {% include 'planet/feeds/blocks/syndication_block.html' %}
    <div>
        {% related_tags_for tag %}
    </div>
    <div>
        {% feeds_about tag %}
    </div>
    <ul class="nav nav-list">
        <li class="nav-header">See also</li>
        <li>
            <a href="{% url 'planet_tag_author_list' tag.name %}" title="{% trans 'See the list of authors talking about this tag' %}">
                {% trans 'Bloggers talking about this' %}
            </a>
        </li>
    </ul>
{% endblock %}
