<?php

$cs = Yii::app()->getClientScript();
$baseUrl = Yii::app()->baseUrl;
$cs = Yii::app()->getClientScript();

$cs->registerScript("loadApprovalHistory", '
        $(document).ready(function() {
        var table_id ="#tbl_approval_details";
        var file_id =$("#hid_file_id").val();
        var table = $(table_id).DataTable({
             scrollY         : "250px",
             paging:false,
            ajax: {
                url: "' . Yii::app()->createUrl('purchasingorder/getapprovalhistorylist') . '",
                type: "POST",
                data:{"file_id":file_id},
                cache : false,
            },
            serverSide:     true,
            fixedColumns:   true,
            processing: true,
            fixedHeader: {
                headerOffset: $("header.main").outerHeight()
            }
        } );
        $(".dataTables_scrollFoot").hide();

    });', CClientScript::POS_HEAD);


?>
         <input type="hidden" name="hid_file_id" id="hid_file_id" value="<?php echo $file_id;?>">


<div class="custom-data-table">

    <table class="table table-hover table-bordered personal-task" id="tbl_approval_details">

        <thead>
            <tr>
                <th>No.</th>
                <th>Approved By</th>                          
                <th>Approved Date/Time</th>
                <th>Status</th>  
                <th>From</th>  
            </tr>

        </thead>
        <tfoot>
            <tr>
                <th>No.</th>
                <th>Approved By</th>                          
                <th>Approved Date/Time</th>
                <th>Status</th>   
                <th>From</th>   
            </tr>
        </tfoot>
    </table>
</div>