
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">خصائص عامة</a></li>
            <li><a href="#">مراكز التكلفه </a></li>
            <li class="active">عرض مراكز التكلفه</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading">عرض مراكز التكلفه</div>
            <div class="panel-body">

                <!---------- start outputString alert ----------->
                <div id="outputString" class="alert alert-block alert-success fade in hidden-print" 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>
                <!---------  end outputString alert ------------>

                {literal}
                <form id="form1" name="form1" method="post" action="costcenterController.php?do=executeOperation" onsubmit="if (Spry.Widget.Form.validate(this)) {
                    return countChoosenProducts('costcenterController');
                } else {
                    return false;
                }
                " enctype="multipart/form-data">
                    {/literal}
                    <!-- Table -->
                    <table class="table table-black">
                        <thead>
                            <tr>
                                <th class="hidden-print">
                                    <label>
                                        <input type="checkbox" name="checkAll" id="checkAll"/>
                                    </label>
                                </th>
                                <th>اسم مراكز التكلفه</th>
                                <th  class="hidden-print">تعديل</th>
                                <th class="hidden-print">حذف</th>
                            </tr>
                        </thead>
                        <tbody>

                            {foreach $name as $na}

                            {if {$na->condation} eq 1}
                            <tr class="danger"> {elseif {$na->condation} eq 0}

                            <tr> {/if}
                                <td class="hidden-print">
                                    <label>
                                        <input type="checkbox" name="choosedItem[]" id="checked{$i}" class="choosenItem" value="{$na->id}" />
                                    </label>
                                </td>
                                <td>{$na->name}</td>
                                <td class="hidden-print"><a href="costcenterController.php?do=edit&id={$na->id}"  type="button" class="btn btn-default btn-lg editicon"></a></td>
                                <td class="hidden-print"> {if {$na->condation} eq 0} <a href="costcenterController.php?do=delete&id={$na->id}" type="button" class="btn btn-default btn-lg removeicon"></a>
                                    {else}
                                    <a href="costcenterController.php?do=ruturndelete&id={$na->id}" type="button" class="btn btn-default btn-lg correcticon"></a> {/if} </td>
                            </tr>
                            {/foreach}

                        </tbody>

                    </table>
                    <div class="clearfix"></div>
                    <hr />
                    <div  class="hidden-print">
                        <div class="col-lg-12">
                            <div class="well well-sm">
                                <div class="form-group">
                                    <div class="col-lg-4">
                                        <label for="operation"></label>
                                        <span id="spryselect2">
                                            <select name="operation" id="operation"  data-placeholder="اختر العملية"  class="select2 wdt100">
                                                <option value="-1"></option>
                                                <option value="1">حذف مؤقت</option>
                                                <option value="2">إلغاء الحذف</option>
                                            </select>
                                            <span class="selectInvalidMsg">اختر العملية</span></span></div>
                                </div>
                                <div class="form-group">
                                    <div class="col-lg-4">
                                        <input name=""  class="hidden-print btn btn-primary" type="submit" value="تنفيذ"/>
                                    </div>
                                </div>
                                </form>
                                <!-----------  start noElementsError alert ------------->
                                <div class="clearfix"></div>
                                <div id="noElementsError" class="alert alert-danger fade in hidden-print" style="display:none;">
                                    <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">×</button>
                                    <p>يجب اختيار العناصر أولاً</p>
                                    <div class="clearfix"></div>
                                </div>
                                <!----------  end noElementsError alert -------------->

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

                    <div class="clearfix"></div>
                    <div  class="hidden-print">
                        <div class="col-lg-12">
                            <div class="form-group">
                                <div class="col-lg-4">
                                    <button type="button" onclick="print_Custom('mycustomheader');" class="btn btn-success pull-right">طباعة</button>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
            </div>
        </div>
    </div>
</div>
{literal}
<script type="text/javascript">
    var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", {invalidValue: "-1", isRequired: false});
</script>
{/literal}