<commit_before>{% extends "base.html" %}
{% load i18n %} 
{% load staticfiles %}

<!--
        Title
-->
{% block title %}{% trans "Exercise details" %}{% endblock %}


<!--
        Main Content
-->
{% block content %}

<h2>{{ exercise.name }}</h2>
<p>
    <a href="/exercise/edit/{{ exercise.id }}">{% trans "Edit" %}</a> |
    <a href="/exercise/delete/{{ exercise.id }}">{% trans "Delete" %}</a>
</p>

<p>{% trans "Category" %}: <strong>{{ exercise.category.name }}</strong></p>


<p>{% trans "All comments for this exercise" %}:</p>

<ul>
{% for comment in exercise.exercisecomment_set.all %}
    <li>
        {% if comment_edit.id == comment.id %}
        <form action="/exercise/view/{{ exercise.id }}/edit/comment/{{ comment.id }}" method="post">
            {% csrf_token %}
            {{ comment_edit_form.comment }}
            <input type="submit" value="{% trans "Save" %}" />
        </form>
        {% else %}
        <a href="/exercise/comment/delete/{{ comment.id }}" title="{% trans "Delete" %}">[x]</a>
        <a href="/exercise/view/{{ exercise.id }}/edit/comment/{{ comment.id }}" title="{% trans "Edit" %}">[e]</a>
        {{ comment }}
        {% endif %}
    </li>
{% empty %}
    <li>{% trans "Sorry, no comments for this exercise yet!" %}</li>
{% endfor %}
</ul>

<h3>{% trans "Add new comment" %}</h3>
<form action = "/exercise/view/{{ exercise.id }}"
      method = "post"
      id = "new_comment_form">
{% csrf_token %}
{{ comment_form.comment }}
<input type="submit" value="{% trans "Save" %}" />
</form>



{% endblock %}


<!--
        Side bar?
--><commit_msg>Move the options to the sidebar<commit_after>{% extends "base.html" %}
{% load i18n %} 
{% load staticfiles %}

<!--
        Title
-->
{% block title %}{% trans "Exercise details" %}{% endblock %}


<!--
        Main Content
-->
{% block content %}

<h2>{{ exercise.name }}</h2>

<p>{% trans "Category" %}: <strong>{{ exercise.category.name }}</strong></p>


<p>{% trans "All comments for this exercise" %}:</p>

<ul>
{% for comment in exercise.exercisecomment_set.all %}
    <li>
        {% if comment_edit.id == comment.id %}
        <form action="/exercise/view/{{ exercise.id }}/edit/comment/{{ comment.id }}" method="post">
            {% csrf_token %}
            {{ comment_edit_form.comment }}
            <input type="submit" value="{% trans "Save" %}" />
        </form>
        {% else %}
        <a href="/exercise/comment/delete/{{ comment.id }}" title="{% trans "Delete" %}">[x]</a>
        <a href="/exercise/view/{{ exercise.id }}/edit/comment/{{ comment.id }}" title="{% trans "Edit" %}">[e]</a>
        {{ comment }}
        {% endif %}
    </li>
{% empty %}
    <li>{% trans "Sorry, no comments for this exercise yet!" %}</li>
{% endfor %}
</ul>

<h3>{% trans "Add new comment" %}</h3>
<form action = "/exercise/view/{{ exercise.id }}"
      method = "post"
      id = "new_comment_form">
{% csrf_token %}
{{ comment_form.comment }}
<input type="submit" value="{% trans "Save" %}" />
</form>



{% endblock %}


<!--
        Side bar?
-->
{% block sidebar %}
    <h3>{% trans "Options" %}</h3>

    <p>
        <a href="/exercise/edit/{{ exercise.id }}">{% trans "Edit" %}</a> |
        <a href="/exercise/delete/{{ exercise.id }}">{% trans "Delete" %}</a>
    </p>
{% endblock %}
{'fraction_non_alphanumeric': 0.23959914971150925, 'fraction_numerical': 0.004251442453689645, 'mean_word_length': 2.6722408026755855, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 75, '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': '2347774', 'n_tokens_mistral': 1205, 'n_tokens_neox': 1099, 'n_words': 272}