<article class="discussion-article" data-id="{{ thread["id"] }}" tabindex="-1">
  <div class="thread-wrapper">
    <div class="thread-main-wrapper">
      <div class="thread-content-wrapper">
        <div class="discussion-post">
          <header class="post-header">
            <div class="post-header-content">
              <h2 class="post-title">{{ thread["title"] }}</h2>
              <p class="posted-details"> {% if thread["thread_type"] == "discussion" %} <span data-l10n-id="discussion" >discussion</span> {% else %} <span data-l10n-id="question"> question</span> {% endif %}<span data-l10n-id="posted_at"> posted at </span> <span class="timeago" title="{{ thread["created_at"] | remove_newline }}">{{ thread["created_at"] | remove_newline }}</span> <span data-l10n-id="by" >by </span> <a class="username">{{ thread["username"] }}</a>{% if thread["user_id"] in staff_user %} <span class="user-label-staff">(Staff)</span> {% endif %}</p>
            </div>
          </header>
          <div class="post-body">
            <p>
            {{ thread["body"] }}
            </p>
          </div>
        </div>
      </div>
      {% if thread["children"] | length != 0 %}
      <div class="post-extended-content thread-responses-wrapper">
        <ol class="responses js-response-list">
          {% for comment in thread["children"] %}
          <li class="forum-response">
            <div class="discussion-response">
              <header class="response-header">
                <div class="response-header-content">
                  <a class="username">{{ comment["username"] }}</a>
		  {% if thread["user_id"] in staff_user %} <span class="user-label-staff">(Staff)</span> {% endif %}
                  <p class="posted-details">
                    <span class="timeago" title="{{ comment["created_at"] | remove_newline }}">{{ comment["created_at"] | remove_newline }}</span>
                  </p>
                </div>
              </header>
              <div class="response-body">
                {{ comment["body"] }}
              </div>
            </div>
            {% if comment["children"] %}
            <ol class="comments">
              {% for comment_of_comment in comment["children"] %}
              <li>
                <div class="discussion-comment">
                  <div class="response-body">
                    <p> {{ comment_of_comment["body"] }} </p>
                  </div>
                  <p class="posted-details">
                        <span data-l10n-id="posted_at">Posted <span><span class="timeago" title="{{ comment_of_comment["created_at"] | remove_newline }}">{{ comment_of_comment["created_at"] | remove_newline }}</span> <span data-l10n-id="by"> by</span> <a class="username">{{ comment_of_comment["username"] }}</a>
                  </p>
                </div>
              </li>
              {% endfor %}
            </ol>
            {% endif %}
          </li>
        {% endfor %}
        </ol>
      </div>
      {% endif %}

    </div>
  </div>
</article>
