<div class="container-fluid container-fixed-lg bg-white">
    <div class="panel panel-transparent">
        <div class="panel-heading">
            <div class="panel-title"><?php echo $title; ?> </div>
        </div>
        <div class="panel-body">
            <div class="row form-group">
                <div class="col-md-3">
                    <label><?php echo CommonLanguage::getMessage('type') ?></label>
                    <select id="type_filter" class="full-width" data-init-plugin="select2">
                        <option value=""><?php echo CommonLanguage::getMessage('all') ?></option>
                        <option value="0"><?php echo CommonLanguage::getMessage('contact') ?></option>
                        <option value="1"><?php echo CommonLanguage::getMessage('customer') ?></option>
                        <option value="2"><?php echo CommonLanguage::getMessage('road_customer') ?></option>
                    </select>
                </div>

            </div>
            <div class="row">
                <div class="table-responsive col-md-12 m-t-10">
                    <table class="table table-bordered table-hover crm-table" id="tableWithSearch" >
                        <thead>
                            <tr>
                                <th class="text-center"><?php print CommonLanguage::getMessage('contact_name'); ?></th>
                                <th class="text-center"><?php print CommonLanguage::getMessage('Phone'); ?></th>
                                <th class="text-center"><?php print CommonLanguage::getMessage('contact_mobile_phone'); ?></th>
                                <th class="text-center"><?php print CommonLanguage::getMessage('job'); ?></th>
                                <th class="text-center"><?php print CommonLanguage::getMessage('note'); ?></th>
                            </tr>
                        </thead>
                        <tbody>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        build_table()
        $("#type_filter").on("change", function () {
            build_table()
        })
    })
    function build_table() {
        var data = {
            type: $("#type_filter").val()
        };
        RebuildDataTable($('.panel-heading .panel-title').html(), [0, 1, 2, 3, 4], 'crmAjax/general_guide_report', data);

    }
</script>