<style>
    .table thead tr >th{
        background-color:#4c0870;
        color:#fff;
    }
    .table thead tr th[class*='sorting_'] {
        color: #fff;
    }
    .bg-master-lighter {
        border:none;
        background-color:#fff;
        border-top:1px solid #ddd;  
    }
</style>
<div class="container-fluid container-fixed-lg bg-white">
    <div class="panel panel-transparent">
        <div class="panel-heading">
            <div class="panel-title"><?php print CommonLanguage::getMessage('employee_dependant'); ?></div>
            <div class="col-md-3 pull-right">
                <?php
                if ($permissions->hasPermission('addEmployeeDependent')) {
                    echo Forms::FloatingAddButton('4c0870', '#add_EmployeeDependent', CommonLanguage::getMessage('add'));
                }
                ?>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="col-md-12 table-responsive">

                    <table class="table table-bordered table-hover demo-table-search" id="tableWithSearch">
                        <thead>
                            <tr>
                                <th class="text-center" style="width:10%" ><?php print CommonLanguage::getMessage('employee_name'); ?></th>
                                <!--<th class="text-center" style="width:5%"><?php print CommonLanguage::getMessage('wife_works'); ?></th>-->
                                <th class="text-center" style="width:5%"><?php print CommonLanguage::getMessage('nb_of_child'); ?></th>
                                <th class="text-center" ><?php print CommonLanguage::getMessage('child_name'); ?></th>
                                <th class="text-center" style="width:10%"><?php print CommonLanguage::getMessage('child_dob'); ?></th>
                                <th class="text-center" style="width:20%"><?php print CommonLanguage::getMessage('child_school'); ?></th>
                                <th class="text-center" style="width:15%"><?php print CommonLanguage::getMessage('child_school_type'); ?></th>
                                <th class="text-center" style="width:15%"><?php print CommonLanguage::getMessage('child_class'); ?></th>
                                <th class="text-center" style="width:15%"><?php print CommonLanguage::getMessage('child_prob'); ?></th>
                                <th class="text-center" style="width:15%"><?php print CommonLanguage::getMessage('Action'); ?></th>
                            </tr>
                        </thead>
                        <tbody>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        RebuildDataTable($('.panel-heading .panel-title').html(), [0, 1, 2,3,4,5], 'HRMAjax/viewEmployeeDependantRequest', {},'#tableWithSearch',[0,1,8]);
        $('#tableWithSearch').on('click','.edit_employee_dependent',function(){
            $('#EmployeeDependant_ID').val($(this).attr('data-id')).attr('data-select-name',$(this).parents('tr').find('td:eq(0)').html())
            $('#EmployeeDependant_ID').trigger('change').attr('disabled',true)
        });
    });
</script>
<?php  include 'Views/HRM/addEmployeeDependent.php';