File indexing completed on 2024-12-29 05:24:49

0001 <?php 
0002 /**
0003  *  ocs-webserver
0004  *
0005  *  Copyright 2016 by pling GmbH.
0006  *
0007  *    This file is part of ocs-webserver.
0008  *
0009  *    This program is free software: you can redistribute it and/or modify
0010  *    it under the terms of the GNU Affero General Public License as
0011  *    published by the Free Software Foundation, either version 3 of the
0012  *    License, or (at your option) any later version.
0013  *
0014  *    This program is distributed in the hope that it will be useful,
0015  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
0016  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0017  *    GNU Affero General Public License for more details.
0018  *
0019  *    You should have received a copy of the GNU Affero General Public License
0020  *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
0021  **/
0022 ?>
0023 
0024 <style type="text/css">
0025         
0026 
0027         div.jtable-main-container table.jtable tbody > tr > td{
0028             vertical-align: top;
0029             border-left:0px;
0030             border-right:0px;
0031             font-size: small;
0032         }
0033         div.jtable-main-container table.jtable{
0034             border: 0px;
0035         }
0036         div.jtable-main-container table.jtable th{
0037             border: 0px;
0038             background: none;
0039             font-weight: bold;
0040         }
0041         
0042         #TableContainer
0043         {
0044             padding: 20px;
0045         }
0046         #titleheader{
0047             padding-left: 20px;
0048             padding-top: 100px;
0049         }
0050 
0051         a.btn-xs
0052         {
0053             line-height: 12px;
0054             padding: 3px 5px;
0055             border-radius: 2px;
0056             margin: 2px;
0057             float: right;
0058         }
0059         
0060 
0061         div.jtable-main-container table.jtable .tooltipuser{
0062             color: #2673b0;
0063             cursor: pointer;
0064         }
0065 
0066         div.jtable-main-container img.avatar{
0067                 width: 50px;
0068                 border: 1px solid #dbdbdb;
0069                 -webkit-border-radius: 999px;
0070                 -moz-border-radius: 999px;
0071                 border-radius: 999px;
0072                 -webkit-background-clip: padding-box;
0073                 -moz-background-clip: padding;
0074                 background-clip: padding-box;
0075                 display: block;
0076         }
0077        
0078        a.removeuser{
0079         display: block;
0080        }
0081 
0082        .aligncenter
0083        {
0084         text-align: center;
0085        }
0086 
0087 
0088 </style>
0089 
0090 <link href="/theme/backend/lib/jquery-ui/themes/smoothness/jquery-ui.min.css" rel="stylesheet">
0091 <link href="/theme/backend/lib/jtable/themes/jqueryui/jtable_jqueryui.min.css" rel="stylesheet">
0092 <script src="/theme/backend/lib/jquery-ui/jquery-ui.min.js"></script>
0093 <script src="/theme/backend/lib/jtable/jquery.jtable.min.js"></script>
0094 
0095 <div class="messages">
0096 
0097 </div>
0098 <div class="tooltip_templates" style="display:none">
0099       <span id="tooltip_content">
0100           <i class="fa fa-spinner"></i>
0101       </span>
0102   </div>
0103 <div id="titleheader"> <h1>List of unpublished products </h1></div>
0104 <div id="TableContainer"></div>
0105 <div id="dialog-form" title="Object Details"></div>
0106 <div id="dialog-confirm" title="Confirm"></div>
0107 <script type="text/javascript">
0108     $(document).ready(function () {
0109         $('#TableContainer').jtable({
0110             jqueryuiTheme: true,
0111             paging: true,
0112             sorting: false,            
0113             actions: {
0114                 listAction: '/spam/unpublishedproductlist',                                       
0115             },
0116             recordsLoaded: function (event, data) {
0117                 TooltipUser.setup("tooltipuser","right");        
0118             },
0119             rowInserted: function (event, data) {
0120                if (data.record.is_wallpaper==1) {                   
0121                     data.row.css("background", "#F7F7E1");                   
0122                }
0123 
0124             },
0125             fields: {
0126                 project_id: {
0127                     key: true,
0128                     title: 'project id',
0129                     create: false,
0130                     edit: false,
0131                     list: true,
0132                     display:function(data){     
0133                         return '<a style="color: #23527c;" target="_blank" href="/p/'+data.record.project_id+'">'+data.record.project_id+'</a>';
0134                     }
0135                 }, 
0136                 title:{
0137                     title:'title',
0138                     list:true
0139                 },
0140                 cat_title: {                    
0141                     title: 'category',
0142                     create: false,
0143                     edit: false,
0144                     list: true
0145                 }, 
0146                                               
0147                 unpublished_time: {
0148                     title: 'unpublished_time',
0149                     width: '10%',                  
0150                     create: false,
0151                     edit: false
0152                 },
0153                 created_at: {
0154                     title: 'created',
0155                     width: '10%',                  
0156                     create: false,
0157                     edit: false
0158                 },
0159                 member_id: {
0160                     title: 'by',
0161                     width: '5%',
0162                     edit: false,                    
0163                     display:function(data){                        
0164                         var html = '<a href="/u/'+data.record.username+'" target="_blank" class="tooltipuser" data-tooltip-content="#tooltip_content" data-user="'+data.record.member_id+'" >';
0165 
0166                         if(data.record.is_deleted==1)
0167                         {
0168                             html += '<span style="color:red">'+data.record.username+'</span></a>';
0169                         }else{
0170                             html=html+data.record.username+'</a>';    
0171                         }
0172                         
0173                        
0174                          return html;
0175                     }
0176                 },      
0177                 probably_payout_amount :{
0178                     title:'Product last month earn',
0179                     list:true
0180                 },
0181                 earn: {
0182                     title: 'Member last month earn',
0183                     width: '10%',                    
0184                     create: false,
0185                     edit: false,
0186                     display:function(data){                          
0187                         return data.record.earn;
0188                     }
0189                   
0190                 },
0191                 paypal_mail: {
0192                     title: 'paypal',
0193                     width: '10%',                    
0194                     create: false,
0195                     edit: false,
0196                   
0197                 }
0198                 
0199             }
0200         });
0201 
0202         //$('#TableContainer').jtable('load');
0203         $('#TableContainer').jtable('load', {},function(){
0204               //TooltipUser.setup("tooltipuser","right");        
0205             });
0206 
0207         $("#dialog-form").dialog({
0208             autoOpen: false,
0209             //height: 350,
0210             width: 600,
0211             modal: true,
0212             buttons: {
0213                 Close: function () {
0214                     $(this).dialog("close");
0215                 }
0216             }
0217         });
0218 
0219        
0220 
0221 
0222 
0223     });
0224 </script>