<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#"> محضر استلام الموقع </a></li>
            <li><a href="sitereceipt.php?do=report">تقرير</a></li>
            <li class="active">عرض</li>
        </ol>
        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title">عرض</h3>
            </div>
            <div class="panel-body"> 
               <form class="form-inline hidden-print" action="sitereceipt.php?do=report" method="post">
<table class="table table-bordered" style="margin-top:20px;" id="example">
    <thead>
        <tr class="bg-primary">
            <th>رقم المحضر</th>
            <th class="hidden-print">اسم العملية</th>
            <th class="hidden-print">الجهة</th>
            <th class="hidden-print">اسم المستخدم </th>
            <th class="hidden-print">تاريخ الاضافة/التعديل </th>
            <th>تفاصيل</th>
        </tr>
    </thead>
    <tbody>
        {foreach $showData as $data}
        <tr>
            <td>{$data.sr_id}</td>
            <td>{$data.tender_name}</td>
            <td>{$data.the_issuing_entity}</td>
            <td>{$data.employeename}</td>
            <td>{$data.sys_date}</td>
            <td><a href="sitereceipt.php?do=view&id={$data.sr_id}" class="btn btn-xs btn-info">تفاصيل</a></td>
        </tr>
        {/foreach}
    </tbody>
</table>

{literal}
<script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
    $('#spbutton').live('click', function (e) {
        if (!$('#spbutton').hasClass("processing")) {
            $('#spbutton').addClass("processing");
            var myForm = document.getElementById("spform");
            var SS = Spry.Widget.Form.validate(myForm);
            if (SS == true) {
                myForm.submit();
            } else {
                $('#spbutton').removeClass("processing");
            }
        }
    });
$(document).ready(function() {
    $('#nature').on('change', function() {
        if ($(this).val() === 'other') {
            $('#other_input_container').show();
        } else {
            $('#other_input_container').hide(); 
            $('#other_nature').val(''); 
        }
    });
});
$(document).ready(function(){
    $('#name').on('change', function() {
        let sideValue = $(this).find(':selected').data('side');
        if (sideValue) {
                $('#side').val(sideValue);
            } else {
                $('#side').val(''); 
            }
        });
});



    $(document).ready(function () {
        $('#example').dataTable({
            "aaSorting": [[ 0, "desc" ]],
            "scrollX":true,
            "bPaginate": false,
            "bStateSave": false,
            "sDom": 'TCR<"clear">lfrtip',
            "oTableTools": {
                "aButtons": [
                    "copy",
                    "print",
                    {
                        "sExtends": "collection",
                        "sButtonText": "حفظ",
                        "aButtons": ["csv", "xls"]
                    }
                ]
            }
        });
    });


</script>
{/literal}