File indexing completed on 2025-05-04 05:29:31
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 $this->tab = 'payouthistory2'; 0024 $this->countDownloadsOverall = 0; 0025 0026 ?> 0027 <style type="text/css"> 0028 .chart-wrapper { 0029 max-width: 950px; 0030 min-width: 804px; 0031 margin: 0 auto; 0032 background-color: #FAF7F7; 0033 } 0034 0035 .chart-wrapper .inner-wrapper { 0036 position: relative; 0037 padding-bottom: 50%; 0038 width: 100%; 0039 } 0040 0041 .chart-wrapper .outer-box { 0042 position: absolute; 0043 top: 0; bottom: 0; left: 0; right: 0; 0044 } 0045 0046 .chart-wrapper .inner-box { 0047 width: 100%; 0048 height: 100%; 0049 } 0050 0051 .chart-wrapper text { 0052 font-family: sans-serif; 0053 font-size: 11px; 0054 } 0055 0056 .chart-wrapper p { 0057 font-size: 16px; 0058 margin-top:5px; 0059 margin-bottom: 40px; 0060 } 0061 0062 .chart-wrapper .axis path, 0063 .chart-wrapper .axis line { 0064 fill: none; 0065 stroke: #1F1F2E; 0066 stroke-opacity: 0.7; 0067 shape-rendering: crispEdges; 0068 0069 } 0070 .chart-wrapper .axis path { 0071 stroke-width: 2px; 0072 } 0073 0074 .chart-wrapper .line { 0075 fill: none; 0076 stroke: steelblue; 0077 stroke-width: 5px; 0078 } 0079 0080 .chart-wrapper .legend { 0081 min-width: 200px; 0082 display: flex; 0083 justify-content: flex-start; 0084 flex-wrap: wrap; 0085 font-size: 16px; 0086 padding: 10px 40px; 0087 } 0088 .chart-wrapper .legend > div { 0089 margin: 0px 25px 10px 0px; 0090 flex-grow: 0; 0091 } 0092 .chart-wrapper .legend p { 0093 display:inline; 0094 font-size: 0.8em; 0095 font-family: sans-serif; 0096 font-weight: 600; 0097 } 0098 .chart-wrapper .legend .series-marker { 0099 height: 1em; 0100 width: 1em; 0101 border-radius: 35%; 0102 background-color: crimson; 0103 display: inline-block; 0104 margin-right: 4px; 0105 margin-bottom: -0.16rem; 0106 } 0107 0108 .chart-wrapper .overlay { 0109 fill: none; 0110 pointer-events: all; 0111 } 0112 0113 .chart-wrapper .focus circle { 0114 fill: crimson; 0115 stroke: crimson; 0116 stroke-width: 2px; 0117 fill-opacity: 15%; 0118 } 0119 .chart-wrapper .focus rect { 0120 fill: lightblue; 0121 opacity: 0.4; 0122 border-radius: 2px; 0123 } 0124 .chart-wrapper .focus.line { 0125 stroke: steelblue; 0126 stroke-dasharray: 2,5; 0127 stroke-width: 2; 0128 opacity: 0.5; 0129 } 0130 @media (max-width:500px){ 0131 .chart-wrapper .line {stroke-width: 3px;} 0132 .chart-wrapper .legend {font-size: 14px;} 0133 } 0134 0135 0136 /* Style the dots by assigning a fill and stroke */ 0137 .dot { 0138 fill: #2185D0; 0139 stroke: #fff; 0140 } 0141 /* Style the dots by assigning a fill and stroke */ 0142 .dotRed { 0143 fill: #ffab00; 0144 stroke: #fff; 0145 } 0146 .dotRed 0147 </style> 0148 0149 0150 <main class="user-admin-page"> 0151 <?php echo $this->render('user/partials/userHeader_top.phtml'); ?> 0152 <section class="body-wrap"> 0153 <section class="wrapper product-page"> 0154 <!-- PAGE BODY --> 0155 <section class="my-products-page"> 0156 <!-- NAVIGATION --> 0157 <?php echo $this->render('user/partials/userHeader.phtml'); ?> 0158 <!-- /NAVIGATION --> 0159 <div class="my-products-heading" style="border-bottom: none; padding-bottom: 0px;"> 0160 <h1 class="page-title left"><?= $this->translate('Payout History') ?></h1> 0161 0162 </div> 0163 0164 <div class="my-payouthistory-list" id="my-payouthistory-list"> 0165 <div id="payouthistorycontainer" class="chart-wrapper" style=" height: 100%; display: block; clear: both "> 0166 0167 </div> 0168 0169 </div> 0170 <!-- /PAGE BODY --> 0171 </section> 0172 </section> 0173 </section> 0174 </main> 0175 <script src="https://d3js.org/d3.v4.min.js"></script> 0176 <script src="/theme/flatui/js/lib/multiline_payout.js"></script> 0177 <script type="text/javascript"> 0178 var dataset = <?php echo Zend_Json::encode($this->payouthistory2);?>; 0179 $(document).ready(function () { 0180 !(function (d3) { 0181 var parseTime = d3.timeParse("%Y%m"); 0182 if(!dataset){ 0183 $("#my-payouthistory-list").text('no data found!'); 0184 return; 0185 } 0186 0187 dataset.forEach(function (d) { 0188 d.year = parseTime(d.yearmonth); 0189 // d.year = d.yearmonth; 0190 d.amount = +d.amount; 0191 }); 0192 var chartColumns ={ 0193 'Payout Monthly': {column: 'amount'} 0194 }; 0195 0196 var chart = makeLineChart(dataset, 'year',chartColumns , {xAxis: 'Month', yAxis: 'Amount'}); 0197 0198 chart.bind("#payouthistorycontainer"); 0199 chart.render(); 0200 0201 })(d3); 0202 0203 }); 0204 0205 0206 </script> 0207