marcosdosea_DoeVida/Codigo/DoeVidaWeb/Views/Organizacao/Index.cshtml
@model IEnumerable<DoeVidaWeb.ViewModels.OrganizacaoViewModel>

@{
    ViewData["Title"] = "Organização";
}

<div id="main">
    <div id="header-action">
        <div id="search">
            <input placeholder="Digite o nome da organização que deseja buscar"
                   type="text" name="search" id="input-search" />
            <i class="fas fa-search"></i>
        </div>
        <a asp-action="Create" id="button-new">Nova organização</a>
    </div>

    <table class="table">
        <thead>
            <tr>
                <th>
                    @Html.DisplayNameFor(model => model.NomeOrganizacao)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.Telefone)
                </th>

                <th>Ações</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.NomeOrganizacao)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Telefone)
                </td>

                <td id="actions">
                    <a class="icon-action" href="Organizacao/Details/@item.IdOrganizacao"><i class="fas fa-eye icon-action"></i></a>
                    <a class="icon-action" href="Organizacao/Edit/@item.IdOrganizacao"><i class="fas fa-edit icon-action"></i></a>
                    <a class="icon-action" href="Organizacao/Delete/@item.IdOrganizacao"><i class="fas fa-trash-alt icon-action"></i></a>
                </td>
            </tr>
            }
        </tbody>
    </table>

    </div>
    <div class="pagination-container @(ViewBag.totalPages <= 1 ? "disabled" : "")">
        <div class="pagination-count-container">
            <div class="pagination-count">
                @(ViewBag.currentPage + 1)
            </div>
                <span class="pagination-txt-count">DE @(ViewBag.totalPages)</span>
        </div>

        <a href="@("/Organizacao/Index/"+(ViewBag.currentPage - 1).ToString())" style="margin-right: 10px;" class="pagination-btn @(ViewBag.currentPage == 0 ? "disabled" : "")"><i class="fas fa-chevron-left"></i> </a>
        <a href="/@((ViewBag.currentPage == 0) ? "Organizacao/Index/" : "")@(ViewBag.currentPage + 1)" class="pagination-btn @(ViewBag.totalPages == (ViewBag.currentPage + 1) ? "disabled" : "")"><i class="fas fa-chevron-right"></i> </a>
    </div>
</div>