{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "kbforums/base.html" %}
{# L10n: {t} is the title of the thread. {d} is the name of the document. #}
{% set title = _('Delete Thread | {t} | {d} Discussion | Knowledge Base')|f(t=thread.title, d=document.title) %}
{% set crumbs = [(url('wiki.category', document.category), document.get_category_display()),
                 (document.get_absolute_url(), document.title),
                 (url('wiki.discuss.threads', document.slug), _('Discuss')),
                 (url('wiki.discuss.posts', document.slug, thread.id), thread.title),
                 (None, _('Delete Thread'))] %}

{% block content %}
<article id="confirm-delete" class="main">
  <h1>{{ _('Are you sure you want to delete this thread?') }}</h1>
  <div class="thread-to-delete">
    <label>{{ _('Title') }}</label>
    <div class="content">{{ thread.title }}</div>
    <label>{{ _('Creator') }}</label>
    <div>{{ thread.creator }}</div>
    <label>{{ _('Date') }}</label>
    <div>{{ datetimeformat(thread.created, format='longdatetime') }}</div>
    <label>{{ _('Number of Replies') }}</label>
    <div>{{ thread.replies }}</div>

    <form action="{{ url('wiki.discuss.delete_thread', document.slug, thread.id) }}" method="post">
      {{ csrf() }}
      <p>
        {{ _('You are about to permanently delete this thread. <strong>This cannot be undone!</strong> Are you sure you want to continue?')|safe }}
      </p>
      <input type="submit" value="{{ _('Delete') }}" />
      <a href="{{ url('wiki.discuss.posts', document.slug, thread.id) }}">{{ _('Cancel') }}</a>
    </form>
  </div>
</article>
{% endblock %}
