Request information about movie from IMDB.
@model MovieNavigator.Web.ViewModels.DataPaginationViewModel
@if (Model.Pagination.TotalPages > 1)
{
<div>Page @Model.Pagination.PageNumber of @Model.Pagination.TotalPages</div>
<ul class="pagination pagination-sm">
@if (@Model.Pagination.PreviousPageNumber != 0)
{
<li class="page-item"><a class="page-link" href="@Model.Pagination.BaseQueryString&page=@Model.Pagination.PreviousPageNumber">Previous</a></li>
}
else
{
<li class="page-item disabled"><span class="page-link">Previous</span></li>
}
@if (Model.Pagination.ShowMorePrevious > 0)
{
<li class="page-item"><a class="page-link" href="@Model.Pagination.BaseQueryString&page=@Model.Pagination.ShowMorePrevious">...</a></li>
}
@for (var i = Model.Pagination.StartPage; i <= Model.Pagination.EndPage; i++)
{
if (Model.Pagination.PageNumber == i)
{
<li class="page-item active"><span class="page-link">@i</span></li>
}
else
{
<li class="page-item"><a class="page-link" href="@Model.Pagination.BaseQueryString&page=@i">@i</a></li>
}
}
@if (Model.Pagination.ShowMoreNext > 0)
{
<li class="page-item"><a class="page-link" href="@Model.Pagination.BaseQueryString&page=@Model.Pagination.ShowMoreNext">...</a></li>
}
@if (@Model.Pagination.NextPageNumber != 0)
{
<li class="page-item"><a class="page-link" href="@Model.Pagination.BaseQueryString&page=@Model.Pagination.NextPageNumber">Next</a></li>
}
else
{
<li class="page-item disabled"><span class="page-link">Next</span></li>
}
</ul>
}