|
|
|
@ -123,11 +123,14 @@ void print_header(int columns)
|
|
|
|
|
|
|
|
|
|
void print_pager(int items, int pagelen, char *search, char *sort)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
int i, ofs;
|
|
|
|
|
char *class = NULL;
|
|
|
|
|
html("<div class='pager'>");
|
|
|
|
|
for(i = 0; i * pagelen < items; i++)
|
|
|
|
|
cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), NULL,
|
|
|
|
|
search, sort, i * pagelen);
|
|
|
|
|
for(i = 0, ofs = 0; ofs < items; i++, ofs = i * pagelen) {
|
|
|
|
|
class = (ctx.qry.ofs == ofs) ? "current" : NULL;
|
|
|
|
|
cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), class,
|
|
|
|
|
search, sort, ofs);
|
|
|
|
|
}
|
|
|
|
|
html("</div>");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|