{% extends "sphene/sphwiki/base.html" %}

{% load i18n %}
{% load sph_extras %}

{% block head %}
  {{ block.super }}
  {% if sph_settings.wiki_rss_url %}
    <link rel="alternate" title="Latest Wiki Changes" href="{{ sph_settings.wiki_rss_url }}" type="application/rss+xml">
  {% endif %}
{% endblock %}

{% block content %}
  {% include "sphene/sphwiki/_snip_header.html" %}
  {% if redirects %}
    <ul class="sphwiki redirects">
    {% for redirect in redirects %}
      <li>Redirected from <a href="{{ redirect.get_absolute_url }}?redirect=no">{{ redirect.get_title }}</a></li>
    {% endfor %}
    </ul>
  {% endif %}
  {% if snip.id %}
    {% if False and sph.toc %}
      <div id="sphwiki_toc">{{ sph.toc }}</div>
    {% endif %}

    <div class="sphwiki_body">
      {{ snip_rendered_body }}
    </div>

    {% load sph_tagging %}
    <div class="sphwiki_snip_info sphwiki">
      {% with snip|sph_tag_labels as tag_labels %}
        {% if tag_labels %}
      <h3>{% trans "Tags:" %}</h3>
      <ul class="sph_tags">
	{% for label in tag_labels %}
	  <li><a href="{% sph_url2 sphwiki_show_tag_snips tag_name=label.tag.name %}">{{ label.label }}</a></li>
	{% endfor %}
      </ul>
      {% endif %}
      {% include "sphene/sphwiki/_snip_footer.html" %}
    </div>
    {% endwith %}
    {% include commentstemplate %}
  {% else %}
    {% blocktrans with snipName as snip_name and "<strong>" as snip_prefix and "</strong>" as snip_postfix %}Snip {{ snip_prefix }}{{ snip_name }}{{ snip_postfix }} does not yet exist.{% endblocktrans %} {% if snip.has_edit_permission %}<a href="{{ snip.get_absolute_editurl }}">{% trans "Create It." %}</a>{% endif %}
  {% endif %}
{% endblock %}
