gocron/templates/common/pagination.html

41 lines
1.2 KiB
Go
Raw Normal View History

2018-01-28 07:48:37 +00:00
{%if gt .Pagination.Total 0%}
2017-04-23 06:11:53 +00:00
<div class="ui pagination menu">
2018-01-28 07:48:37 +00:00
{%if not .Pagination.IsFirst%}
<a class="item" href="{%.URI%}?{% .Params.PageParams%}&page=1">
2017-04-23 06:11:53 +00:00
</a>
2018-01-28 07:48:37 +00:00
{%end%}
2017-04-23 06:11:53 +00:00
2018-01-28 07:48:37 +00:00
{%if .Pagination.HasPrevious%}
<a class="icon item" href="{%.URI%}?{% .Params.PageParams%}&page={%.Pagination.Previous%}">
2017-04-23 06:11:53 +00:00
<i class="icon left arrow"></i>
</a>
2018-01-28 07:48:37 +00:00
{%end%}
2017-04-23 06:11:53 +00:00
2018-01-28 07:48:37 +00:00
{%range .Pagination.Pages%}
{%if eq .Num -1%}
2017-04-23 06:11:53 +00:00
<div class="disabled item">
...
</div>
2018-01-28 07:48:37 +00:00
{%else%}
<a class="icon {%if .IsCurrent%}active{%end%} item" href="{%$.URI%}?{% $.Params.PageParams%}&page={%.Num%}">
{%.Num%}
2017-04-23 06:11:53 +00:00
</a>
2018-01-28 07:48:37 +00:00
{%end%}
{%end%}
2017-04-23 06:11:53 +00:00
2018-01-28 07:48:37 +00:00
{%if .Pagination.HasNext%}
<a class="icon item" href="{%.URI%}?{% .Params.PageParams%}&page={%.Pagination.Next%}">
2017-04-23 06:11:53 +00:00
<i class="icon right arrow"></i>
</a>
2018-01-28 07:48:37 +00:00
{%end%}
{%if not .Pagination.IsLast%}
<a class="icon item" href="{%.URI%}?{% .Params.PageParams%}&page={%.Pagination.TotalPages%}">
2017-04-23 06:11:53 +00:00
</a>
2018-01-28 07:48:37 +00:00
{%end%}
<div class="item">{%.Pagination.Total%}/{%.Pagination.TotalPages%}</div>
2017-04-23 06:11:53 +00:00
</div>
2018-01-28 07:48:37 +00:00
{%end%}