<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/>.
 *
 * Created: 31.05.2017
 */

$helperPrintDate = new Default_View_Helper_PrintDate();
$helperBuildProductUrl = new Default_View_Helper_BuildProductUrl();
$helperImage = new Default_View_Helper_Image();
$helpMemberUrl = new Default_View_Helper_BuildMemberUrl();

?>
<link href="/theme/flatui/js/lib/jquerymonthpicker/MonthPicker.css" rel="stylesheet" type="text/css" />
<link href="/theme/backend/lib/jquery-ui/themes/smoothness/jquery-ui.min.css" rel="stylesheet">
<link href="/theme/backend/lib/jtable/themes/jqueryui/jtable_jqueryui.min.css" rel="stylesheet">
<script src="/theme/backend/lib/jquery-ui/jquery-ui.min.js"></script>
<script src="/theme/backend/lib/jtable/jquery.jtable.min.js"></script>
<script src="/theme/flatui/js/lib/jquerymonthpicker/MonthPicker.js"></script>

<style type="text/css">
        img.pimage{
            float: left;            
        }
        div.ptitle{
            margin-left: 140px; 
            font-size: 13px;
            font-weight: bold;     
        }
        div.jtable-main-container table.jtable tbody > tr > td{
            vertical-align: top;
            border-left:0px;
            border-right:0px;
            font-size: small;
        }
        div.jtable-main-container table.jtable{
            border: 0px;
        }
        div.jtable-main-container table.jtable th{
            border: 0px;
            background: none;
            font-weight: bold;
        }
        
        #products-wrapper{
            padding-bottom: 20px;
        }


        #explore-content .ui-state-default
        {
            background: none;
            border: 0px;

        }


        #explore-content div.jtable-main-container table.jtable .rating{
            width:80px; 
            margin-left:140px;
            padding-top:20px;
        }
        #explore-content div.jtable-main-container table.jtable .tooltipuser{
            color: #2673b0;
            cursor: pointer;
        }
        
        .container-wrapper{
            display: flex;
             flex-grow: 1;
              flex-direction: row;        
        }
             

</style>
<main id="explore-content">
  <section class="wrapper" id="products-wrapper" >
<h1>
    Most New Products   
</h1>
 <form style="margin-top: 20px; margin-bottom: 20px">
       
            Month <input name="filterMonth" id="filterMonth" value="<?php echo date("Ym") ?>" />                   
                <button type="submit" id="LoadRecordsButton"><?= $this->translate('Load records'); ?></button>
                <input type="checkbox" name="nonwallpaper" id="nonwallpaper" >Non-Wallpaper filter 
          
  </form>
    <div id="TableContainer"></div>    
    
    </section>
</main>
<div class="tooltip_templates" style="display: none">
    <span id="tooltip_content">
        <i class="fa fa-spinner"></i>
    </span>
