<commit_before>{% extends 'base.html' %}
{% load staticfiles %}
{% block content %}

<div class="row well" style='margin-bottom: 0px;'>
	<div class="col-lg-12">
    <div class="row">
      <h2 style='margin: 0px;'>
        {{ question.title }}
      </h2>
    </div>
    <div class="row">
			{% autoescape off %}
			{{ question.text }}
			{% endautoescape %}
    </div>
    <div class="row">
      <span class="text-muted">Posted by <a href={{ question.author.get_absolute_url }}>{{ syntax.PERSON }}{{ question.author.handle }}</a> on {{ question.create_date }}</span>
    </div>
	</div>
</div>
<div class="row" style='border: thin solid darkgrey;'>
	<div class="col-lg-12">
		<dl class="dl-horizontal">
			{% if p %}
			<dt>Pedagogy</dt>
		  <dd>
				{% for tag in p %}
					{% if tag.type == 'P' %}
					{% include 'tag.html' with tag=tag %}
					{% endif %}
				{% endfor %}
			</dd>
			{% endif %}
			{% if t %}
			<dt>Technology</dt>
		  <dd>
				{% for tag in t %}
					{% if tag.type == 'T' %}
					{% include 'tag.html' with tag=tag %}
					{% endif %}
				{% endfor %}
			</dd>
			{% endif %}
			{% if c %}
			<dt>Content</dt>
		  <dd>
				{% for tag in c %}
					{% if tag.type == 'C' %}
					{% include 'tag.html' with tag=tag %}
					{% endif %}
				{% endfor %}
			</dd>
			{% endif %}
			{% if o %}
			<dt>Topic</dt>
		  <dd>
				{% for tag in o %}
					{% if tag.type == 'O' %}
					{% include 'tag.html' with tag=tag %}
					{% endif %}
				{% endfor %}
			</dd>
			{% endif %}
		</dl>
	</div>
</div>

