{if  isset($operations_main) and $operations_main|@count > 0}
<div class="row">
    <div class="col-md-12">
        <div class="portlet light ">
            <div class="portlet-title">
                <div class="caption">
                    <i class="icon-edit font-dark"></i>
                    <span class="caption-subject font-dark bold uppercase">غرف العمليات والحجز</span>
                </div>
            </div>
            <div class="search-container ">
                <ul>
                    {foreach $operations_main as $item}
                    <li class="search-item clearfix col-md-4">
                        <div class="search-content">
                            <h4 class="search-title"><a href="javascript:;">غرفه العمليات: {$item->operations_room_name}</a></h4>
                            <h4 class="search-title"><a href="javascript:;">غرفه الاقامه: {$item->residence_room_name}</a></h4>
                            <div class="search-desc">
                                <div class="">
                                    <h4>وقت العمليه:
                                        <!--                                                    {assign var=hours value=","|explode:$item->operation_hours}-->
                                        <!--                                                    {foreach $hours as $single}-->
                                        <!--                                                    <span class="badge badge-success" style="font-size: 18px !important;padding: 5px 6px;height: 25px;">{$single}</span>-->
                                        <!--                                                    {/foreach}</h4>-->
                                        <span class="badge badge-success" style="font-size: 18px !important;padding: 5px 6px;height: 25px;">{$item->operation_hours_text}</span>

                                        <h4>وقت الاقامه:
                                            <span class="badge badge-success" style="font-size: 18px !important;padding: 5px 6px;height: 25px;">{$item->residence_hours_text}</span>
                                        </h4>
                                        <h4>نوع العمليه:
                                            <span class="badge badge-success" style="font-size: 18px !important;padding: 5px 6px;height: 25px;">{$item->operation_type}</span></h4>
                                        <h4>اسم الطبيب:
                                            <span class="badge badge-success" style="font-size: 18px !important;padding: 5px 6px;height: 25px;">{$item->doctor_name}</span></h4>
                                </div>

                            </div>
                        </div>
                    </li>
                    {/foreach}

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

    </div>
</div>

<hr/>
{/if}
{if  isset($searched_operations_rooms) and $searched_operations_rooms|@count > 0}
<div class="row">
    <div class="col-md-12">
        <div class="portlet light ">
            <div class="portlet-title">
                <div class="caption">
                    <i class="icon-edit font-dark"></i>
                    <span class="caption-subject font-dark bold uppercase">غرف العمليات</span>
                </div>
            </div>
            <div class="search-container ">
                <ul>
                    {foreach $searched_operations_rooms as $room}
                    <li class="search-item clearfix">
                        <div class="search-content">
                            <h2 class="search-title">
                                <a href="javascript:;">{$room->name}</a>
                            </h2>
                            <div class="search-desc">
                                <ul class="list-inline" >
                                    {foreach $room->times as $time}
                                    <li >
                                        {if $time.status== 3}
                                        <div class="alert alert-default"  style="background-color: #cbcdce;border-color: #d0d9da;color: #f6feff;"> {$time.hour_text} - غير مفعل</div>
                                        {elseif $time.status== 0}
                                        <div class="alert alert-success" > {$time.hour_text}  - غير محجوز </div>
                                        {elseif $time.status== 1}
                                        <div class="alert alert-danger" > {$time.hour_text}  - {$time.saved_id} </div>
                                        {/if}
                                    </li>

                                    {/foreach}
                                </ul>

                            </div>
                        </div>
                    </li>
                    {/foreach}

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

    </div>
</div>
<hr/>
{/if}
{if  isset($searched_residence_rooms) and $searched_residence_rooms|@count > 0}
<div class="row">
    <div class="col-md-12">
        <div class="portlet light ">
            <div class="portlet-title">
                <div class="caption">
                    <i class="icon-edit font-dark"></i>
                    <span class="caption-subject font-dark bold uppercase">غرف الاقامه</span>
                </div>
            </div>
            <div class="search-container ">
                <ul>
                    {foreach $searched_residence_rooms as $room}
                    <li class="search-item clearfix">
                        <div class="search-content">
                            <h2 class="search-title">
                                <a href="javascript:;">{$room->name}</a>
                            </h2>
                            <div class="search-desc">
                                <ul class="list-inline" >
                                    {foreach $room->times as $time}
                                    <li >
                                        {if $time.status== 3}
                                        <div class="alert alert-default"  style="background-color: #cbcdce;border-color: #d0d9da;color: #f6feff;"> {$time.hour_text} - غير مفعل</div>
                                        {elseif $time.status== 0}
                                        <div class="alert alert-success" > {$time.hour_text}  - غير محجوز </div>
                                        {elseif $time.status== 1}
                                        <div class="alert alert-danger" > {$time.hour_text}  - {$time.saved_id} </div>
                                        {/if}
                                    </li>
                                    {/foreach}
                                </ul>

                            </div>
                        </div>
                    </li>
                    {/foreach}

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

    </div>
</div>
<hr/>
{/if}