<commit_before><?php 
/**
 *  ocs-webserver
 *
 *  Copyright 2016 by pling GmbH.
 *
 *    This file is part of ocs-webserver.
 *
 *    This program is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU Affero General Public License as
 *    published by the Free Software Foundation, either version 3 of the
 *    License, or (at your option) any later version.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU Affero General Public License for more details.
 *
 *    You should have received a copy of the GNU Affero General Public License
 *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 **/
?>
<div class="messages">
    <?php foreach (Zend_Controller_Action_HelperBroker::getStaticHelper('flashMessenger')
                       ->getCurrentMessages() as $message) : ?>
        <p><?php echo $this->escape($message); ?></p>
    <?php endforeach; ?>
</div>
<?php
$lastMonth = date("Ym", strtotime("first day of previous month"));
?>

<div id="TableContainer"></div>
<script type="text/javascript">
    $(document).ready(function () {
        $('#TableContainer').jtable({
            jqueryuiTheme: true,
            paging: true,
            sorting: true,
            defaultSorting: 'amount asc',
            title: 'Table of payout stati',
            actions: {
                listAction: '/backend/payoutstatus/list',
                createAction: '/backend/payoutstatus/create',
                updateAction: '/backend/payoutstatus/update',
                //deleteAction: '/backend/payoutstatus/delete'
            },
            fields: {
                id: {
                    title: 'Id',
                    key: true,
                    create: true,
                    edit: true,
                    list: true
                },
                title: {
                    title: 'Title',
                    list: true,
                    create: true,
                    edit: true
                },
                description: {
                    title: 'Description',
                    list: true,
                    create: true,
                    edit: true
                },
                color: {
                    title: 'Color',
                    list: true,
                    create: true,
                    edit: true
                },
                is_active: {
                    title: 'Active',
                    width: '5%',
                    list: true,
                    edit: true,
                    create: true,
                    options: {'0': 'Inactive', '1': 'Active'},
                    optionsSorting: 'id'
                }
            },
            recordsLoaded: function (event, data) {
                for (var i in data.records) {
                    if (data.records[i].status == 100) {
                        $('#TableContainer').find(".jtable tbody tr:eq(" + i + ")").css("cssText", "background-color:green !important; color:white !important;");
                    }
                    if (data.records[i].status == 1) {
                        $('#TableContainer').find(".jtable tbody tr:eq(" + i + ")").css("cssText", "background-color:yellow !important; color:black !important;");
                    }
                    if (data.records[i].status > 100) {
                        $('#TableContainer').find(".jtable tbody tr:eq(" + i + ")").css("cssText", "background-color:red !important; color:white !important;");
                    }
                }
            }
        });

        $('#TableContainer').jtable('load');
        
        
    });
</script><commit_msg>backend: payout status<commit_after><?php 
/**
 *  ocs-webserver
 *
 *  Copyright 2016 by pling GmbH.
 *
 *    This file is part of ocs-webserver.
 *
 *    This program is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU Affero General Public License as
 *    published by the Free Software Foundation, either version 3 of the
 *    License, or (at your option) any later version.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU Affero General Public License for more details.
 *
 *    You should have received a copy of the GNU Affero General Public License
 *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 **/
?>
<div class="messages">
    <?php foreach (Zend_Controller_Action_HelperBroker::getStaticHelper('flashMessenger')
                       ->getCurrentMessages() as $message) : ?>
        <p><?php echo $this->escape($message); ?></p>
    <?php endforeach; ?>
</div>
<?php
$lastMonth = date("Ym", strtotime("first day of previous month"));
?>

<div id="TableContainer"></div>
<script type="text/javascript">
    $(document).ready(function () {
        $('#TableContainer').jtable({
            jqueryuiTheme: true,
            paging: true,
            sorting: true,
            defaultSorting: 'amount asc',
            title: 'Table of payout stati',
            actions: {
                listAction: '/backend/payoutstatus/list',
                createAction: '/backend/payoutstatus/create',
                updateAction: '/backend/payoutstatus/update',
                //deleteAction: '/backend/payoutstatus/delete'
            },
            fields: {
                id: {
                    title: 'Id',
                    key: true,
                    create: true,
                    edit: true,
                    list: true
                },
                title: {
                    title: 'Title',
                    list: true,
                    create: true,
                    edit: true
                },
                description: {
                    title: 'Description',
                    list: true,
                    create: true,
                    edit: true
                },
                color: {
                    title: 'Color',
                    list: false,
                    create: false,
                    edit: false
                },
                is_active: {
                    title: 'Active',
                    width: '5%',
                    list: true,
                    edit: true,
                    create: true,
                    options: {'0': 'Inactive', '1': 'Active'},
                    optionsSorting: 'id'
                }
            },
            recordsLoaded: function (event, data) {
                for (var i in data.records) {
                    if (data.records[i].status == 100) {
                        $('#TableContainer').find(".jtable tbody tr:eq(" + i + ")").css("cssText", "background-color:green !important; color:white !important;");
                    }
                    if (data.records[i].status == 1) {
                        $('#TableContainer').find(".jtable tbody tr:eq(" + i + ")").css("cssText", "background-color:yellow !important; color:black !important;");
                    }
                    if (data.records[i].status > 100) {
                        $('#TableContainer').find(".jtable tbody tr:eq(" + i + ")").css("cssText", "background-color:red !important; color:white !important;");
                    }
                }
            }
        });

        $('#TableContainer').jtable('load');
        
        
    });
</script>
{'fraction_non_alphanumeric': 0.12003657262277952, 'fraction_numerical': 0.003918495297805642, 'mean_word_length': 1.387589647645775, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '374964', 'n_tokens_mistral': 1966, 'n_tokens_neox': 1845, 'n_words': 543}