<commit_before>{% set currentPath = path(app.request.attributes.get('_route'),
app.request.attributes.get('_route_params')) %}
<hr/>
<h2>{{ 'admin.log.history'|trans }}</h2>
<div id="adminLogHistory" class="panel-group" role="tablist" aria-multiselectable="true">
    {% for log in logEntities %}
        <div class="panel panel-default">
            <div id="logHeading{{ log.id }}" class="panel-heading" role="button" data-toggle="collapse">
                <a role="button" data-toggle="collapse" data-parent="#adminLogHistory" href="#adminLogs{{ log.id }}" aria-expanded="false" aria-controls="adminLogs{{ log.id }}">
                    {{ log.loggedAt|localizeddate('long') }}
                </a>
                <kbd class="pull-right">{{ log.username }}</kbd>
            </div>
            <div id="adminLogs{{ log.id }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="logHeading{{ log.id }}">
                <div class="panel-body">
                    <table class="table table-bordered table-striped">
                        <tr>
                            <th>{{ 'admin.log.field'|trans }}</th>
                            <th>{{ 'admin.log.oldValue'|trans }}</th>
                            <th>{{ 'admin.log.newValue'|trans }}</th>
                        </tr>
                        {% for data in log.data %}
                            <tr>
                                <th>{{ data.name }}</th>
                                <td>
                                    {% if data.old is same as(true) %}
                                        TRUE
                                    {% elseif data.old is same as(false) %}
                                        FALSE
                                    {% elseif data.old.timezone is defined %}
                                        {{ data.old|localizeddate('long') }}
                                    {% elseif data.old is iterable %}
                                        {% for subdata in data.old %}
                                            {{ subdata|trans }}
                                            {% if not loop.last %},{% endif %}
                                        {% else %}
                                            -
                                        {% endfor %}
                                    {% else %}
                                        {{ data.old|default('-') }}
                                    {% endif %}
                                </td>
                                <td>
                                    {% if data.new is same as(true) %}
                                        TRUE
                                    {% elseif data.new is same as(false) %}
                                        FALSE
                                    {% elseif data.new.timezone is defined %}
                                        {{ data.new|localizeddate('long') }}
                                    {% elseif data.new is iterable %}
                                        {% for subdata in data.new %}
                                            {{ subdata|trans }}
                                            {% if not loop.last %},{% endif %}
                                        {% else %}
                                            -
                                        {% endfor %}
                                    {% else %}
                                        {{ data.new|default('-') }}
                                    {% endif %}
                                </td>
                            </tr>
                        {% endfor %}
                    </table>
                </div>
            </div>
        </div>
    {% endfor %}
</div>
<commit_msg>Don't show username if it is not defined<commit_after>{% set currentPath = path(app.request.attributes.get('_route'),
app.request.attributes.get('_route_params')) %}
<hr/>
<h2>{{ 'admin.log.history'|trans }}</h2>
<div id="adminLogHistory" class="panel-group" role="tablist" aria-multiselectable="true">
    {% for log in logEntities %}
        <div class="panel panel-default">
            <div id="logHeading{{ log.id }}" class="panel-heading" role="button" data-toggle="collapse">
                <a role="button" data-toggle="collapse" data-parent="#adminLogHistory" href="#adminLogs{{ log.id }}" aria-expanded="false" aria-controls="adminLogs{{ log.id }}">
                    {{ log.loggedAt|localizeddate('long') }}
                </a>
                {% if log.username is defined %}
                    <kbd class="pull-right">{{ log.username }}</kbd>
                {% endif %}
            </div>
            <div id="adminLogs{{ log.id }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="logHeading{{ log.id }}">
                <div class="panel-body">
                    <table class="table table-bordered table-striped">
                        <tr>
                            <th>{{ 'admin.log.field'|trans }}</th>
                            <th>{{ 'admin.log.oldValue'|trans }}</th>
                            <th>{{ 'admin.log.newValue'|trans }}</th>
                        </tr>
                        {% for data in log.data %}
                            <tr>
                                <th>{{ data.name }}</th>
                                <td>
                                    {% if data.old is same as(true) %}
                                        TRUE
                                    {% elseif data.old is same as(false) %}
                                        FALSE
                                    {% elseif data.old.timezone is defined %}
                                        {{ data.old|localizeddate('long') }}
                                    {% elseif data.old is iterable %}
                                        {% for subdata in data.old %}
                                            {{ subdata|trans }}
                                            {% if not loop.last %},{% endif %}
                                        {% else %}
                                            -
                                        {% endfor %}
                                    {% else %}
                                        {{ data.old|default('-') }}
                                    {% endif %}
                                </td>
                                <td>
                                    {% if data.new is same as(true) %}
                                        TRUE
                                    {% elseif data.new is same as(false) %}
                                        FALSE
                                    {% elseif data.new.timezone is defined %}
                                        {{ data.new|localizeddate('long') }}
                                    {% elseif data.new is iterable %}
                                        {% for subdata in data.new %}
                                            {{ subdata|trans }}
                                            {% if not loop.last %},{% endif %}
                                        {% else %}
                                            -
                                        {% endfor %}
                                    {% else %}
                                        {{ data.new|default('-') }}
                                    {% endif %}
                                </td>
                            </tr>
                        {% endfor %}
                    </table>
                </div>
            </div>
        </div>
    {% endfor %}
</div>

{'fraction_non_alphanumeric': 0.12185534591194969, 'fraction_numerical': 0.0005241090146750524, 'mean_word_length': 0.7347727272727272, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 73, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 96, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '395457', 'n_tokens_mistral': 1702, 'n_tokens_neox': 1533, 'n_words': 328}