File manager - Edit - /home/wwwroot/camplus.hk/master.camplus.hk/public_html/application/modules/overtime/views/overtime_approval.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> <!-- END DATATABLE SCRIPTS --> <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 bg-green active"> <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"> <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 class="actions"> <div class="btn btn-outline green bulk-approve" data-action-title="Bulk Approve"> <i class="fa fa-check"></i> Bulk Approve </div> <div class="btn btn-outline red bulk-reject" data-action-title="Bulk Reject"> <i class="fa fa-times"></i> Bulk Reject </div> </div> </div> <div class="portlet-body"> <table class="table table-striped table-bordered table-hover" id="data_table"> <thead> <tr> <th></th> <th>id</th> <th><?php echo $this->lang->line('applicant'); ?></th> <th><?php echo $this->lang->line('date'); ?></th> <th><?php echo $this->lang->line('from_time'); ?></th> <th><?php echo $this->lang->line('to_time'); ?></th> <th><?php echo $this->lang->line('hours'); ?></th> <th><?php echo $this->lang->line('remark'); ?></th> <th><?php echo $this->lang->line('actions'); ?></th> </tr> </thead> <tbody> <?php foreach($overtimes as $key => $overtime): ?> <?php $diff = strtotime($overtime['to_time']) - strtotime($overtime['from_time']); $hrs = $diff / 3600; ?> <tr class="odd gradeX"> <td> <label class="mt-checkbox mt-checkbox-single mt-checkbox-outline"> <input type="checkbox" class="checkboxes" data-id="<?php echo $overtime['otapp_id']; ?>" value="1"/> <span></span> </label> </td> <td><?php echo $overtime['id']; ?></td> <td><?php echo ($overtime['uid']!=0)? $users[array_search($overtime['uid'],array_column($users,'id'))][($_COOKIE['language']=='en')?'name_english':'name_chinese']:"-"; ?></td> <td><?php echo $overtime['date']; ?></td> <td><?php echo $overtime['from_time']; ?></td> <td><?php echo $overtime['to_time']; ?></td> <td><?php echo number_format($hrs, 2, '.', '') ; ?></td> <td><?php echo $overtime['remarks']; ?> </td> <td> <?php if($this->acl->hasPermission('APPROVE_OVERTIME')) : ?> <a class="btn btn-xs blue actionmodel" data-action-title="<?php echo $this->lang->line('approve'); ?>" data-id="<?php echo $overtime['id']; ?>" gid="<?php echo $overtime['gid'];?>" otapp-id="<?php echo $overtime['otapp_id'];?>" level-id="<?php echo $overtime['level_id'];?>" status="A" data-toggle="modal" href="javascript:void(0)" > <i class="fa fa-edit"></i> <?php echo $this->lang->line('approve'); ?> </a> <a class="btn btn-xs red actionmodel" data-action-title="<?php echo $this->lang->line('reject'); ?>" data-id="<?php echo $overtime['id'];?>" gid="<?php echo $overtime['gid'];?>" otapp-id="<?php echo $overtime['otapp_id'];?>" level-id="<?php echo $overtime['level_id'];?>" status="R" data-toggle="modal" href="javascript:void(0)" > <i class="fa fa-trash-o"></i> <?php echo $this->lang->line('reject'); ?> </a> <?php endif; ?> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> </div> <div id="actionBulkModal" class="modal fade" tabindex="-1" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> <h4 class="modal-title"><span class="actionEventTitle"></span> <?php echo $pagetitle; ?></h4> </div> <form id="bulkForm" method="post" action=> <div class="modal-body"> <h4><?php echo $this->lang->line('are_you_sure'); ?></h4> <input type="hidden" id="bulk" name="id"/> </div> <div class="modal-footer"> <button type="button" data-dismiss="modal" class="btn default"><?php echo $this->lang->line('close'); ?></button> <button type="submit" class="btn default green confirmAction"><?php echo $this->lang->line('yes'); ?></a> </div> </form> </div> </div> </div> <div id="actionmodel" class="modal fade" tabindex="-1" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <form method="post" action="" class="actionmodelform"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> <h4 class="modal-title"><?php echo $this->lang->line('reject'); ?> <?php echo $pagetitle; ?></h4> </div> <div class="modal-body"> <div class="scroller" style="height:120px" data-always-visible="1" data-rail-visible="1"> <div class="form-group"> <label class="control-label">Reason</label> <textarea name="reason" class="form-control form-control-inline placeholder " placeholder="Reason" required > </textarea> </div> </div> </div> <div class="modal-footer"> <button type="button" data-dismiss="modal" class="btn default"><?php echo $this->lang->line('close'); ?></button> <input type="submit" class="btn green" value="<?php echo $this->lang->line('yes'); ?>"> </div> </form> </div> </div> </div> <script> $(document).ready(function(){ initTable(1); $(document).on('click','.actionmodel',function(){ var id=$(this).attr('data-id'); $('#actionmodel').modal('show'); $('.actionmodelform').attr('action',BASE_URL+'overtime/overtime_approval/action/'+id+'/'+$(this).attr('gid')+'/'+$(this).attr('otapp-id')+'/'+$(this).attr('level-id')+'/'+$(this).attr('status') ); $('.modal-title').html($(this).attr('data-action-title')); $('.actionmodelform').validate(); }); }); $('.bulk-approve').on('click',function(){ $('#actionBulkModal span.actionEventTitle').html($(this).attr('data-action-title')); $('#actionBulkModal').modal('show') var ids = $('input.checkboxes:checkbox:checked').map(function() { return $(this).data('id'); }).get() $('#actionBulkModal form').attr('action',BASE_URL+'overtime/overtime_approval/bulkApprove'); $('#bulk').val(ids.join(',')); }) $('.bulk-reject').on('click',function(){ $('#actionBulkModal span.actionEventTitle').html($(this).attr('data-action-title')); $('#actionBulkModal').modal('show') var ids = $('input.checkboxes:checkbox:checked').map(function() { return $(this).data('id'); }).get() $('#actionBulkModal form').attr('action',BASE_URL+'overtime/overtime_approval/bulkReject/'); $('#bulk').val(ids.join(',')); }) </script>
| ver. 1.4 |
Github
|
.
| PHP 7.2.34 | Generation time: 0.4 |
proxy
|
phpinfo
|
Settings