<commit_before>{% extends "base.html" %}
{% load gravatar_tags %}
{% block title %}Repository: {{ repository.title }}{% endblock %}

{% block content %}
<script type="text/javascript">
    $(document).ready(function(){
        var baseurl = "{% url repositories_summary repository.user.username repository.slug %}commits/";
        $("#tags").change(function(){
            window.location.href=baseurl+this.value;
        });
        $("#branches").change(function(){
            window.location.href=baseurl+this.value;
        });
    });
</script>
<div class="grid_16 content" id="repo-summary">
    {% if repository.get_tags %}
    <div class="repo-tags" style="float:left">
    Tags:
    <select id="tags">
            <option></option>
            {% for tag in repository.get_tags %}
            <option {% if tag.name == branchtag %}selected="selected"{% endif %}>{{ tag.name }}</option>
            {% endfor %}
    </select>
    </div>
    {% endif %}
    {% if repository.get_branches %}
    <div class="repo-branches">
    Branches:
    <select id="branches">
        <option></option>
        {% for branch in repository.get_branches %}
        <option{% if branch.name == branchtag %} selected="selected"{% endif %}>{{ branch.name }}</option>
        {% endfor %}
    </select>
    </div>
    {% endif %}

    <div style="clear:both"></div>

    <h1>{{ repository.title }}</h1>

    <h2>Recent commits</h2>
    {% if prev_page %}<a href="?page={{ prev_page }}">prev page</a>{% endif %}
    <a href="?page={{ next_page }}">next page</a>

    {% for commit in commits %}
    <div class="recent-commits">
        <div class="commit">
            <div class="commit-summary">
                <p><a href="{% url repositories_commit repository.user.username repository.slug commit.id %}">{{ commit.msg }}</a></p>
                <hr />
                <p>
                    <img src="{% avatar commit.committer_mail 40 "g" %}">
                    <i><a href="#">{{ commit.committer }}</a> committed {{ commit.ago }}.</i><br />
                </p>
            </div>

            <div class="commit-info">
                <table>
                    <tr>
                        <td>Commit:</td>
                        <td><a href="{% url repositories_commit repository.user.username repository.slug commit.id %}">{{ commit.short_id }}</a></td>
                    </tr>
                    <tr>
                        <td>Parents:</td>
                        <td>
                            {% for short_parent, parent in commit.both_parents %}
                                <a href="{% url repositories_commit repository.user.username repository.slug parent %}">{{ short_parent }}</a><br />
                            {% endfor %}
                        </td>
                    </tr>
                    <tr>
                        <td>Tree:</td>
                        <td><a href="{% url repositories_commit_tree_root repository.user.username repository.slug commit.id %}">{{ commit.short_tree }}</a></td>
                    </tr>
                </table>
            </div>
            <div style="clear:both"></div>
        </div>
    </div>
    {% endfor %}
</div>
{% if prev_page %}<a href="?page={{ prev_page }}">prev page</a>{% endif %}
<a href="?page={{ next_page }}">next page</a>

{% endblock %}<commit_msg>dropdowns for tags and branches.<commit_after>{% extends "base.html" %}
{% load gravatar_tags %}
{% block title %}Repository: {{ repository.title }}{% endblock %}

{% block content %}
<script type="text/javascript">
    $(document).ready(function(){
        var baseurl = "{% url repositories_summary repository.user.username repository.slug %}commits/";
        $("#tags").change(function(){
            window.location.href=baseurl+this.value;
        });
        $("#branches").change(function(){
            window.location.href=baseurl+this.value;
        });
    });
</script>
<div class="grid_16 content" id="repo-commits">
    <h1>{{ repository.title }} - {{ branchtag }}</h1>
    <div class="grid_8">
        {% if repository.branches %}
            <div class="repo-branches">
                Branches:
                <select name="branches" id="branches">
                    <option value="">--------</option>
                    {% for branch in repository.branches %}
                    <option value="{{ branch.name }}"{% if branch.name == branchtag %} selected="selected"{% endif %}>{{ branch.name }}</option>
                    {% endfor %}
                </select>
            </div>
        {% endif %}
    </div>
    <div class="grid_8">
        {% if repository.tags %}
            <div class="repo-tags">
                Tags:
                <select name="branches" id="tags">
                    <option value="">--------</option>
                    {% for tag in repository.tags %}
                    <option value="{{ tag.name }}"{% if tag.name == branchtag %} selected="selected"{% endif %}>{{ tag.name }}</option>
                    {% endfor %}
                </select>
            </div>
        {% endif %}
    </div>
    <div class="pagination">
        {% if prev_page %}<a class="prev-page" href="?page={{ prev_page }}">prev page</a>{% endif %}
        <a class="next-page" href="?page={{ next_page }}">next page</a>
        <div style="clear:both"></div>
    </div>

    <div class="recent-commits">
    {% for commit in commits %}
        {% include "repositories/snippet_commit.html" %}
    {% endfor %}
    </div>
    <div class="pagination">
        {% if prev_page %}<a class="prev-page" href="?page={{ prev_page }}">prev page</a>{% endif %}
        <a class="next-page" href="?page={{ next_page }}">next page</a>
        <div style="clear:both"></div>
    </div>
</div>
{% endblock %}
{'fraction_non_alphanumeric': 0.18622360678435446, 'fraction_numerical': 0.0024229837313949464, 'mean_word_length': 1.8895, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 0, '>': 131, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6341963', 'n_tokens_mistral': 1786, 'n_tokens_neox': 1616, 'n_words': 358}