<?php
$comp_model = new SharedController;
$page_element_id = "list-page-" . random_str();
$current_page = $this->set_current_page_link();
$csrf_token = Csrf::$token;
//Page Data From Controller
$view_data = $this->view_data;
$records = $view_data->records;
$record_count = $view_data->record_count;
$total_records = $view_data->total_records;
$field_name = $this->route->field_name;
$field_value = $this->route->field_value;
$view_title = $this->view_title;
$show_header = $this->show_header;
$show_footer = $this->show_footer;
$show_pagination = $this->show_pagination;
?>
<section class="page" id="<?php echo $page_element_id; ?>" data-page-type="list"  data-display-type="table" data-page-url="<?php print_link($current_page); ?>">
    <?php
    if( $show_header == true ){
    ?>
    <div  class="bg-light p-3 mb-3">
        <div class="container-fluid">
            <div class="row ">
                <div class="col ">
                    <h4 class="record-title">Mhs2</h4>
                </div>
                <div class="col-sm-3 ">
                    <a  class="btn btn btn-primary my-1" href="<?php print_link("mhs2/add") ?>">
                        <i class="fa fa-plus"></i>                              
                        Add New Mhs2 
                    </a>
                </div>
                <div class="col-sm-4 ">
                    <form  class="search" action="<?php print_link('mhs2'); ?>" method="get">
                        <div class="input-group">
                            <input value="<?php echo get_value('search'); ?>" class="form-control" type="text" name="search"  placeholder="Search" />
                                <div class="input-group-append">
                                    <button class="btn btn-primary"><i class="fa fa-search"></i></button>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="col-md-12 comp-grid">
                        <div class="">
                            <!-- Page bread crumbs components-->
                            <?php
                            if(!empty($field_name) || !empty($_GET['search'])){
                            ?>
                            <hr class="sm d-block d-sm-none" />
                            <nav class="page-header-breadcrumbs mt-2" aria-label="breadcrumb">
                                <ul class="breadcrumb m-0 p-1">
                                    <?php
                                    if(!empty($field_name)){
                                    ?>
                                    <li class="breadcrumb-item">
                                        <a class="text-decoration-none" href="<?php print_link('mhs2'); ?>">
                                            <i class="fa fa-angle-left"></i>
                                        </a>
                                    </li>
                                    <li class="breadcrumb-item">
                                        <?php echo (get_value("tag") ? get_value("tag")  :  make_readable($field_name)); ?>
                                    </li>
                                    <li  class="breadcrumb-item active text-capitalize font-weight-bold">
                                        <?php echo (get_value("label") ? get_value("label")  :  make_readable(urldecode($field_value))); ?>
                                    </li>
                                    <?php 
                                    }   
                                    ?>
                                    <?php
                                    if(get_value("search")){
                                    ?>
                                    <li class="breadcrumb-item">
                                        <a class="text-decoration-none" href="<?php print_link('mhs2'); ?>">
                                            <i class="fa fa-angle-left"></i>
                                        </a>
                                    </li>
                                    <li class="breadcrumb-item text-capitalize">
                                        Search
                                    </li>
                                    <li  class="breadcrumb-item active text-capitalize font-weight-bold"><?php echo get_value("search"); ?></li>
                                    <?php
                                    }
                                    ?>
                                </ul>
                            </nav>
                            <!--End of Page bread crumbs components-->
                            <?php
                            }
                            ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php
        }
        ?>
        <div  class="">
            <div class="container-fluid">
                <div class="row ">
                    <div class="col-md-12 comp-grid">
                        <?php $this :: display_page_errors(); ?>
                        <div  class=" animated fadeIn page-content">
                            <div id="mhs2-list-records">
                                <div id="page-report-body" class="table-responsive">
                                    <table class="table  table-striped table-sm text-left">
                                        <thead class="table-header bg-light">
                                            <tr>
                                                <th class="td-checkbox">
                                                    <label class="custom-control custom-checkbox custom-control-inline">
                                                        <input class="toggle-check-all custom-control-input" type="checkbox" />
                                                        <span class="custom-control-label"></span>
                                                    </label>
                                                </th>
                                                <th class="td-sno">#</th>
                                                <th  class="td-id"> Id</th>
                                                <th  class="td-nopend"> Nopend</th>
                                                <th  class="td-npm"> Npm</th>
                                                <th  class="td-nama"> Nama</th>
                                                <th  class="td-jk"> Jk</th>
                                                <th  class="td-prodi"> Prodi</th>
                                                <th  class="td-rombel"> Rombel</th>
                                                <th  class="td-alamat"> Alamat</th>
                                                <th  class="td-rt"> Rt</th>
                                                <th  class="td-lurah"> Lurah</th>
                                                <th  class="td-camat"> Camat</th>
                                                <th  class="td-kota"> Kota</th>
                                                <th  class="td-kodepos"> Kodepos</th>
                                                <th  class="td-telp"> Telp</th>
                                                <th  class="td-hp"> Hp</th>
                                                <th  class="td-temp"> Temp</th>
                                                <th  class="td-tgl"> Tgl</th>
                                                <th  class="td-agama"> Agama</th>
                                                <th  class="td-wn"> Wn</th>
                                                <th  class="td-jjng"> Jjng</th>
                                                <th  class="td-nasek"> Nama Sekolah</th>
                                                <th  class="td-kotsek"> Kotsek</th>
                                                <th  class="td-jur"> Jurusan</th>
                                                <th  class="td-nis"> Nis</th>
                                                <th  class="td-noij"> No Ijazah</th>
                                                <th  class="td-tempij"> Tempat Ijazah</th>
                                                <th  class="td-tglij"> Tglij</th>
                                                <th  class="td-thnl"> Thnl</th>
                                                <th  class="td-ibu"> Ibu</th>
                                                <th  class="td-nik"> Nik</th>
                                                <th class="td-btn"></th>
                                            </tr>
                                        </thead>
                                        <?php
                                        if(!empty($records)){
                                        ?>
                                        <tbody class="page-data" id="page-data-<?php echo $page_element_id; ?>">
                                            <!--record-->
                                            <?php
                                            $counter = 0;
                                            foreach($records as $data){
                                            $rec_id = (!empty($data['id']) ? urlencode($data['id']) : null);
                                            $counter++;
                                            ?>
                                            <tr>
                                                <th class=" td-checkbox">
                                                    <label class="custom-control custom-checkbox custom-control-inline">
                                                        <input class="optioncheck custom-control-input" name="optioncheck[]" value="<?php echo $data['id'] ?>" type="checkbox" />
                                                            <span class="custom-control-label"></span>
                                                        </label>
                                                    </th>
                                                    <th class="td-sno"><?php echo $counter; ?></th>
                                                    <td class="td-id"><a href="<?php print_link("mhs2/view/$data[id]") ?>"><?php echo $data['id']; ?></a></td>
                                                    <td class="td-nopend">
                                                        <span  data-value="<?php echo $data['nopend']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="nopend" 
                                                            data-title="Enter No Pendaftaran" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['nopend']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-npm">
                                                        <span  data-value="<?php echo $data['npm']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="npm" 
                                                            data-title="Enter Npm" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['npm']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-nama">
                                                        <span  data-value="<?php echo $data['nama']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="nama" 
                                                            data-title="Enter Nama" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['nama']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-jk">
                                                        <span  data-source='<?php echo json_encode_quote(Menu :: $jk2); ?>' 
                                                            data-value="<?php echo $data['jk']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="jk" 
                                                            data-title="Select a value ..." 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="select" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['jk']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-prodi">
                                                        <span  data-value="<?php echo $data['prodi']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="prodi" 
                                                            data-title="Enter Prodi" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['prodi']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-rombel">
                                                        <span  data-value="<?php echo $data['rombel']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="rombel" 
                                                            data-title="Enter Rombel" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['rombel']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-alamat">
                                                        <span  data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="alamat" 
                                                            data-title="Enter Alamat" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="textarea" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['alamat']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-rt">
                                                        <span  data-value="<?php echo $data['rt']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="rt" 
                                                            data-title="Enter Rt" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['rt']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-lurah">
                                                        <span  data-value="<?php echo $data['lurah']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="lurah" 
                                                            data-title="Enter Lurah" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['lurah']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-camat">
                                                        <span  data-value="<?php echo $data['camat']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="camat" 
                                                            data-title="Enter Camat" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['camat']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-kota">
                                                        <span  data-value="<?php echo $data['kota']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="kota" 
                                                            data-title="Enter Kota" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['kota']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-kodepos">
                                                        <span  data-value="<?php echo $data['kodepos']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="kodepos" 
                                                            data-title="Enter Kodepos" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['kodepos']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-telp">
                                                        <span  data-value="<?php echo $data['telp']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="telp" 
                                                            data-title="Enter Telp" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['telp']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-hp">
                                                        <span  data-value="<?php echo $data['hp']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="hp" 
                                                            data-title="Enter Hp" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['hp']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-temp">
                                                        <span  data-value="<?php echo $data['temp']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="temp" 
                                                            data-title="Enter Tempat Lahir" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['temp']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-tgl">
                                                        <span  data-value="<?php echo $data['tgl']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="tgl" 
                                                            data-title="Tanggal-Februari-Tahun" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['tgl']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-agama">
                                                        <span  data-value="<?php echo $data['agama']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="agama" 
                                                            data-title="Enter Agama" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['agama']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-wn">
                                                        <span  data-source='<?php echo json_encode_quote(Menu :: $wn); ?>' 
                                                            data-value="<?php echo $data['wn']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="wn" 
                                                            data-title="Select a value ..." 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="select" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['wn']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-jjng">
                                                        <span  data-value="<?php echo $data['jjng']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="jjng" 
                                                            data-title="Enter Jenjang" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['jjng']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-nasek">
                                                        <span  data-value="<?php echo $data['nasek']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="nasek" 
                                                            data-title="Enter Nama Sekolah" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['nasek']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-kotsek">
                                                        <span  data-value="<?php echo $data['kotsek']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="kotsek" 
                                                            data-title="Enter Kota Sekolah" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['kotsek']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-jur">
                                                        <span  data-value="<?php echo $data['jur']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="jur" 
                                                            data-title="Enter Jurusan" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['jur']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-nis">
                                                        <span  data-value="<?php echo $data['nis']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="nis" 
                                                            data-title="Enter Nis" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['nis']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-noij">
                                                        <span  data-value="<?php echo $data['noij']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="noij" 
                                                            data-title="Enter No Ijazah" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['noij']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-tempij">
                                                        <span  data-value="<?php echo $data['tempij']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="tempij" 
                                                            data-title="Enter Tempat Ijazah" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['tempij']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-tglij">
                                                        <span  data-value="<?php echo $data['tglij']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="tglij" 
                                                            data-title="Tanggal-02-Tahun" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['tglij']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-thnl">
                                                        <span  data-value="<?php echo $data['thnl']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="thnl" 
                                                            data-title="Enter Thnl" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['thnl']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-ibu">
                                                        <span  data-value="<?php echo $data['ibu']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="ibu" 
                                                            data-title="Enter Ibu" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['ibu']; ?> 
                                                        </span>
                                                    </td>
                                                    <td class="td-nik">
                                                        <span  data-value="<?php echo $data['nik']; ?>" 
                                                            data-pk="<?php echo $data['id'] ?>" 
                                                            data-url="<?php print_link("mhs2/editfield/" . urlencode($data['id'])); ?>" 
                                                            data-name="nik" 
                                                            data-title="Enter Nik" 
                                                            data-placement="left" 
                                                            data-toggle="click" 
                                                            data-type="text" 
                                                            data-mode="popover" 
                                                            data-showbuttons="left" 
                                                            class="is-editable" >
                                                            <?php echo $data['nik']; ?> 
                                                        </span>
                                                    </td>
                                                    <th class="td-btn">
                                                        <a class="btn btn-sm btn-success has-tooltip" title="View Record" href="<?php print_link("mhs2/view/$rec_id"); ?>">
                                                            <i class="fa fa-eye"></i> View
                                                        </a>
                                                        <a class="btn btn-sm btn-info has-tooltip" title="Edit This Record" href="<?php print_link("mhs2/edit/$rec_id"); ?>">
                                                            <i class="fa fa-edit"></i> Edit
                                                        </a>
                                                        <a class="btn btn-sm btn-danger has-tooltip record-delete-btn" title="Delete this record" href="<?php print_link("mhs2/delete/$rec_id/?csrf_token=$csrf_token&redirect=$current_page"); ?>" data-prompt-msg="Are you sure you want to delete this record?" data-display-style="modal">
                                                            <i class="fa fa-times"></i>
                                                            Delete
                                                        </a>
                                                    </th>
                                                </tr>
                                                <?php 
                                                }
                                                ?>
                                                <!--endrecord-->
                                            </tbody>
                                            <tbody class="search-data" id="search-data-<?php echo $page_element_id; ?>"></tbody>
                                            <?php
                                            }
                                            ?>
                                        </table>
                                        <?php 
                                        if(empty($records)){
                                        ?>
                                        <h4 class="bg-light text-center border-top text-muted animated bounce  p-3">
                                            <i class="fa fa-ban"></i> No record found
                                        </h4>
                                        <?php
                                        }
                                        ?>
                                    </div>
                                    <?php
                                    if( $show_footer && !empty($records)){
                                    ?>
                                    <div class=" border-top mt-2">
                                        <div class="row justify-content-center">    
                                            <div class="col-md-auto justify-content-center">    
                                                <div class="p-3 d-flex justify-content-between">    
                                                    <button data-prompt-msg="Are you sure you want to delete these records?" data-display-style="modal" data-url="<?php print_link("mhs2/delete/{sel_ids}/?csrf_token=$csrf_token&redirect=$current_page"); ?>" class="btn btn-sm btn-danger btn-delete-selected d-none">
                                                        <i class="fa fa-times"></i> Delete Selected
                                                    </button>
                                                    <div class="dropup export-btn-holder mx-1">
                                                        <button class="btn btn-sm btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                                            <i class="fa fa-save"></i> Export
                                                        </button>
                                                        <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
                                                            <?php $export_print_link = $this->set_current_page_link(array('format' => 'print')); ?>
                                                            <a class="dropdown-item export-link-btn" data-format="print" href="<?php print_link($export_print_link); ?>" target="_blank">
                                                                <img src="<?php print_link('assets/images/print.png') ?>" class="mr-2" /> PRINT
                                                                </a>
                                                                <?php $export_pdf_link = $this->set_current_page_link(array('format' => 'pdf')); ?>
                                                                <a class="dropdown-item export-link-btn" data-format="pdf" href="<?php print_link($export_pdf_link); ?>" target="_blank">
                                                                    <img src="<?php print_link('assets/images/pdf.png') ?>" class="mr-2" /> PDF
                                                                    </a>
                                                                    <?php $export_word_link = $this->set_current_page_link(array('format' => 'word')); ?>
                                                                    <a class="dropdown-item export-link-btn" data-format="word" href="<?php print_link($export_word_link); ?>" target="_blank">
                                                                        <img src="<?php print_link('assets/images/doc.png') ?>" class="mr-2" /> WORD
                                                                        </a>
                                                                        <?php $export_csv_link = $this->set_current_page_link(array('format' => 'csv')); ?>
                                                                        <a class="dropdown-item export-link-btn" data-format="csv" href="<?php print_link($export_csv_link); ?>" target="_blank">
                                                                            <img src="<?php print_link('assets/images/csv.png') ?>" class="mr-2" /> CSV
                                                                            </a>
                                                                            <?php $export_excel_link = $this->set_current_page_link(array('format' => 'excel')); ?>
                                                                            <a class="dropdown-item export-link-btn" data-format="excel" href="<?php print_link($export_excel_link); ?>" target="_blank">
                                                                                <img src="<?php print_link('assets/images/xsl.png') ?>" class="mr-2" /> EXCEL
                                                                                </a>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col">   
                                                                    <?php
                                                                    if($show_pagination == true){
                                                                    $pager = new Pagination($total_records, $record_count);
                                                                    $pager->route = $this->route;
                                                                    $pager->show_page_count = true;
                                                                    $pager->show_record_count = true;
                                                                    $pager->show_page_limit =true;
                                                                    $pager->limit_count = $this->limit_count;
                                                                    $pager->show_page_number_list = true;
                                                                    $pager->pager_link_range=5;
                                                                    $pager->render();
                                                                    }
                                                                    ?>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <?php
                                                        }
                                                        ?>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </section>
