File manager - Edit - /home/wwwroot/camplus.hk/master.camplus.hk/public_html/application/modules/overtime/views/overtimes_record.php
Back
<!-- BEGIN DATATABLE SCRIPTS --> <link href="<?php echo base_url(); ?>assets/custom/datatables/datatables.min.css" rel="stylesheet" > <script src="<?php echo base_url(); ?>assets/custom/datatables/datatables.min.js"></script> <script src="<?php echo base_url(); ?>assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.js"></script> <script src="<?php echo base_url(); ?>assets/custom/js/camplus-datatable.js"></script> <link href="<?php echo base_url(); ?>assets/global/plugins/bootstrap-daterangepicker/daterangepicker.min.css" rel="stylesheet" > <link href="<?php echo base_url(); ?>assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css" rel="stylesheet" > <link href="<?php echo base_url(); ?>assets/global/plugins/bootstrap-timepicker/css/bootstrap-timepicker.min.css" rel="stylesheet" > <link href="<?php echo base_url(); ?>assets/global/plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" > <div class="tabbable-line"> <ul class="nav nav-tabs" style="text-align: center;"> <?php // if($this->acl->hasPermission('APPLY_MY_PR')): ?> <li class="col-md-6"> <a href="<?php echo base_url(); ?>overtime/overtime_approval/listing"> <?php echo $this->lang->line('overtime_approval') ?></a> </li> <?php // endif; ?> <?php // if($this->acl->hasPermission('VIEW_BUDGET_GROUP_PR')): ?> <li class="col-md-6 bg-green active"> <a href="<?php echo base_url(); ?>overtime/overtime_approval/record"> <?php echo $this->lang->line('overtime_approval') . ' ' . $this->lang->line('records'); ?></a> </li> <?php // endif; ?> </ul> </div> <div class="portlet light bordered"> <div class="portlet-title"> <div class="caption"> <i class="icon-doc font-dark"></i> <span class="bold"><?php echo $pagetitle; ?></span> </div> </div> <div class="portlet-body"> <table class="table table-striped table-bordered table-hover" id="data_table"> <thead> <tr> <th>id</th> <th><?php echo $this->lang->line('date'); ?></th> <th><?php echo $this->lang->line('applicant'); ?></th> <th><?php echo $this->lang->line('time'); ?></th> <th><?php echo $this->lang->line('remarks'); ?></th> <th><?php echo $this->lang->line('reason'); ?></th> <th><?php echo $this->lang->line('status');?></th> <th><?php echo $this->lang->line('last_approval');?></th> </tr> </thead> <tbody> </tbody> </table> </div> <div id="printDiv" class="panel panel-info" style="visibility:hidden"> <div class="panel-heading"> <h3 class="panel-title"><span class="type">Leave Type</span>: <span class="date">Leave Date<span></h3> </div> <div class="panel-body"> <?php echo $this->lang->line('applicant'); ?>: <span class="applicant">Adam</span></br> <?php echo $this->lang->line('time'); ?>: <span class="time">9:00 to 12:00</span></br> Total <?php echo $this->lang->line('days'); ?>: <span class="days">2</span> Days</br> <?php echo $this->lang->line('reason'); ?>: <span class="reason">I am sick</span></br> <?php echo $this->lang->line('status');?>: <span class="status">Approved</span></br> </div> </div> </div> <script> var table = $('#data_table').DataTable( { "processing": true, "serverSide": true, "ajax": { url: BASE_URL + 'overtime/overtime_approval/recordDT', type: 'POST', }, "columns": [ { "data": "id" }, { "data": "date"}, { "data": "username" }, { "data": null }, { "data": null }, { "data": null }, { "data": null }, { "data": null }, ], "columnDefs": [ { "targets": 0, "render": function ( data, type, row, meta ) { console.log(row); return row.id; } },{ "targets": 1, "render": function ( data, type, row, meta ) { return row.date; } },{ "targets": 2, "render": function ( data, type, row, meta ) { return row.username; } },{ "targets": 3, "render": function ( data, type, row, meta ) { return row.from_time + ' - ' + row.to_time ; } },{ "targets": 4, "render": function ( data, type, row, meta ) { return row.remarks; } },{ "targets": 5, "render": function ( data, type, row, meta ) { return row.reason; } },{ "targets":6, "render": function ( data, type, row, meta ) { switch(row.status) { case 'A': return '<span class="label label-sm label-success">Approved</span>' break; case 'R': return '<span class="label label-sm label-danger">Rejected</span>' break; case 'P': return '<span class="label label-sm label-warning">Pending</span>' break; case 'D': return '<span class="label label-sm label-info">Draft</span>' break; } } },{ "targets": 7, "render": function ( data, type, row, meta ) { switch(row.approval_status) { case 'A': return '<span class="label label-sm label-success">Approved</span> ' + row.created_date break; case 'R': return '<span class="label label-sm label-danger">Rejected</span> ' + row.created_date break; case 'P': return '<span class="label label-sm label-warning">Pending</span> ' + row.created_date break; case 'D': return '<span class="label label-sm label-info">Draft</span> ' + row.created_date break; } } }] } ); $(document).on('click','.print',function(){ var id = $(this).attr('data-id'); printDiv(id); }) function printDiv(id) { //var circular_body = tinyMCE.get('summernote').getContent(); $('#printDiv .date').html($('#'+id).children('td:nth-child(2)').html()); $('#printDiv .applicant').html($('#'+id).children('td:nth-child(3)').html()); $('#printDiv .type').html($('#'+id).children('td:nth-child(4)').html()); $('#printDiv .days').html($('#'+id).children('td:nth-child(5)').html()); $('#printDiv .time').html($('#'+id).children('td:nth-child(6)').html()); $('#printDiv .reason').html($('#'+id).children('td:nth-child(7)').html()); $('#printDiv .status').html($('#'+id).children('td:nth-child(8)').html()); var divElements = $('#printDiv').html(); divElements = divElements.replace(/class="ui-widget"/g,'class="ui-widget" style="display:inline-block;width:60%"'); var mywindow = window.open('', 'Camplus Admin System', 'height=400,width=600'); mywindow.document.write('<html><head><title>Camplus Admin System</title>'); mywindow.document.write('<link href="<?php echo base_url();?>assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/ >'); mywindow.document.write('<link href="<?php echo base_url();?>assets/global/css/components.min.css" rel="stylesheet" type="text/css"/ >'); mywindow.document.write('<link href="<?php echo base_url();?>assets/custom/css/custom.css" rel="stylesheet" type="text/css"/ >'); mywindow.document.write('<link href="<?php echo base_url();?>resources/css/themes/proedge.css" rel="stylesheet" type="text/css"/ >'); mywindow.document.write('<link href="<?php echo base_url();?>assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/ >'); mywindow.document.write('<link href="<?php echo base_url();?>assets/custom/css/print.css" rel="stylesheet" type="text/css" media="print" />'); mywindow.document.write('</head><body>'); mywindow.document.write(divElements); mywindow.document.write('\x3Cscript>document.addEventListener("DOMContentLoaded", function() {window.print();window.close();});\x3C/script>'); mywindow.document.write('</body></html>'); mywindow.document.close(); // necessary for IE >= 10 mywindow.focus(); // necessary for IE >= 10 //mywindow.close(); } </script> <script> if (jQuery().datepicker) { $('.date-picker').datepicker({ format: 'yyyy-mm-dd', autoclose: true }); } </script>
| ver. 1.4 |
Github
|
.
| PHP 7.2.34 | Generation time: 0.2 |
proxy
|
phpinfo
|
Settings