<div class="row">

    <div class="container">


        <ol class="breadcrumb">
            <li><a href="#">تصنيع </a></li>
            <li><a href="#">{if $simpleSettingData->taskOrderName == 1}طلبية{else}أمر شغل{/if}</a></li>
            <li class="active">عرض</li>
        </ol>

        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title"> عرض {if $simpleSettingData->taskOrderName == 1}طلبية{else}أمر شغل{/if}</h3>
                <a href="{$youtubes[283]->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 hidden-print" action="taskOrderController.php?do=show" method="post">
                    <label class="sr-only">تاريخ الإضافة </label>
                    <div class="form-group">
                        <label class="sr-only">من </label>
                        <input type="text" class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd" name="startDate" value="{$startDate}">
                    </div>
                    <div class="form-group">
                        <label class="sr-only">إلى </label>
                        <input type="text" class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd" name="endDate" value="{$endDate}">
                    </div>
                    <button type="submit" class="btn btn-primary">بحث</button>

                </form>


                <!-- Table -->


                <table class="table table-black dataTableClass">
                    <thead>
                        <tr>
                            <th > العنوان</th>
                            <th>تاريخ البداية</th>
                            <th>تاريخ التسليم</th>
                            <th> تعديل</th>
                            <th class="noprint" > ايقاف / تفعيل</th>
                            <th class="noprint">  حذف نهائى</th>
                        </tr>
                    </thead>
                    <tbody>

                        {foreach $rows as $r}
                        {if $r->conditions == 1}<tr class="danger">
                            {else if $r->conditions == 0}<tr>
                            {/if}
                            <td>{$r->title}</td>
                            <td>{$r->startdate}</td>
                            <td>{$r->enddate}</td>

                            <!--//edit-->
                            <td class="noprint"><a href="taskOrderController.php?do=edit&id={$r->id}" type="button" class="btn btn-default btn-lg editicon"></a></td>


                            <!--// stop/active -->
                            <td class="noprint"><a href="taskOrderController.php?do=stop&id={$r->id}" type="button" {if $r->conditions == 1} class="btn btn-default btn-lg correcticon"
                                    {else if $r->conditions == 0} class="btn btn-default btn-lg removeicon" {/if}></a>
                            </td>




                            <!--  //del-->
                            <td class="noprint"> <a  type="button" class="btn btn-default btn-lg deleteicon conformdel1" onclick="getValue({$r-> id});"></a></td>


                        </tr>
                        {/foreach}
                    </tbody>

                </table>



            </div> <!-- end of panel-body-->

        </div>  <!-- end of panel panel-default-->

    </div> <!-- end of container-->

</div>  <!-- end of row-->

{literal}
<script type="text/javascript">
    function getValue(idval)
    {
        var confirmDel = window.confirm("هل تريد حذف العنصر؟");
        //alert(confirmDel);

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

    }

</script>
{/literal}