@model EForT.Models.AccountsModel

<div id="bank-list-table">
    <table id="bank-list" class="table table-striped table-bordered user-table table-responsive-md">
        <thead>
            <tr>
                <th scope="col" style="width:40%" class="text-center">Nickname</th>
                <th scope="col" style="width:15%" class="text-center">Edit Nickname</th>
                <th scope="col" style="width:15%" class="text-center">Transfer to EForT</th>
                <th scope="col" style="width:15%" class="text-center">Transfer to Account</th>
                <th scope="col" style="width:15%" class="text-center">Delete</th>
            </tr>
        </thead>
        <tbody>
            @{
                if (Model.BankAccounts == null || Model.BankAccounts.Count() == 0)
                {
                }
                else
                {
                    int numBankAccounts = 0;
                    foreach (var item in Model.BankAccounts)
                    {
                        if (item.IsDeleted == false)
                        {
                            numBankAccounts++;
                        }
                    }
                    if (numBankAccounts > 0)
                    {
                        foreach (var item in Model.BankAccounts)
                        {
                            if (item.IsDeleted == false)
                            {
                                <tr>
                                    <td align="center">@item.Nickname</td>
                                    <td align="center"><button type="button" class="btn btn-icon btn-pure secondary js-edit-nickname" data-url="@Url.Action("EditBankAccountNickname", "Accounts", new { accountId = item.Id })"><i class="fa fa-pencil"></i></button></td>
                                    <td align="center"><button type="button" class="btn btn-icon btn-pure secondary js-add-balance" data-url="@Url.Action("AddBalance", "Accounts", new { accountId = item.Id })"><i class="fa fa-plus"></i></button></td>
                                    <td align="center"><button type="button" class="btn btn-icon btn-pure secondary js-withdraw-balance" data-url="@Url.Action("WithdrawBalance", "Accounts", new { AccountId = item.Id })"><i class="fa fa-minus"></i></button></td>
                                    <td align="center"><button type="button" class="btn btn-icon btn-pure secondary js-delete-account" data-url="@Url.Action("DeleteBankAccount", "Accounts", new { accountId = item.Id })"><i class="fa fa-trash"></i></button></td>
                                </tr>
                            }
                        }

                    }
                }
            }
        </tbody>
    </table>
</div>


