{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "forums/base.html" %}
{# L10n: {t} is the title of the thread. {f} if the name of the forum. #}
{% set title = _('Delete Thread | {t} | {f} | Forums')|f(t=thread.title, f=forum.name) %}
{% set crumbs = [(url('forums.forums'), _('Forums')),
                (url('forums.threads', forum.slug), forum.name),
                (url('forums.posts', forum.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('forums.delete_thread', forum_slug=forum.slug, thread_id=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('forums.posts', forum_slug=forum.slug, thread_id=thread.id) }}">{{ _('Cancel') }}</a>
    </form>
  </div>
</article>
{% endblock %}
