{% extends 'blog/base.html' %}
{% load blog %}

{% block title %}{{ entry.title }}{% endblock %}

{% block base_description %}{{ entry.description }}{% endblock %}

{% block content %}
  <div class="blog entry">
    <h1>{{ entry.title }}</h1>

    <blockquote>
      {% if entry.description %}
        <p>{{ entry.description|escape }}</p>
      {% endif %}
      <p class="last">
        <b>{% translate "Tags" %}:</b>
        {% for tag in entry.tags %}
          <a href="{% url blog.entries_list_tagged tags=tag %}">{{ tag }}</a>
        {% empty %}
          <i>{% translate "not defined" %}</i>
        {% endfor %}
      </p>
    </blockquote>

    {% autoescape off %}
      {{ entry.text|default:""|wiki }}
    {% endautoescape %}

    <div class="actions">
      <b>{{ entry.created|date:"j M Y, G:i" }}</b>
      {% if entry.changed.date != entry.created.date %}
      <i>(edited {{ entry.changed|date:"j M Y, G:i" }})</i>
      {% endif %}
      {% translate "from" %} <a href="{% url user.user_profile user=entry.author %}">{{ entry.author }}</a>
      {% if user.is_admin %}
        <a href="{% url blog.edit_entry entry=entry %}" class="edit">{% translate "Edit" %}</a>
        <a href="{% url blog.delete_entry entry=entry %}" class="delete confirm">{% translate "Delete" %}</a>
      {% endif %}
    </div>
  </div>

  {% comment %}
  {% get_comment_count for entry as comment_count %}
  <div>
    <h3><a name="comment_list">{% translate "Comments" %} ({{ comment_count }})</a></h3>
    {% render_comment_list for entry %}
    <a href="">Show all comments</a><br>
    <a href="">Add new comment</a>
  </div>
  <div>
    <h3><a name="add_comment">{% translate "Add comment" %}</a></h3>
    {% render_comment_form for entry %}
  </div>
  {% endcomment %}
{% endblock %}