


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

        <ol class="breadcrumb">
            <li><a href="#">مراكز الانتاج</a></li>
            <li class="active">عرض المركز</li>
        </ol>



        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading">عرض المركز
                <a href="{$youtubes[182]->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">


                <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>

            <!-- Table -->

            <form method="post" action="workstationController.php?do=show" onsubmit="">

                <table class="table table-m">
                    <thead>
                        <tr>
                            <th class="noprint"><input type="checkbox" name="checkAll" id="checkAll"/></th>
                            <th>اسم المركز</th>
                            <th>عدد العمال</th>
                            <th>عدد الالات</th>
                            <th class="noprint">تعديل</th>
                            <th class="noprint">ايقاف</th>
                            <th class="noprint">حذف</th>
                        </tr>
                    </thead>
                    <tbody>

                        {foreach $allstation as $station}
                        {if $station->conditions == 1}<tr class="danger">
                            {else if $station->conditions == 0}<tr>
                            {/if}

                            <td class="noprint">
                                <input type="checkbox" name="choosedItem[]" id="checked{$i}" class="choosenItem" value="" />
                            </td>
                            <td>{$station->workname}</td>
                            <td>{$station->countworker}</td>
                            <td>{$station->countasset}</td>


                            <td class="noprint">
                                <a href="workstationController.php?do=edit&workstationid={$station->workstationid}" type="button" class="btn btn-default btn-lg editicon"></a>
                            </td>


                            <td class="noprint">

                                {if {$station->conditions} eq 1}
                                <a href="workstationController.php?do=returndelete&workstationid={$station->workstationid}&conditions={$station->conditions}" type="button" class="btn btn-default btn-lg correcticon"></a>

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

                                <a href="workstationController.php?do=deletetemp&workstationid={$station->workstationid}&conditions={$station->conditions}" type="button" class="btn btn-default btn-lg removeicon"></a>

                                {/if}

                            </td>



                            <td class="noprint">
                                <a href="workstationController.php?do=delete&workstationid={$station->workstationid}" name="dd" type="button" class="btn btn-default btn-lg deleteicon conformdel1" data-position=""  onClick="if (confirm(' متأكد انك تريد الحذف ؟') == false)
                                            return false;"></a>

                            </td>

                        </tr>

                        {/foreach}

                    </tbody>
                </table>





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

            </form>

        </div>
    </div>

</div>
{literal}
<script>
    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!";
        }
    }
</script>
{/literal}