File indexing completed on 2025-05-04 05:29:02
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 <div class="messages"> 0024 <?php foreach (Zend_Controller_Action_HelperBroker::getStaticHelper('flashMessenger') 0025 ->getCurrentMessages() as $message) : ?> 0026 <p><?php echo $this->escape($message); ?></p> 0027 <?php endforeach; ?> 0028 </div> 0029 <?php 0030 $lastMonth = date("Ym", strtotime("first day of previous month")); 0031 ?> 0032 0033 <div id="TableContainer"></div> 0034 <script type="text/javascript"> 0035 $(document).ready(function () { 0036 $('#TableContainer').jtable({ 0037 jqueryuiTheme: true, 0038 paging: true, 0039 sorting: true, 0040 defaultSorting: 'amount asc', 0041 title: 'Table of payout stati', 0042 actions: { 0043 listAction: '/backend/payoutstatus/list', 0044 createAction: '/backend/payoutstatus/create', 0045 updateAction: '/backend/payoutstatus/update', 0046 //deleteAction: '/backend/payoutstatus/delete' 0047 }, 0048 fields: { 0049 id: { 0050 title: 'Id', 0051 key: true, 0052 create: true, 0053 edit: true, 0054 list: true 0055 }, 0056 type: { 0057 title: 'Type', 0058 list: true, 0059 create: true, 0060 edit: true, 0061 options: {'info': 'Info', 'warning': 'Warning', 'danger': 'Error', 'success': 'Success'} 0062 }, 0063 title: { 0064 title: 'Title', 0065 list: true, 0066 create: true, 0067 edit: true 0068 }, 0069 description: { 0070 title: 'Description', 0071 list: true, 0072 create: true, 0073 edit: true 0074 }, 0075 color: { 0076 title: 'Color', 0077 list: true, 0078 create: true, 0079 edit: true, 0080 defaultValue: '#31708f;' 0081 }, 0082 icon: { 0083 title: 'Icon', 0084 list: true, 0085 create: true, 0086 edit: true, 0087 defaultValue: 'glyphicon-info-sign' 0088 }, 0089 is_active: { 0090 title: 'Active', 0091 width: '5%', 0092 list: true, 0093 edit: true, 0094 create: true, 0095 options: {'0': 'Inactive', '1': 'Active'}, 0096 optionsSorting: 'id' 0097 } 0098 }, 0099 recordsLoaded: function (event, data) { 0100 for (var i in data.records) { 0101 $('#TableContainer').find(".jtable tbody tr:eq(" + i + ")").css("cssText", "background-color:" + data.records[i].color + " !important; color:white !important;"); 0102 } 0103 }, 0104 recordUpdated: function (event, data) { 0105 $('#TableContainer').jtable('load'); 0106 }, 0107 rowUpdated: function (event, data) { 0108 $('#TableContainer').jtable('load'); 0109 } 0110 }); 0111 0112 $('#TableContainer').jtable('load'); 0113 0114 }); 0115 </script>