
<div class="page-content-wrapper">
    <div class="page-content all">
        <div class="row">
            <div class="col-md-12">
                <div class="portlet box blue">
                    <div class="portlet-title" style="height: 5px">
                        <div class="caption">
                            <i class="fa fa-edit"></i> Complaints
                        </div>
                        <div class="actions">
                            <a href="{$hosturl}/controllers/{$controllname}.php?ac=complaint" class="btn btn-default btn-sm">
                                <i class="fa fa-plus"></i> Add </a>
                        </div>

                    </div>
                    <div class="portlet-body" >
                        <div class="table-toolbar">

                        </div>  
                        <div class="row">
                            <div class="col-md-12">
                                <table class="table table-striped table-bordered table-hover dataTable" style="direction: rtl;">
                                    <thead>
                                        <tr>
                                            <th class="wds3 txtc">م</th>
                                            <th class="wds10 txtc"> التاريخ </th>
                                            <th class="txtc">اسم المريضة</th>
                                            <th class="txtc wds5"> </th>
                                            <th class="wds5 txtc">رقم الحالة</th>
                                            <th class="txtc"> اسم الزوج </th>
                                            <th class="txtc"> اسم المستخدم</th>
                                            <th class="wds3 txtc">Details</th>
                                            {if $btnEdit == 1 }
                                            <th class="wds3 txtc">Edit</th>
                                            {/if}
                                            {if $btnDelete == 1 }
                                            <th class="wds3 txtc">Delete</th>
                                            {/if}
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {assign var=i value=1}
                                        {foreach $complaints as $data}
                                        <tr>
                                            <td> {$i}</td>
                                            <td> {$data.call_date_time}</td>
                                            <td> {$data.patientName}</td>
                                            <td>
                                                <a href="{$hosturl}/controllers/{$controllname}.php?ac=complaint_details_all&id={$data.id}" 
                                                   class="btn blue-soft btn-block btn-xs" style="margin-right: 0px;"><i class="fa fa-question-circle"></i> </a>
                                            </td>
                                            <td> {$data.statusno}</td>
                                            <td> {$data.husbandName}</td>
                                            <td> {$data.userName}</td>
                                            <td>
                                                <a href="{$hosturl}/controllers/{$controllname}.php?ac=complaint_details&id={$data.id}" 
                                                   class="btn blue-soft btn-block btn-xs" style="margin-right: 0px;"><i class="fa fa-eye"></i> </a>
                                            </td>
                                            {if $btnEdit == 1 }
                                            <td>
                                                <a href="{$hosturl}/controllers/{$controllname}.php?ac=complaint_edit&id={$data.id}" 
                                                   class="btn green btn-block btn-xs"><i class="fa fa-pencil"></i> </a>
                                            </td>
                                            {/if}
                                            {if $btnDelete == 1 }
                                            <td>
                                                <a class="btn grey-cascade btn-xs deletemsgEX" data-id="{$data.id}" 
                                                   data-link="{$controllname}"  data-fn="complaint_delete"><i class="fa fa-times"></i> </a>
                                            </td>
                                            {/if}
                                        </tr>
                                        {capture assign=i}{$i+1}{/capture}
                                        {/foreach}
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>

<input type="hidden" id="controllName" value="customer_service"/>
