<commit_before>{% extends "greta/greta_base.html" %}
{% load url from future %}
{% load greta_tags %}

{% block content %}
  {% include "greta/_tabs.html" %}

  {% for commit, refs in log %}
    {% if forloop.first %}
      <table class="table table-hover">
        <thead>
          <tr>
            <th>
              Commit
            </th>
            <th>
              Committer
            </th>
            <th>
              Committed
            </th>
            <th>
              Message
            </th>
          </tr>
        </thead>
        <tbody>
      {% endif %}

      <tr class="commit-row"
          href="{% url 'commit_detail' pk=repo.pk ref=commit.id %}"
          style="cursor: pointer;">
        <td>
          <a href="{% url 'commit_detail' pk=repo.pk ref=commit.id %}">
            {{ commit.id|truncatechars:10 }}
          </a>
          {% if refs %}
            {% for ref in refs %}
              <span class="label label-info">{{ ref|pretty_ref }}</span>
            {% endfor %}
          {% endif %}
        </td>
        <td>
          {{ commit.committer|committer }}
        </td>
        <td>
          {{ commit.commit_time|to_datetime }}
        </td>
        <td>
          {{ commit.message|truncatechars:50 }}
        </td>
      </tr>

      {% if forloop.last %}
        </tbody>
      </table>
    {% endif %}
  {% empty %}
    <h2>No commits, yet.</h2>
  {% endfor %}

  {% include "greta/_paginator.html" with page=log %}

{% endblock %}

{% block script %}
<script>
  $(".commit-row").each(function(i, e){
    var next = $(this).attr("href");
    $(this).click(function(){<commit_msg>Change tag and branch labels in commit list to buttons<commit_after>{% extends "greta/greta_base.html" %}
{% load url from future %}
{% load greta_tags %}

{% block content %}
  {% include "greta/_tabs.html" %}

  {% for commit, refs in log %}
    {% if forloop.first %}
      <table class="table table-hover">
        <thead>
          <tr>
            <th>
              Commit
            </th>
            <th>
              Committer
            </th>
            <th>
              Committed
            </th>
            <th>
              Message
            </th>
          </tr>
        </thead>
        <tbody>
      {% endif %}

      <tr class="commit-row"
          {% if refs %}
            href="{% url 'commit_detail' pk=repo.pk ref=refs.0|clean_ref_string %}"
          {% else %}
            href="{% url 'commit_detail' pk=repo.pk ref=commit.id %}"
          {% endif %}
          style="cursor: pointer;">
        <td>
          <a href="{% url 'commit_detail' pk=repo.pk ref=commit.id %}">
            {{ commit.id|truncatechars:10 }}
          </a>
          {% if refs %}
            {% for ref in refs %}
              <a href="{% url 'commit_detail' pk=repo.pk ref=ref|clean_ref_string %}"
                 class="btn btn-xs btn-{% if 'tag:' in ref %}danger{% else %}info{% endif%}">
                {{ ref|pretty_ref }}
              </a>
            {% endfor %}
          {% endif %}
        </td>
        <td>
          {{ commit.committer|committer }}
        </td>
        <td>
          {{ commit.commit_time|to_datetime }}
        </td>
        <td>
          {{ commit.message|truncatechars:50 }}
        </td>
      </tr>

      {% if forloop.last %}
        </tbody>
      </table>
    {% endif %}
  {% empty %}
    <h2>No commits, yet.</h2>
  {% endfor %}

  {% include "greta/_paginator.html" with page=log %}

{% endblock %}

{% block script %}
<script>
  $(".commit-row").each(function(i, e){
    var next = $(this).attr("href");
    $(this).click(function(){
{'fraction_non_alphanumeric': 0.1710129014548449, 'fraction_numerical': 0.003568487510293714, 'mean_word_length': 1.4390896921017402, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 69, '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': '2133970', 'n_tokens_mistral': 1252, 'n_tokens_neox': 1123, 'n_words': 245}