</div>
<script type="text/javascript">
    $(document).ready(function () {

        //Re-load records when user click 'load records' button.
        $('#LoadRecordsButton').click(function (e) {
            e.preventDefault();
            $('#TableContainer').jtable('load', {
                filterMonth: $('#filterMonth').val(),       
                nonwallpaper:($('#nonwallpaper').is(':checked')?1:0) 
            },function(){
            
            });
        });

        $('#filterMonth').MonthPicker({ StartYear: 2019, ShowIcon: true,MonthFormat:'yymm',OnAfterChooseMonth: function() { 
                        window.selectedMonth = $(this).val();
                }  });

        $("#dialog-form").dialog({
            autoOpen: false,
            //height: 350,
            width: 600,
            modal: true,
            buttons: {
                Close: function () {
                    $(this).dialog("close");
                }
            }
        });


        $('#TableContainer').jtable({
            jqueryuiTheme: true,
            paging: true,
            sorting: true,           
            recordsLoaded: function (event, data) {
                TooltipUser.setup("tooltipuser","right");        
            },          
            actions: {
                listAction: '/newproducts/list'                
            },
            fields: {
                    member_id: {
                                     title: 'member_id',
                                     key: true,
                                     create: false,
                                     edit: false,
                                     list: true ,
                                     sorting: false                  
                                 },
                    username: {
                                     title: 'username',                                     
                                     create: false,
                                     edit: false,
                                     list: true,                   
                                     sorting: false,
                                     display:function(data){                        <commit_msg>newproducts<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/>.
 *
 * Created: 31.05.2017
 */

$helperPrintDate = new Default_View_Helper_PrintDate();
$helperBuildProductUrl = new Default_View_Helper_BuildProductUrl();
$helperImage = new Default_View_Helper_Image();
$helpMemberUrl = new Default_View_Helper_BuildMemberUrl();

?>
<link href="/theme/flatui/js/lib/jquerymonthpicker/MonthPicker.css" rel="stylesheet" type="text/css" />
<link href="/theme/backend/lib/jquery-ui/themes/smoothness/jquery-ui.min.css" rel="stylesheet">
<link href="/theme/backend/lib/jtable/themes/jqueryui/jtable_jqueryui.min.css" rel="stylesheet">
<script src="/theme/backend/lib/jquery-ui/jquery-ui.min.js"></script>
<script src="/theme/backend/lib/jtable/jquery.jtable.min.js"></script>
<script src="/theme/flatui/js/lib/jquerymonthpicker/MonthPicker.js"></script>

<style type="text/css">
        img.pimage{
            float: left;            
        }
        div.ptitle{
            margin-left: 140px; 
            font-size: 13px;
            font-weight: bold;     
        }
        div.jtable-main-container table.jtable tbody > tr > td{
            vertical-align: top;
            border-left:0px;
            border-right:0px;
            font-size: small;
        }
        div.jtable-main-container table.jtable{
            border: 0px;
        }
        div.jtable-main-container table.jtable th{
            border: 0px;
            background: none;
            font-weight: bold;
        }
        
        #products-wrapper{
            padding-bottom: 20px;
        }


        #explore-content .ui-state-default
        {
            background: none;
            border: 0px;

        }


        #explore-content div.jtable-main-container table.jtable .rating{
            width:80px; 
            margin-left:140px;
            padding-top:20px;
        }
        #explore-content div.jtable-main-container table.jtable .tooltipuser{
            color: #2673b0;
            cursor: pointer;
        }
        
        .container-wrapper{
            display: flex;
             flex-grow: 1;
              flex-direction: row;        
        }
             

</style>
<main id="explore-content">
  <section class="wrapper" id="products-wrapper" >
<h1>
    Most New Products   
</h1>
 <form style="margin-top: 20px; margin-bottom: 20px">
       
            Month <input name="filterMonth" id="filterMonth" value="<?php echo date("Ym") ?>" />                   
                <button type="submit" id="LoadRecordsButton"><?= $this->translate('Load records'); ?></button>
                <input type="checkbox" name="nonwallpaper" id="nonwallpaper" >Non-Wallpaper filter 
          
  </form>
    <div id="TableContainer"></div>    
    
    </section>
</main>
<div class="tooltip_templates" style="display: none">
    <span id="tooltip_content">
        <i class="fa fa-spinner"></i>
    </span>
</div>
<script type="text/javascript">
    $(document).ready(function () {

        //Re-load records when user click 'load records' button.
        $('#LoadRecordsButton').click(function (e) {
            e.preventDefault();
            $('#TableContainer').jtable('load', {
                filterMonth: $('#filterMonth').val(),       
                nonwallpaper:($('#nonwallpaper').is(':checked')?1:0) 
            },function(){
            
            });
        });

        $('#filterMonth').MonthPicker({ StartYear: 2019, ShowIcon: true,MonthFormat:'yymm',OnAfterChooseMonth: function() { 
                        window.selectedMonth = $(this).val();
                }  });

        $("#dialog-form").dialog({
            autoOpen: false,
            //height: 350,
            width: 600,
            modal: true,
            buttons: {
                Close: function () {
                    $(this).dialog("close");
                }
            }
        });


        $('#TableContainer').jtable({
            jqueryuiTheme: true,
            paging: true,
            sorting: true,           
            recordsLoaded: function (event, data) {
                TooltipUser.setup("tooltipuser","right");        
            },          
            rowInserted: function (event, data) {
               if (data.record.cntOther==0) {                   
                    data.row.css("background", "#FF4500");                   
               }
            },
            actions: {
                listAction: '/newproducts/list'                
            },
            fields: {
                    member_id: {
                                     title: 'member_id',
                                     key: true,
                                     create: false,
                                     edit: false,
                                     list: true ,
                                     sorting: false                  
                                 },
                    username: {
                                     title: 'username',                                     
                                     create: false,
                                     edit: false,
                                     list: true,                   
                                     sorting: false,
                                     display:function(data){                        
{'fraction_non_alphanumeric': 0.11604835348061693, 'fraction_numerical': 0.009754064193413922, 'mean_word_length': 1.4367255738370912, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 81, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3019710', 'n_tokens_mistral': 3245, 'n_tokens_neox': 3069, 'n_words': 696}