<div class="row" style="margin-top: 15px;">
    {% if question.links.all|length %}
      <div class="col-lg-9">
    {% else %}
      <div class="col-lg-12">
    {% endif %}
      {% if question.comments %}
      <div class="row">
        <div class="col-lg-12 highlight">
          <h3>Comments</h3>
          <ul class="media-list">
          {% for comment in question.comments.all %}
            <li class="media">
              <a class="pull-left" href="{{ comment.author.get_absolute_url }}">
                <img class="media-object" style="max-height: 64px; max-width: 64px;" src="{{ comment.author.photo }}" />
              </a>
              <div class="media-body pull-left">
                <a href="{{ comment.author.get_absolute_url }}">
                  <h4 class="media-heading">{{ comment.author.name }}</h4>
                </a>
                {% autoescape off %}
                  {{ comment.text }}
                {% endautoescape %}
              </div>
              <div class="pull-right" >
                <!-- TODO delete post
                <a href="/delete/C/{{comment.id}}">
                  <span class="icon-large icon-delete"></span>
                </a>
                -->
                <a href="/vote/C/{{comment.id}}/1">
                  <span class="icon-large icon-thumbs-up"></span>
                </a>
                {% if comment.upvotes > 0 %}
                  +
                {% endif %}
                {{ comment.upvotes }}
                <a href="/vote/C/{{comment.id}}/-1">
                  <span class="icon-large icon-thumbs-down"></span>
                </a>
              </div>
            </li>
            <td>
              {% for tag in comment.tags.all %}
                <a href="?q=#{{tag.handle}}" class="badge {{ tag.type }}">
                  {{ tag.handle }}
                </a>
              {% endfor %}
            </td>
            <td>
              {{ comment.date }}
            </td>
          {% endfor %}
          </ul>
        </div>
      </div>
      {% endif %}
      {% if question.comments %}
      <div class="row" style="margin-top: 15px;">
      {% else %}
      <div class="row">
      {% endif %}
      {# {% if user.is_authenticated %} #}
        <div class="col-lg-12 highlight">
          <h3>Give answer</h3>
          <form action="/comment?type={{question.type}}&id={{question.id}}" method="post">{% csrf_token %}
            {{ form.media }}
            {{ form.as_p }}
            <input type="submit" value="Submit" />
          </form>
        </div>
        {% comment %}
        {% else %}
          TODO show some login screen?
          {% endif %}<commit_msg>Answers box hidden if no answers available yet<commit_after>{% extends 'base.html' %}
{% load staticfiles %}
{% block content %}

<div class="row well" style='margin-bottom: 0px;'>
	<div class="col-lg-12">
    <div class="row">
      <h2 style='margin: 0px;'>
        {{ question.title }}
      </h2>
    </div>
    <div class="row">
			{% autoescape off %}
			{{ question.text }}
			{% endautoescape %}
    </div>
    <div class="row">
      <span class="text-muted">Posted by <a href={{ question.author.get_absolute_url }}>{{ syntax.PERSON }}{{ question.author.handle }}</a> on {{ question.create_date }}</span>
    </div>
	</div>
</div>
<div class="row" style='border: thin solid darkgrey;'>
	<div class="col-lg-12">
		<dl class="dl-horizontal">
			{% if p %}
			<dt>Pedagogy</dt>
		  <dd>
				{% for tag in p %}
					{% if tag.type == 'P' %}
					{% include 'tag.html' with tag=tag %}
					{% endif %}
				{% endfor %}
			</dd>
			{% endif %}
			{% if t %}
			<dt>Technology</dt>
		  <dd>
				{% for tag in t %}
					{% if tag.type == 'T' %}
					{% include 'tag.html' with tag=tag %}
					{% endif %}
				{% endfor %}
			</dd>
			{% endif %}
			{% if c %}
			<dt>Content</dt>
		  <dd>
				{% for tag in c %}
					{% if tag.type == 'C' %}
					{% include 'tag.html' with tag=tag %}
					{% endif %}
				{% endfor %}
			</dd>
			{% endif %}
			{% if o %}
			<dt>Topic</dt>
		  <dd>
				{% for tag in o %}
					{% if tag.type == 'O' %}
					{% include 'tag.html' with tag=tag %}
					{% endif %}
				{% endfor %}
			</dd>
			{% endif %}
		</dl>
	</div>
</div>

<div class="row" style="margin-top: 15px;">
    {% if question.links.all|length %}
      <div class="col-lg-9">
    {% else %}
      <div class="col-lg-12">
    {% endif %}
    {% if question.comments.all %}
      <div class="row">
        <div class="col-lg-12 highlight">
          <h3>Answers</h3>
          <ul class="media-list">
          {% for comment in question.comments.all %}
            <li class="media">
              <a class="pull-left" href="{{ comment.author.get_absolute_url }}">
                <img class="media-object" style="max-height: 64px; max-width: 64px;" src="{{ comment.author.photo }}" />
              </a>
              <div class="media-body pull-left">
                <a href="{{ comment.author.get_absolute_url }}">
                  <h4 class="media-heading">{{ comment.author.name }}</h4>
                </a>
                {% autoescape off %}
                  {{ comment.text }}
                {% endautoescape %}
              </div>
              <div class="pull-right" >
                <!-- TODO delete post
                <a href="/delete/C/{{comment.id}}">
                  <span class="icon-large icon-delete"></span>
                </a>
                -->
                <a href="/vote/C/{{comment.id}}/1">
                  <span class="icon-large icon-thumbs-up"></span>
                </a>
                {% if comment.upvotes > 0 %}
                  +
                {% endif %}
                {{ comment.upvotes }}
                <a href="/vote/C/{{comment.id}}/-1">
                  <span class="icon-large icon-thumbs-down"></span>
                </a>
              </div>
            </li>
            <td>
              {% for tag in comment.tags.all %}
                <a href="?q=#{{tag.handle}}" class="badge {{ tag.type }}">
                  {{ tag.handle }}
                </a>
              {% endfor %}
            </td>
            <td>
              {{ comment.date }}
            </td>
          {% endfor %}
          </ul>
        </div>
      </div>
      {% if question.comments %}
      <div class="row" style="margin-top: 15px;">
      {% else %}
      <div class="row">
      {% endif %}
    {% endif %}
      {# {% if user.is_authenticated %} #}
        <div class="col-lg-12 highlight">
          <h3>Give answer</h3>
          <form action="/comment?type={{question.type}}&id={{question.id}}" method="post">{% csrf_token %}
            {{ form.media }}
            {{ form.as_p }}
            <input type="submit" value="Submit" />
          </form>
        </div>
        {% comment %}
        {% else %}
          TODO show some login screen?
          {% endif %}
{'fraction_non_alphanumeric': 0.19693732193732194, 'fraction_numerical': 0.007597340930674264, 'mean_word_length': 1.521700089793475, 'pattern_counts': {'":': 0, '<': 183, '<?xml version=': 0, '>': 185, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1759381', 'n_tokens_mistral': 3211, 'n_tokens_neox': 2639, 'n_words': 565}