<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content">
        <!-- BEGIN PAGE HEADER-->
        <h3 class="page-title">
            {$shcontrollname}
        </h3>
        <div class="page-bar">
            <ul class="page-breadcrumb">
                {$breadcrumbs}
            </ul>
        </div>
        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <div class="row">
            <div class="col-md-12">
                <div class="portlet light bg-inverse">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="icon-equalizer font-red-sunglo"></i>
                            <span class="caption-subject font-red-sunglo bold uppercase">عرض فى {$shcontrollname}</span>
                        </div>

                        <div class="actions" id="nestable_list_menu">
                            <a class="btn default btn-xs red tooltips disabled deleteAppSelected" data-link="{$controllname}" data-container="body" data-placement="top" data-original-title="حذف" id="deleteBtn" >
                                <i class="fa fa-trash"></i>
                                حذف
                            </a>
                        </div>

                    </div>
                    <div class="portlet-body form">
                        <form id='showForm' method='post' action="{$hosturl}/{$controllname}/del">
                            <table class="table table-hover" id="custom_tbl_dt">
                                <thead>
                                    <tr>
                                        <th style="width:8px;"><input type="checkbox" name="checkAll" id="checkAll" /></th>
                                        <th>
                                            #
                                        </th>
                                        <th>
                                            الاسم
                                        </th>
                                        <th>
                                            البريد الالكترونى
                                        </th>
                                        <th class="hidden">المحتوى</th>
                                        <!--                                        <th>
                                                                                     الهاتف
                                                                                </th>-->

                                        <th>
                                            تاريخ
                                        </th>
                                        <th width="5%"></th>
                                        <th width="5%"></th>
                                        <th width="5%"></th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {assign var=i value=1}
                                    {foreach $contactmessage as $single}
                                    <tr {if $single->read eq 0}style="background-color: #f3b5b5;"{/if}>
                                        <td>
                                            <input type="checkbox" class="checkItem" id="title" name="title" value="{$single->id}" data-extra="{$single->title}" />
                                        </td>
                                        <td>
                                            {$i}
                                        </td>
                                        <td>
                                            {$single.name}
                                        </td>
                                        <td>
                                            {$single.email}
                                        </td>

                                        <td class="hidden">{$single.msg}</td>
                                        <!--                                        <td>
                                                                                     {$single.phone}
                                                                                </td>-->
                                        <td>
                                            {$single.mdate}
                                        </td>
                                        <td>
                                            <a class="btn green-haze btn-xs senditmsg no-print" data-toggle="modal" href="#sendmsg" data-bind-email="{$single.email}"><i class="fa fa-send"></i>  الرد</a>
                                        </td>
                                        <td>
                                            <a href="{$hosturl}/{$controllname}/details/{$single.id}" class="btn blue-hoki btn-xs no-print"><i class="fa fa-pencil"></i> بيانات الرساله</a>
                                        </td>
                                        <td>
                                            <a class="btn grey-cascade btn-xs deletemsg no-print" data-id="{$single.id}" data-link="{$controllname}"><i class="fa fa-times"></i> حذف</a>
                                        </td>
                                    </tr>
                                    {capture assign=i}{$i+1}{/capture}
                                    {/foreach}
                                </tbody>
                            </table>
                        </form>

                    </div>
                </div>
            </div>
        </div>
        <!-- END PAGE CONTENT-->
    </div>
</div>
<!-- END CONTENT -->

<!-- responsive -->
<div id="sendmsg" class="modal fade" tabindex="-1" style="width: 75%;left: 25%;">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
        <h4 class="modal-title">ارسال رساله</h4>
    </div>
    <div class="modal-body">
        <div class="row">
            <div class="col-md-6">
                <h4>المرسل اليه</h4>
                <p>
                    <input class="form-control" type="text" name="sendtoit" readonly=""> </p>

            </div>
            <div class="col-md-6">
                <h4>عنوان الرساله</h4>
                <p>
                    <input class="form-control" type="text" name="subjectit" minlength="3" maxlength="30"> </p>

            </div>
            <div class="col-md-12">
                <h4>محتوى الرساله</h4>
                <p>
                    <textarea class="form-control ckeditor" rows="5" name="msgit" minlength="10" maxlength="100"></textarea> </p>

            </div>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" data-dismiss="modal" class="btn btn-outline dark closemodal">اغلاق</button>
        <button type="button" class="btn green send_action" id="send_action">ارسال الرساله</button>
    </div>
</div>