<commit_before>{% load timer_tags %}
<div class="accordion-group">
    <div class="accordion-heading">
        <div class="row">
            <div class="span2">
                <a class="accordion-toggle" data-toggle="collapse"
                   data-parent="accordion{{ cat.id }}"
                   href="#accordion_category_{{ cat.id }}">
                    {{ cat.name }}
                </a>
            </div>
            <div class="span1">
                {{ cat.last_week|format_timedelta }}
            </div>
            <div class="span1">
                {{ cat.today|format_timedelta }}
            </div>
        </div>
    </div>
    <div id="accordion_category_{{ cat.id }}" class="accordion-body collapse in">
        <div class="accordion-inner">
            {% if cat.category_set.all %}
                <div class="accordion" id="accordion{{ cat.id }}">
                {% with template_name='timers/listing.html' %}
                    {% for subcat in cat.category_set.all %}
                        {% include template_name with cat=subcat %}
                    {% endfor %}
                {% endwith %}
                </div>
            {% endif %}
            {% for timer in cat.timer_set.all %}
                <div class="row">
                    <div class="span2">
                        <a href="{% url 'timer' id=timer.id %}">{{ timer.name }}</a>
                    </div>
                    <div class="span1">
                        {{ timer.last_week|format_timedelta }}
                    </div>
                    <div class="span1">
                        {{ timer.today|format_timedelta }}
                    </div>
                    <div class="span1">
                        <form method="post" action="{% url 'startstop' id=timer.id %}"
                              class="form-inline startstop_form">
                            {% csrf_token %}
                            {% if timer.active %}
                                <button class="btn btn-danger btn-span"
                                        id="startstop_{{ timer.id }}">
                                    Stop
                                </button>
                            {% else %}
                                <button class="btn btn-success btn-span"
                                        id="startstop_{{ timer.id }}">
                                    Start
                                </button>
                            {% endif %}
                        </form>
                    </div>
                    <div class="span1">
                        <form method="post" action="{% url 'delete_timer' id=timer.id %}"
                              class="form-inline delete_timer_form">
                            {% csrf_token %}
                            <button type="submit" class="btn btn-inverse">Delete</button>
                        </form>
                    </div>
                </div>
            {% empty %}
                <div class="row">
                    <div class="span12">
                        You haven't created any timers in this category.
                    </div>
                </div>
            {% endfor %}
                <div class="row">
                    <div class="span12">
                        <form id="new_timer_{{ cat.id }}" method="post" class="form-inline"
                              action="{% url 'new_timer' %}">
                            {% csrf_token %}
                            <input type="hidden" name="category_id" value="{{ cat.id }}" />
                            <label for="timer_name_{{ cat.id }}" aria-hidden="true"
                                   class="accessibility">Timer name</label>
                            <input type="text" name="timer_name" id="timer_name_{{ cat.id }}"<commit_msg>adding css classes to timer totals<commit_after>{% load timer_tags %}
<div class="accordion-group">
    <div class="accordion-heading">
        <div class="row">
            <div class="span2">
                <a class="accordion-toggle" data-toggle="collapse"
                   data-parent="accordion{{ cat.id }}"
                   href="#accordion_category_{{ cat.id }}">
                    {{ cat.name }}
                </a>
            </div>
            <div class="span1 timer-last-week">
                {{ cat.last_week|format_timedelta }}
            </div>
            <div class="span1 timer-today">
                {{ cat.today|format_timedelta }}
            </div>
        </div>
    </div>
    <div id="accordion_category_{{ cat.id }}" class="accordion-body collapse in">
        <div class="accordion-inner">
            {% if cat.category_set.all %}
                <div class="accordion" id="accordion{{ cat.id }}">
                {% with template_name='timers/listing.html' %}
                    {% for subcat in cat.category_set.all %}
                        {% include template_name with cat=subcat %}
                    {% endfor %}
                {% endwith %}
                </div>
            {% endif %}
            {% for timer in cat.timer_set.all %}
                <div class="row">
                    <div class="span2">
                        <a href="{% url 'timer' id=timer.id %}">{{ timer.name }}</a>
                    </div>
                    <div class="span1 timer-last-week">
                        {{ timer.last_week|format_timedelta }}
                    </div>
                    <div class="span1 timer-today">
                        {{ timer.today|format_timedelta }}
                    </div>
                    <div class="span1">
                        <form method="post" action="{% url 'startstop' id=timer.id %}"
                              class="form-inline startstop_form">
                            {% csrf_token %}
                            {% if timer.active %}
                                <button class="btn btn-danger"
                                        id="startstop_{{ timer.id }}">
                                    Stop
                                </button>
                            {% else %}
                                <button class="btn btn-success"
                                        id="startstop_{{ timer.id }}">
                                    Start
                                </button>
                            {% endif %}
                        </form>
                    </div>
                    <div class="span1">
                        <form method="post" action="{% url 'delete_timer' id=timer.id %}"
                              class="form-inline delete_timer_form">
                            {% csrf_token %}
                            <button type="submit" class="btn btn-inverse">Delete</button>
                        </form>
                    </div>
                </div>
            {% empty %}
                <div class="row">
                    <div class="span12">
                        You haven't created any timers in this category.
                    </div>
                </div>
            {% endfor %}
                <div class="row">
                    <div class="span12">
                        <form id="new_timer_{{ cat.id }}" method="post" class="form-inline"
                              action="{% url 'new_timer' %}">
                            {% csrf_token %}
                            <input type="hidden" name="category_id" value="{{ cat.id }}" />
                            <label for="timer_name_{{ cat.id }}" aria-hidden="true"
                                   class="accessibility">Timer name</label>
                            <input type="text" name="timer_name" id="timer_name_{{ cat.id }}"
{'fraction_non_alphanumeric': 0.12856589647605524, 'fraction_numerical': 0.0030979734090615723, 'mean_word_length': 0.9674961909598782, 'pattern_counts': {'":': 0, '<': 107, '<?xml version=': 0, '>': 105, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3614947', 'n_tokens_mistral': 2005, 'n_tokens_neox': 1780, 'n_words': 365}