<commit_before>$(function () {

    /**
     * PARTICIPATION: Participation details
     */
    var paymentManagementModal = $('#dialogPriceConfiguration'),
        toPayTableEl = $('#dialogPriceConfiguration #payment tbody'),
        toPayFooterTableEl = $('#dialogPriceConfiguration #payment tfoot'),
        priceHistoryTableEl = $('#dialogPriceConfiguration #priceHistory tbody'),
        displayToPayInfo = function (data) {
            var rawRow,
                rawRows = '',
                createInfoRow = function (value, participantName) {
                    return '<tr>' +
                        '    <td class="value text-right">' + value + ' €</td>' +
                        '    <td class="participant">' + participantName + '</td>' +
                        '</tr>';
                };
            jQuery.each(data, function (key, rowData) {
                rawRow = createInfoRow(
                    rowData.value,
                    eHtml(rowData.participant_name)
                );
                rawRows += rawRow;
            });
            toPayTableEl.html(rawRows);
        },
        displayPriceHistory = function (data) {
            var createPriceRow = function (type, value, description, date, creatorId, creatorName, participant) {
                var glyph;

                switch (type) {
                    case 'price_payment':
                        glyph = 'log-in';
                        break;
                    case 'price_set':
                        glyph = 'pencil';
                        break;
                }

                return '<tr class="' + type + '">' +
                    '    <td class="symbol"><span class="glyphicon glyphicon-' + glyph + '" aria-hidden="true"></span></td>' +
                    '    <td class="participant">' + participant + '</td>' +
                    '    <td class="value">' + value + ' €</td>' +
                    '    <td class="description">' + description + '</td>' +
                    '    <td class="small"><span class="created">' + date + '</span>, <a class="creator" href="/admin/user/' + creatorId + '">' + creatorName + '</a></td>' +
                    '</tr>';
            };

            var rawRow,
                rawRows = '';
            jQuery.each(data, function (key, rowData) {
                rawRow = createPriceRow(
                    rowData.type,
                    rowData.value,
                    eHtml(rowData.description),
                    rowData.created_at,
                    rowData.created_by_uid,
                    eHtml(rowData.created_by_name),
                    eHtml(rowData.participant_name)
                );
                rawRows += rawRow;
            });
            priceHistoryTableEl.html(rawRows);
        },
        displayPaymentFullValue = function (value, multiple) {
            var btn = $('.btn-payment-full');

            btn.data('value', value);
            btn.html('<b>' + value + ' €</b> Komplett');

            if (multiple) {
                toPayFooterTableEl.html(
                    '<tr>' +
                    '    <td class="value text-right"><b>' + value + ' €</b></td>' +
                    '    <td class="participant"><b>Summe</b> (für alle Teilnehmer)</td>' +
                    '</tr>'
                );
            }
        };
    $('#dialogPriceConfiguration').on('show.bs.modal', function (event) {
        var button = $(event.relatedTarget),
            aids = button.data('aids'),
            modal = $(this),
            inputEls = modal.find('input');
        paymentManagementModal.toggleClass('loading', true);
        toPayFooterTableEl.html('');<commit_msg>If there is no entry in payment history, show info text<commit_after>$(function () {

    /**
     * PARTICIPATION: Participation details
     */
    var paymentManagementModal = $('#dialogPriceConfiguration'),
        toPayTableEl = $('#dialogPriceConfiguration #payment tbody'),
        toPayFooterTableEl = $('#dialogPriceConfiguration #payment tfoot'),
        priceHistoryTableEl = $('#dialogPriceConfiguration #priceHistory tbody'),
        displayToPayInfo = function (data) {
            var rawRow,
                rawRows = '',
                createInfoRow = function (value, participantName) {
                    return '<tr>' +
                        '    <td class="value text-right">' + value + ' €</td>' +
                        '    <td class="participant">' + participantName + '</td>' +
                        '</tr>';
                };
            jQuery.each(data, function (key, rowData) {
                rawRow = createInfoRow(
                    rowData.value,
                    eHtml(rowData.participant_name)
                );
                rawRows += rawRow;
            });
            toPayTableEl.html(rawRows);
        },
        displayPriceHistory = function (data) {
            var createPriceRow = function (type, value, description, date, creatorId, creatorName, participant) {
                var glyph;

                switch (type) {
                    case 'price_payment':
                        glyph = 'log-in';
                        break;
                    case 'price_set':
                        glyph = 'pencil';
                        break;
                }

                return '<tr class="' + type + '">' +
                    '    <td class="symbol"><span class="glyphicon glyphicon-' + glyph + '" aria-hidden="true"></span></td>' +
                    '    <td class="participant">' + participant + '</td>' +
                    '    <td class="value">' + value + ' €</td>' +
                    '    <td class="description">' + description + '</td>' +
                    '    <td class="small"><span class="created">' + date + '</span>, <a class="creator" href="/admin/user/' + creatorId + '">' + creatorName + '</a></td>' +
                    '</tr>';
            };

            var rawRows = '';
            if (data && data.length > 1) {
                var rawRow;

                jQuery.each(data, function (key, rowData) {
                    rawRow = createPriceRow(
                        rowData.type,
                        rowData.value,
                        eHtml(rowData.description),
                        rowData.created_at,
                        rowData.created_by_uid,
                        eHtml(rowData.created_by_name),
                        eHtml(rowData.participant_name)
                    );
                    rawRows += rawRow;
                });
            } else {
                rawRows = '<td colspan="5" class="text-center">(Kein Vorgang erfasst)</td>';
            }
            priceHistoryTableEl.html(rawRows);
        },
        displayPaymentFullValue = function (value, multiple) {
            var btn = $('.btn-payment-full');

            btn.data('value', value);
            btn.html('<b>' + value + ' €</b> Komplett');

            if (multiple) {
                toPayFooterTableEl.html(
                    '<tr>' +
                    '    <td class="value text-right"><b>' + value + ' €</b></td>' +
                    '    <td class="participant"><b>Summe</b> (für alle Teilnehmer)</td>' +
                    '</tr>'
                );
            }
        };
    $('#dialogPriceConfiguration').on('show.bs.modal', function (event) {
        var button = $(event.relatedTarget),
            aids = button.data('aids'),
            modal = $(this),
            inputEls = modal.find('input');
        paymentManagementModal.toggleClass('loading', true);
        toPayFooterTableEl.html('');
{'fraction_non_alphanumeric': 0.13822525597269625, 'fraction_numerical': 0.00026253609871357313, 'mean_word_length': 1.3371165644171779, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 78, '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': '3853885', 'n_tokens_mistral': 1981, 'n_tokens_neox': 1857, 'n_words': 371}