<table class="table table-hover portlet light bg-inverse" id="repTable">
    <thead>
        <tr>
             <th  width="5%">No.</th>
            <th width="15%">
                                                Patient Name
                                            </th>
                                            <th width="15%">
                                                tel
                                            </th>
                                            <th width="5%">w</th>
                                            <th width="15%">edd</th>
                                            <th width="15%">Risk</th>
        </tr>
    </thead>
     <tbody>
                                        {assign var="i" value="1"}
                                        {foreach $allData as $data}
                                        <tr class="odd gradeX">
                                            <td >{$i}</td>
                                            <td>
                                                <a href="{$hosturl}/controllers/patienthistory.php?ac=show&patientid={$data->patientid}" target="_new">{$data->info->wifename}</a>
                                            </td>
                                            <td>
                                               {$data->info->mobile} - {$data->info->phone}
                                            </td>
                                            <td>
                                                {$data->week}
                                            </td>
                                            <td>
                                                {$data->sheetedd}
                                            </td>
                                            <td>
                                                {$data->info->risk}
                                            </td>
                                        </tr>
                                        {assign var="i" value={$i+1}}
                                        {/foreach}
                                    </tbody>
</table>

<div id="long" class="modal fade modal-scroll" tabindex="-1" data-replace="true">
    <div class="modal-dialog wds75">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close hidden-print" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title"></h4>
            </div>
            <div class="modal-body printtable" id="printd">
                <center><h4 class="modal-title">edd Date</h4></center>
                <table class="table table-hover portlet light bg-inverse" >
                    <thead>
                        <tr>
                             <th  width="5%">No.</th>
                            <th width="15%">
                                                Patient Name
                                            </th>
                                            <th width="15%">
                                                tel
                                            </th>
                                            <th width="5%">w</th>
                                            <th width="15%">edd</th>
                                            <th width="15%">Risk</th>
                        </tr>
                    </thead>
                    <tbody>
                                        {assign var="i" value="1"}
                                        {foreach $allData as $data}
                                        <tr class="odd gradeX">
                                            <td >{$i}</td>
                                            <td>
                                                <a href="{$hosturl}/controllers/patienthistory.php?ac=show&patientid={$data->patientid}" target="_new">{$data->info->wifename}</a>
                                            </td>
                                            <td>
                                               {$data->info->mobile} - {$data->info->phone}
                                            </td>
                                            <td>
                                                {$data->week}
                                            </td>
                                            <td>
                                                {$data->sheetedd}
                                            </td>
                                            <td>
                                                {$data->info->risk}
                                            </td>
                                        </tr>
                                        {assign var="i" value={$i+1}}
                                        {/foreach}
                                    </tbody>
                </table>
            </div>
            <div class="modal-footer">
                <button type="button" data-dismiss="modal" class="btn hidden-print">Close</button>
                <button type="button" id="print1" class="btn red hidden-print">print</button>
            </div>
        </div>
    </div>
</div>


{literal}
<script type="text/javascript" >
    $('#repTable').dataTable({
        // Internationalisation. For more info refer to http://datatables.net/manual/i18n

        // Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
        // setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js).
        // So when dropdowns used the scrollable div should be removed.
        //"dom": "<'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r>t<'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>",

        //"bStateSave": true, // save datatable state(pagination, sort, etc) in cookie.

        "lengthMenu": [
            [15, 20, -1],
            [15, 20, "All"] // change per page values here
        ],
        // set the initial value
        "pageLength": 15,
        "language": {
            "lengthMenu": " _MENU_",
            "aria": {
                "sortAscending": ": Used to order Ascending",
                "sortDescending": ": Used to order Descending"
            },
            "emptyTable": "NO data",
            "info": "Show _START_ From _END_ To _TOTAL_ item",
            "infoFiltered": "(Filter is _MAX_ from total)",
            "lengthMenu": "_MENU_",
            "search": "",
            "zeroRecords": "No search data"
        },
        "columnDefs": [{// set default column settings
            'orderable': true,
            'targets': [0]
        }],
        "order": [
            [4, "asc"]
        ] // set first column as a default sort by asc
    });
</script>
{/literal}
