<commit_before>{% extends "core/base.html" %}

{% block content %}

    {% load staticfiles %}

    <h1 class="page-header">Deine Spielerliste</h1>

    <div id="table-toolbar">
        <div class="form-inline" role="form">
            <div class="form-group">
                <input id="diff_toggle" name="diff_toggle" type="checkbox" data-on-text="AN" data-off-text="AUS" data-on-color="success" data-size="small">
                <label for="diff_toggle">Zeige nur die Veränderung zum Vortag</label>
            </div>
        </div>
    </div>

    <table id='player_data_table' class="table table-bordered table-striped table-hover"
           data-toolbar="#table-toolbar"
           data-toggle="table"
           data-search="true"
           data-show-refresh="true"
           data-show-columns="true"
           data-sort-name="awp"
           data-sort-order="desc"
           data-query-params="queryParams"
           data-url="{% url 'core:ofm:player_data_json' %}">
        <thead id="player_data_table_head">
            <tr>
                <th data-field="position">Position</th>
                <th data-field="strength" data-sortable="true">Stärke</th>
                <th data-field="name" data-sortable="true">Name</th>
                <th data-field="ep" data-sortable="true">EP</th>
                <th data-field="tp" data-sortable="true">TP</th>
                <th data-field="awp" data-sortable="true">AWP</th>
                <th data-field="freshness" data-sortable="true">Frische</th>
                <th data-field="games_in_season" data-sortable="true">Spiele</th>
                <th data-field="goals_in_season" data-sortable="true">Tore</th>
                <th data-field="won_tacklings_in_season" data-sortable="true" data-visible="false">Gewonnene Zweikämpfe</th>
                <th data-field="lost_tacklings_in_season" data-sortable="true" data-visible="false">Verlorene Zweikämpfe</th>
                <th data-field="won_friendly_tacklings_in_season" data-sortable="true" data-visible="false">Gewonnene Friendly Zweikämpfe</th>
                <th data-field="lost_friendly_tacklings_in_season" data-sortable="true" data-visible="false">Verlorene Friendly Zweikämpfe</th>
                <th data-field="yellow_cards_in_season" data-sortable="true" data-visible="false">Gelbe Karten</th>
                <th data-field="red_cards_in_season" data-sortable="true" data-visible="false">Rote Karten</th>
                <th data-field="equity" data-sortable="true">Marktwert</th>
            </tr>
        </thead>
    </table>

    <script>
        var $table = $('#player_data_table');

        $('#diff_toggle').bootstrapSwitch('state', false);

        $('#diff_toggle').on('switchChange.bootstrapSwitch', function (event, data) {
            $.get('{% url 'core:ofm:player_data_json' %}', {show_diff: data},
                function(returnedData){
                    $table.bootstrapTable('load', returnedData)
            });
        });

        function queryParams() {
            var params = {};
            $('#toolbar').find('input[name]').each(function () {
                params[$(this).attr('name')] = $(this).val();
            });
            return params;
        }
    </script>

{% endblock %}<commit_msg>mark negative values red in table<commit_after>{% extends "core/base.html" %}

{% block content %}

    {% load staticfiles %}

    <h1 class="page-header">Deine Spielerliste</h1>

    <div id="table-toolbar">
        <div class="form-inline" role="form">
            <div class="form-group">
                <input id="diff_toggle" name="diff_toggle" type="checkbox" data-on-text="AN" data-off-text="AUS" data-on-color="success" data-size="small">
                <label for="diff_toggle">Zeige nur die Veränderung zum Vortag</label>
            </div>
        </div>
    </div>

    <table id='player_data_table' class="table table-bordered table-striped table-hover"
           data-toolbar="#table-toolbar"
           data-toggle="table"
           data-search="true"
           data-show-refresh="true"
           data-show-columns="true"
           data-sort-name="awp"
           data-sort-order="desc"
           data-query-params="queryParams"
           data-url="{% url 'core:ofm:player_data_json' %}">
        <thead id="player_data_table_head">
            <tr>
                <th data-field="position">Position</th>
                <th data-field="strength" data-sortable="true">Stärke</th>
                <th data-field="name" data-sortable="true">Name</th>
                <th data-field="ep" data-sortable="true">EP</th>
                <th data-field="tp" data-sortable="true">TP</th>
                <th data-field="awp" data-sortable="true">AWP</th>
                <th data-field="freshness" data-sortable="true">Frische</th>
                <th data-field="games_in_season" data-sortable="true">Spiele</th>
                <th data-field="goals_in_season" data-sortable="true">Tore</th>
                <th data-field="won_tacklings_in_season" data-sortable="true" data-visible="false">Gewonnene Zweikämpfe</th>
                <th data-field="lost_tacklings_in_season" data-sortable="true" data-visible="false">Verlorene Zweikämpfe</th>
                <th data-field="won_friendly_tacklings_in_season" data-sortable="true" data-visible="false">Gewonnene Friendly Zweikämpfe</th>
                <th data-field="lost_friendly_tacklings_in_season" data-sortable="true" data-visible="false">Verlorene Friendly Zweikämpfe</th>
                <th data-field="yellow_cards_in_season" data-sortable="true" data-visible="false">Gelbe Karten</th>
                <th data-field="red_cards_in_season" data-sortable="true" data-visible="false">Rote Karten</th>
                <th data-field="equity" data-sortable="true">Marktwert</th>
            </tr>
        </thead>
    </table>

    <script>
        var $table = $('#player_data_table');

        $('#diff_toggle').bootstrapSwitch('state', false);

        $('#diff_toggle').on('switchChange.bootstrapSwitch', function (event, data) {
            $.get('{% url 'core:ofm:player_data_json' %}', {show_diff: data},
                function(returnedData){
                    $table.bootstrapTable('load', returnedData)
            });
        });

        function queryParams() {
            var params = {};
            $('#toolbar').find('input[name]').each(function () {
                params[$(this).attr('name')] = $(this).val();
            });
            return params;
        }

        $('td:contains("-")').addClass('danger')
    </script>

{% endblock %}
{'fraction_non_alphanumeric': 0.16308623298033284, 'fraction_numerical': 0.000605143721633888, 'mean_word_length': 2.443229166666667, 'pattern_counts': {'":': 0, '<': 105, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5382416', 'n_tokens_mistral': 2108, 'n_tokens_neox': 2024, 'n_words': 302}