

<button type="button" class="btn btn-xs blue fright" id="addRowList" data-notAll="{$notAll}"
        data-tableName="{$maintableName}" data-selectId="{$selectId}"><i class="fa fa-plus"></i> إضافة</button>
<input type="hidden" id="listItr" value="{count($alldata)}">
<div class="clearfix"></div>

<table  dir="rtl" class="wds100">
    <thead>
        <tr>
            <th class="txtc" rowspan="2">الاسم</th>
            <th class="txtc wds7" rowspan="2">حذف</th>
        </tr>
    </thead>
    <tbody  id="ListContainer">
        {assign var=i value=1}
        {foreach $alldata as $mydata}
        <tr>
            <td >
                <input type="text" class="form-control updateElement"  id="name{$i}"
                       data-itr="{$i}" data-id="{$mydata->id}"  value='{$mydata->name}'
                       data-colName="name" data-tableName="{$maintableName}" >
            </td>
            <td>
                <a href="#" class="btn red fleft deleteelement" data-id="{$mydata->id}" data-link="visits" 
                   data-fun="delAjax" data-tableName="{$maintableName}"  style="padding: 2px 0px;width: 100%">
                    <i class="fa fa-times" ></i>
                </a>
            </td>
        </tr>
        {capture assign=i}{$i+1}{/capture}
        {/foreach}
    </tbody>
</table>