<div class="container-fluid container-fixed-lg bg-white" style="height:100%">
    <div class="panel panel-transparent">
        <div class="panel-heading">
            <div class="panel-title"> <?php print CommonLanguage::getMessage('vehicle_maintenance'); ?></div>
            <div class="row">
                <div class="col-md-3">  
                    <select name="main_filter" class="full-width" id="main_filter" data-init-plugin="select2">
                        <option value="0"><?php echo CommonLanguage::getMessage('All');?></option>
                        <option value="1"><?php echo CommonLanguage::getMessage('done');?></option>
                        <option value="2"><?php echo CommonLanguage::getMessage('not_done');?></option>
                    </select>
                </div>
            </div>
        </div>
        <div class="panel-body">
            <table class="table table-bordered garage" id="tableWithSearch" >
                <thead>
                    <tr>
                        <th class="text-center"><?php print CommonLanguage::getMessage('vehicle'); ?></th>
                        <th class="text-center"><?php print CommonLanguage::getMessage('vehicle_name'); ?></th>
                        <th class="text-center" ><?php print CommonLanguage::getMessage('checkup'); ?></th>
                        <th class="text-center"  ><?php print CommonLanguage::getMessage('oil_exchange'); ?></th>
                        <th class="text-center" ><?php print CommonLanguage::getMessage('vehicle_maintenance'); ?></th>
                        <th class="text-center" ><?php print CommonLanguage::getMessage('mecanique'); ?></th>
                        <th class="text-center" ><?php print CommonLanguage::getMessage('syndicate'); ?></th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
    </div>
</div>
<script>
    $(function () {
        RebuildDataTable($('.panel-heading .panel-title').html(), [0, 1, 2, 3,4], 'GarageAjax/vehiclemaintenanceListRequest',{main_filter:$('#main_filter').val()});
        $('#main_filter').on('change',function(){
            RebuildDataTable($('.panel-heading .panel-title').html(), [0, 1, 2, 3,4], 'GarageAjax/vehiclemaintenanceListRequest',{main_filter:$('#main_filter').val()});
        })
    });
</script>
