diff --git a/Web/Presenters/templates/components/paginator.xml b/Web/Presenters/templates/components/paginator.xml index 4cf45257..8d1fec43 100644 --- a/Web/Presenters/templates/components/paginator.xml +++ b/Web/Presenters/templates/components/paginator.xml @@ -1,14 +1,16 @@ +{var $space = 2} +{var $pageCount = ceil($conf->count / $conf->perPage)} +
-
-
- << {_paginator_back} - - {tr("paginator_page", $conf->page)} - - {_paginator_next} >> -
+ {if $conf->page > $space} + « + {/if} + {for $j = $conf->page - ($space-1); $j <= $conf->page + ($space-1); $j++} + {if $j > 0 && $j <= $pageCount} + {$j} + {/if} + {/for} + {if $conf->page <= $pageCount-$space} + » + {/if}
diff --git a/Web/static/css/style.css b/Web/static/css/style.css index 443b8cc4..b5b36472 100644 --- a/Web/static/css/style.css +++ b/Web/static/css/style.css @@ -1525,3 +1525,24 @@ body.scrolled .toTop:hover { color: rgb(128, 128, 128); font-size: 10px; } + +.paginator { + float: right; + margin-top: -1px; +} + +.paginator a { + border-top: 3px solid transparent; + display: inline-block; + padding: 4px 5px; +} + +.paginator a:hover { + border-top: 3px solid rgb(170, 170, 170); + background-color: rgb(230, 230, 230); +} + +.paginator a.active { + border-top: 3px solid rgb(130, 130, 130); + font-weight: bold; +}