<commit_before>{% extends "home.html" %}

{% comment %}
# Copyright 2012, hast. All rights reserved.

# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
{% endcomment %}

{% block content %}
<h1>{{ object.name }} 
  {% if user.get_profile in object.followed.all %}
  <small>
    <a href="{% url course_leave object.slug %}">leave</a>
  </small>
  {% else %}
  <small>
    <a href="{% url course_join object.slug %}">join</a>
  </small>
  {% endif %}
</h1>
<p>
  {% for line in object.last_info.infos %}
  <strong>{{ line.name }}</strong> {{ line.value }}<br>
  {% endfor %}
</p>

<h1>Documents</h1>
<div id="upload" class="panel">
  <h2>Upload</h2>
  <form action="{% url document_put %}" method="post"
        enctype="multipart/form-data">
    {% csrf_token %}
    <table>
      {{ upload_form.as_table }}
    </table>
    <input type="submit" value="Upload"/>
  </form>
</div>

<div class="panel-button" data-target="upload">
  Upload
</div>

<table class="sortable">
  <thead>
    <tr>
      <th>##</th>
      <th style="min-width: 200px">Name</th>
      <th>Poster</th>
      <th>Size</th>
    </tr>
  </thead>
  
  <tbody>
  {% for doc in object.document_set.all %}
    <tr>
      <td>{{ doc.id }}</td>
      <td><a href="{% url document_show doc.id %}">{{ doc.name }}</a></td>
      <td>{{ doc.user.name }}</td>
      <td>{{ doc.pages }}</td>
      </tr>
  {% endfor %}
  </tbody>
</table>

<h1>Discussions</h1>
<h2>New Thread</h2>
<form action="{% url thread_put %}" method="post"><commit_msg>[fix] upload panel below upload button<commit_after>{% extends "home.html" %}

{% comment %}
# Copyright 2012, hast. All rights reserved.

# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
{% endcomment %}

{% block content %}
<h1>{{ object.name }} 
  {% if user.get_profile in object.followed.all %}
  <small>
    <a href="{% url course_leave object.slug %}">leave</a>
  </small>
  {% else %}
  <small>
    <a href="{% url course_join object.slug %}">join</a>
  </small>
  {% endif %}
</h1>
<p>
  {% for line in object.last_info.infos %}
  <strong>{{ line.name }}</strong> {{ line.value }}<br>
  {% endfor %}
</p>

<h1>Documents</h1>
<div class="panel-button" data-target="upload">
  Upload
</div>

<div id="upload" class="panel">
  <h2>Upload</h2>
  <form action="{% url document_put %}" method="post"
        enctype="multipart/form-data">
    {% csrf_token %}
    <table>
      {{ upload_form.as_table }}
    </table>
    <input type="submit" value="Upload"/>
  </form>
</div>

<table class="sortable">
  <thead>
    <tr>
      <th>##</th>
      <th style="min-width: 200px">Name</th>
      <th>Poster</th>
      <th>Size</th>
    </tr>
  </thead>
  
  <tbody>
  {% for doc in object.document_set.all %}
    <tr>
      <td>{{ doc.id }}</td>
      <td><a href="{% url document_show doc.id %}">{{ doc.name }}</a></td>
      <td>{{ doc.user.name }}</td>
      <td>{{ doc.pages }}</td>
      </tr>
  {% endfor %}
  </tbody>
</table>

<h1>Discussions</h1>
<h2>New Thread</h2>
<form action="{% url thread_put %}" method="post">
{'fraction_non_alphanumeric': 0.2032023289665211, 'fraction_numerical': 0.010480349344978166, 'mean_word_length': 3.1497584541062804, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 0, '>': 125, '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': '7621185', 'n_tokens_mistral': 1337, 'n_tokens_neox': 1239, 'n_words': 330}