<style>
    #tableWithSearch thead tr >th{
        background-color:#4c0870;
        color:#fff;
    }
     .actionButton{
        background-color:#4c0870;
    }
</style>
<div class="container-fluid container-fixed-lg bg-white">
    <div class="panel panel-transparent">
        <div class="panel-heading">
            <div class="panel-title">
                <h4 class="bold"><?php echo $title; ?> </h4>
            </div>
            <?php if ($permissions->hasPermission('add_project_funding')) { ?>
            <div class="floatingContainer ">
                <a href="ACC/project_funding" >
                    <div class="actionButton" >
                        <p class="floatingText"><span class="floatingTextBG"><?php echo CommonLanguage::getMessage('add') ?></span></p>
                    </div>
                </a>
            </div>
            <?php } ?>
        </div>
        <div class="panel-body">
            <div class="row">

            </div>
            <div class="row">
                <div class="col-md-12 table-responsive">
                    <table class="table table-bordered table-hover" id="tableWithSearch">
                        <thead>
                            <tr>
                                <th class="text-center" style="width:10%" >#</th>
                                <th class="text-center" style="width:10%" > <?php print CommonLanguage::getMessage('project'); ?></th>
                                <th class="text-center" style="width:10%" > <?php print CommonLanguage::getMessage('project_period'); ?></th>
                                <th class="text-center" style="width:15%" > <?php print CommonLanguage::getMessage('period'); ?></th>
                                <th class="text-center" style="width:10%"> <?php print CommonLanguage::getMessage('date_created'); ?></th>
                                <th class="text-center no-print" style="width:5%"><?php print CommonLanguage::getMessage('Action'); ?></th>
                            </tr>
                        </thead>
                        <tbody>

                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {

        ChangeTable();

        $("#tableWithSearch").on("click", ".delete", function () {
            var entry_value = $(this).parents('.Action').attr('data-id');
            IncludeDeleteModal(common_delete_modal, {project_funding_id:entry_value}, function () {
                ChangeTable();
            }, "ACCAjax/delete_project_funding");
        });
    });

    function ChangeTable() {
        RebuildDataTable($('.panel-title h4').html(), [0, 1, 2, 3, 4, 5, 6, 7], 'ACCAjax/project_funding_list')
    }
</script>
