<style>
    .sucess-span {
        font-size: 12px;
        color: white;
        background-color: #73a973;
        padding: 5px;
        display: none;
    }
    .error-span {
        font-size: 12px;
        color: white;
        background-color: #c74c4c;
        padding: 5px;
        display: none;
    }
</style>
<div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#">الروابط</a></li>
            <li><a href="menuurController.php?do=">عرض الروابط</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[0]->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="menuurController.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-heading">عرض الروابط</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 class="table table-black">
                <thead>
                    <tr>

                        <th>الاسم</th>
                        <th>اللينك</th>
                        <th>مجموعات المستخدمين</th>
                        <th>الترتيب</th>

                        <th>الصوره</th>
                        <th>تعديل</th>
                        <th>حذف</th>

                    </tr>
                </thead>
                <tbody>



                    {assign var=i value=1}
                    {foreach $alldata as $myalldata}


                    <tr>



                        <td>{$myalldata->urltitle}</td>
                        <td>{$myalldata->menuurl}</td>
                        <td>
                            <select multiple name="usergroupname{$i}[]" id="usergroupname{$i}" data-id="{$myalldata->menuurlid}" class="select2 wdt100 saveMenuGroups" placeholder="اختر مجموعه مستخدمين">
                                {foreach $alloldusergroup as $myalloldusergroup}

                                <option selected="selected" value="{$myalloldusergroup->usergroupid}">{$myalloldusergroup->usergroupname}</option>
                                {/foreach}
                                {foreach $allusergroup as $myallusergroup}
                                <option value="{$myallusergroup->usergroupid}" {if $myallusergroup->usergroupid|in_array:$myalldata->usergroupid} selected="selected" {/if}>{$myallusergroup->usergroupname}</option>
                                {/foreach}
                            </select>
                            <span class="sucess-span" id="sucess{$myalldata->menuurlid}">تم الحفظ</span>
                            <span class="error-span" id="error{$myalldata->menuurlid}">حدث خطأ</span>
                        </td>
                        <td><input type="text" name="order_{$i}" id="order_{$i}" data-id="{$myalldata->menuurlid}" class="orderRows" value="{$myalldata->orderno}"/></td>


                        <td>
                            <img src="../views/default/images/upload/images150_150/{$myalldata->urlimage}"  width="32" height="32"/>
                        </td>



                        <td class="noprint">
                            <a href="menuurController.php?do=edit&id={$myalldata->menuurlid}" class="btn btn-default btn-lg editicon"></a>
                        </td>
                        <td>

                            <a href="menuurController.php?do=delete&id={$myalldata->menuurlid}" name="dd" type="button" class="btn btn-default btn-lg deleteicon conformdel1" data-position="menuurController.php?do=delete&id={$myalldata->menuurlid}" ></a>


                        </td>



                    </tr>
                    {assign var=i value=$i+1}
                    {/foreach}


                </tbody>
            </table>





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




            <div  class="noprint">
                <div class="col-lg-12">


                    <div class="form-group">
                        <div class="col-lg-4">

                        </div>
                    </div>

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






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


        </div>



    </div>

</div>


<!-- Modal -->
<div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close pull-left" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">تأكيد حذف اللينك</h4>
            </div>
            <div class="modal-body">
                هل تريد حذف هذه اللينك؟
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">لا</button>
                <button type="button" class="btn btn-primary savemodel1">نعم</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->


