

                     <div class="tabbable tabbable-custom tabbable-noborder">
                        <ul class="nav nav-tabs"  style="float: right;">
                           {assign var=i value=1}
                           {foreach $allBranches as $branch }
                           <li class="fright aw_3d_list  {if $i == 1 }active {/if}"> 
                              <a href="#tabBranch_{$branch->id}" data-toggle="tab"> {$branch->name}  </a> 
                           </li>
                           {capture assign=i}{$i+1}{/capture}
                           {/foreach}
                        </ul>
                     </div>

                     <div class="tab-content">
                        {assign var=i value=1}
                        {foreach $allBranches as $branch }
                        <div class="tab-pane {if $i == 1 }active {/if}" id="tabBranch_{$branch->id}">
                           <table class="table table-bordered  table-hover rtl">
                              <caption class="txtc bold" style="background-color: #666;color: white; font-size: 19px;">  {$doctorName}</caption>
                              <thead>
                                 <tr>
                                    <th class="wds25">اليوم  </th>
                                    <th> الحد الأقصى لعدد الزيارات الأونلاين </th>
                                 </tr>
                              </thead>
                              <tbody>
                                 {foreach $branch->days as $day }
                                 <tr>
                                    <th>{$day.dayName}</th>
                                    <td>
                                       <input type="text" class="form-control updateLimit" data-dayNo="{$day.dayNo}"  
                                              data-branchId="{$branch->id}"   data-doctorId="{$doctorId}"    value="{$day.max_visits}"  />
                                    </td>
                              </tr>
                              {/foreach}
                              </tbody>
                           </table>


                           <hr style="border: 1px solid black;     margin: 5px 0; ">


                           <table class="table table-bordered  table-hover rtl">
                              <caption class="txtc bold" style="background-color: #666;color: white; font-size: 19px;">  
                                 أيام الأجازات القادمة ل {$doctorName} - فرع {$branch->name}
                                 <a  class="btn btn-default btn-sm  vacationAdd" data-branchId="{$branch->id}"   data-doctorId="{$doctorId}" 
                                     data-container="vacationsTb_{$branch->id}_{$doctorId}"> 
                                    <i class="fa fa-plus"></i> إضافة  </a>
                              </caption>
                              <thead>
                                 <tr>
                                    <th class="wds5">م   </th>
                                    <th> التاريخ </th>
                                    <th class="wds5">  </th>
                                 </tr>
                              </thead>
                              <tbody id="vacationsTb_{$branch->id}_{$doctorId}">
                                 {assign var=i value=1}
                                 {foreach $branch->drVacations as $vacation }
                                 <tr>
                                    <th>{$i}</th>
                                    <td>
                                       <input type="text" class="form-control datepicker  updateElement" data-id="{$vacation->id}"   readonly
                                              data-tableName="visits_vacation"   data-colName="day_date"    value="{$vacation->day_date}"  />
                                    </td>
                                    <td>
                                       <a class="btn grey-cascade btn-xs deletemsgEX" data-id="{$vacation->id}"  
                                          data-tableName="visits_vacation"   data-link="{$controllname}"  data-fn="delItem">
                                          <i class="fa fa-times"></i>Delete </a>
                                    </td>
                                 </tr>
                                 {capture assign=i}{$i+1}{/capture}
                                 {/foreach}
                              </tbody>
                           </table>





                        </div>
                        {capture assign=i}{$i+1}{/capture}
                        {/foreach}
                     </div>



{literal}
<script>
    $(".datepicker").datepicker();
</script>
{/literal}