
<script type="text/javascript" charset="utf-8">


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

</script>
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">تصنيع</a></li>
            <li><a href="branchRequestController.php?do=show">طلبات الفرع</a></li>
            <li class="active">عرض</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading" style="padding:5px 15px 15px">
                <h3 class="panel-title" style="display: inline-block;">عرض</h3>
                <a href="{$youtubes[47]->url}" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
                <a href="branchRequestController.php" class="hidden-print"><input type="button"  id="submit" style="margin-left: 12px" class="btn btn-primary pull-left " value="اضافة جديد"/></a>
            </div>
            <div class="panel-body">
                <div id="outputString" class="alert alert-block alert-success fade in" style="display:none">
                    <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">&times;</button>
                    <p id="outputStringValue">{$outputString}</p>
                    <div class="clearfix"></div>
                </div>
            </div>
            <hr/>

            <!-- Table -->
                <table class="display table-black" id="example">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>اسم الفرع</th>
                            <th>المستخدم</th>
                            <th>التاريخ</th>
                            <th>تفاصيل</th>
                            <th class="hidden-print">تعديل</th>
                            <th class="hidden-print">حذف </th>
                            {if $showTransferBtn==1}
                            <th class="hidden-print">تحويل </th>
                            {/if}
                        </tr>
                    </thead>
                    <tbody>

                        {foreach $showData as $data}
                        <tr>
                            <td>{$data@iteration}</td>
                            <td>{$data.branchName}</td>
                            <td>{$data.username}</td>
                            <td>{$data.sysdate}</td>
                            <td class="hidden-print"> <a href="branchRequestController.php?do=details&id={$data.id}" class="btn btn-default btn-lg infoicon"></a> </td>
                            <td class="hidden-print">
                                {if $data.istransfer != 1}
                                <a href="branchRequestController.php?do=edit&id={$data.id}" class="btn btn-default btn-lg editicon"></a> </td>
                                {/if}
                            <td class="hidden-print"><a href="branchRequestController.php?do=deleteFinaly&id={$data.id}" type="button" class="btn btn-default btn-lg deleteicon"></a></td>
                            {if $showTransferBtn==1}
                            <td class="hidden-print">
                                {if $data.istransfer==1} تم التحويل 
                                {else}
                                <a href="storemovementController.php?do=addStoreMovementWithBranchRequest&id={$data.id}" type="button" class="btn btn-success btn-lg correcticon"></a></td>
                                {/if} 
                            {/if}
                        </tr>
                        {/foreach}

                    </tbody>

                </table>
                <div class="clearfix"></div>
        </div>

    </div>
</div>
{literal}
<script type="text/javascript">
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {isRequired: false, invalidValue: "-1"});
</script>
{/literal}