{assign var=i value=1}
{foreach $clinics as $row}
<tr>
    <td> {$i}</td>
    <td>
        <input type="text" class="form-control updateElement" data-id="{$row.id}" 
               data-colName="name" data-tableName="clinic_rooms" value="{$row.name}" 
               data-toggle="popover" data-trigger="hover" data-placement="bottom" 
               data-content="{$row.name}"/>
    </td>
    <td>
        <input type="text" class="form-control updateElement" data-id="{$row.id}" 
               data-colName="clinic_no" data-tableName="clinic_rooms" value="{$row.clinic_no}" 
               data-toggle="popover" data-trigger="hover" data-placement="bottom" 
               data-content="{$row.clinic_no}"/>
    </td>
    {if $branchesActivate == 1 }
    <td>
        <select class="form-control select2B  updateElement" data-id="{$row.id}" 
                data-colName="branch_id" data-tableName="clinic_rooms"   >
            <option value=""></option>
            {foreach $branches as $data}
            <option value="{$data->id}" {if $row.branch_id eq $data->id  }selected{/if}>{$data->name}</option>
            {/foreach}
        </select>
    </td>
    {/if}
    <td>
        <input type="checkbox" data-colName="today_list" data-tableName="clinic_rooms"   
               value="1"  class="form-control updateElementCheck" 
               data-id="{$row.id}"  {if $row.today_list == 1}  checked   {/if} >
    </td>
    <td></td>
</tr>
{capture assign=i}{$i+1}{/capture}
{/foreach}