<div class="row">
    <div class="container">

        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading">
                <h3 class="panel-title"> عرض العمليات</h3>
                <a href="{$youtubes[183]->url}" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>

            </div>
            <div class="panel-body">



                <form class="form-inline " method="post" action="?do=show">

                    <table  class="table billtable table-bordered table-black">
                        <thead>
                            <tr >
                                <th > اسم العمليه </th>
                                <th > مركز الانتاج</th>
                                <th> عدد العمال</th>
                                <th> الاصول</th>
                                <th> الوقت</th>

                                <th class="hidden-print">تعديل</th>
                                <th class="hidden-print">ايقاف</th>
                                <th  class="hidden-print">حذف </th>

                            </tr>
                        </thead>
                        <tbody>
                            <tr>

                                {foreach $all as $operation}

                                {if $operation->conditions == 1}<tr class="danger">
                                {else if $operation->conditions == 0}<tr>
                                {/if}

                                <td>{$operation->settingOperationName}</td>
                                <td>{if $operation->workname != ""}{$operation->workname}{else} - {/if}</td>

                                <td>{$operation->workersNo}</td>

                                <td>{if $operation->assetsName != ""}{$operation->assetsName}{else} - {/if}</td>

                                <td>{$operation->realTime}</td>

                                <!-- edit-->
                                <td  class="hidden-print"><a href="?do=edit&id={$operation->settingOperationID}" type="button"   class="btn btn-default btn-lg editicon"></a></td>

                                <!--stop-->
                                <td  class="hidden-print">
                                    {if {$operation->conditions} eq 1}
                                    <a href="?do=stop&id={$operation->settingOperationID}" type="button" class="btn btn-default btn-lg correcticon"></a>

                                    {elseif {$operation->conditions} eq 0}

                                    <a href="?do=stop&id={$operation->settingOperationID}" type="button" class="btn btn-default btn-lg removeicon"></a>

                                    {/if}
                                </td>

                                <!--del -->
                                <td  class="hidden-print">
                                    <a  href="?do=delete&id={$operation->settingOperationID}" onclick="getValue({$operation->settingOperationID})" type="button" class="btn btn-default btn-lg deleteicon conformdel1"></a>
                                </td>




                            </tr>
                            {/foreach}

                            </tr>

                    </table>

                </form>
            </div></div>
        {literal}
        <script type="text/javascript">
            function getValue(idval)
            {
                var confirmDel = window.confirm("هل تريد حذف العنصر؟");
                jQuery.fallr('show', {
                    buttons: {
                        button1: {text: 'نعم', danger: true, onclick: clicked},
                        button2: {text: 'لا'}
                    },
                    content: confirmDel,
                    icon: 'error'
                });
                alert(confirmDel);

                if (confirmDel == true)
                {
                    // x="You pressed OK!";
                    window.location.href = "?do=delete&id=" + idval;
                }
                else
                {
                    // x="You pressed Cancel!";
                }
                /*var clicked = function(){

                 var itemid = idval;

                 window.location.href ="?do=delete&id="+itemid;
                 jQuery.fallr('hide');
                 };
                 jQuery.fallr('show', {
                 buttons : {
                 button1 : {text: 'نعم', danger:true, onclick: clicked},
                 button2 : {text: 'لا'}
                 },
                 content : '<p>هل تريد حذف العنصر؟</p>',
                 icon    : 'error'
                 });

                 return false;*/
            }

        </script>
        {/literal}