<commit_before>{% extends "goals/base.html" %}
{% load goal_filters %}

{% block content %}

  <ul class="breadcrumbs">
    <li><a href="{% url 'goals:index' %}">Home</a></li>
    <li class="current">Categories</li>
  </ul>

  <div class="row">
    <div class="large-12 small-12 columns">
      <h1>Categories</h2>
      <table class="object-list">
      <thead>
      <tr>
        <th>Order</th>
        <th>Title</th>
        <th>State</th>
        <th>Goals</th>
        <th>Behaviors</th>
      </tr>
      </thead>
      <tbody>
      {% for category in categories %}
        <tr>
          <td>{{ category.order }}</td>
          <td>
            <a href="{{ category.get_absolute_url }}">{{ category }}</a>
          </td>
          <td>{{ category.state|label }}</td>
          <td>{{ category.goals|join:", " }}</td>
          <td>{{ category.behavior_set.all|join:", " }}</td>
        </tr>
      {% endfor %}
      </tbody>
      </table>
    </div>
  </div> {# end .row #}
  <hr/>
{% endblock %}
<commit_msg>include category color in templates<commit_after>{% extends "goals/base.html" %}
{% load goal_filters %}

{% block content %}

  <ul class="breadcrumbs">
    <li><a href="{% url 'goals:index' %}">Home</a></li>
    <li class="current">Categories</li>
  </ul>

  <div class="row">
    <div class="large-12 small-12 columns">
      <h1>Categories</h2>
      <table class="object-list">
      <thead>
      <tr>
        <th>Order</th>
        <th>Color</th>
        <th>Title</th>
        <th>State</th>
        <th>Goals</th>
        <th>Behaviors</th>
      </tr>
      </thead>
      <tbody>
      {% for category in categories %}
        <tr>
          <td>{{ category.order }}</td>
          <td>
            <div class="color"
                 style="height:25px;width:25px;background-color:{{ category.color}};">
            </div>
          </td>
          <td>
              <a href="{{ category.get_absolute_url }}">{{ category }}</a>
          </td>
          <td>{{ category.state|label }}</td>
          <td>{{ category.goals|join:", " }}</td>
          <td>{{ category.behavior_set.all|join:", " }}</td>
        </tr>
      {% endfor %}
      </tbody>
      </table>
    </div>
  </div> {# end .row #}
  <hr/>
{% endblock %}

{'fraction_non_alphanumeric': 0.21507760532150777, 'fraction_numerical': 0.007095343680709534, 'mean_word_length': 1.89602053915276, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 103, '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': '4329298', 'n_tokens_mistral': 826, 'n_tokens_neox': 770, 'n_words': 152}