diff --git a/PHPCI/View/Project/view.phtml b/PHPCI/View/Project/view.phtml
index 741ea0cb..38cfcc4c 100644
--- a/PHPCI/View/Project/view.phtml
+++ b/PHPCI/View/Project/view.phtml
@@ -108,20 +108,47 @@ if ($page > 1) {
}
if ($pages > 1) {
- for($i = 1; $i <= $pages; $i++)
+
+ $start = $page - 3;
+
+ if ($start <= 0) {
+ $start = 1;
+ }
+
+ $end = $page + 3;
+
+ if ($end > $pages) {
+ $end = $pages;
+ }
+
+ if ($start > 1) {
+ print '
1...';
+ }
+
+ for($i = $start; $i <= $end; $i++)
{
+ if ($pages > $end && $i == $pages) continue;
+
if ($i == $page) {
- print '' . $i . '';
+ print '' . $i . '';
} else {
print '' . $i . '';
}
}
+
+ if ($pages > $end) {
+ print '...'.$pages.'';
+ }
}
-if ($page < $pages) {
+
+
+if ($page < $pages - 1) {
print 'Next »';
}
+
+
print '';
?>
\ No newline at end of file
diff --git a/PHPCI/View/layout.phtml b/PHPCI/View/layout.phtml
index c6171a07..dac44274 100644
--- a/PHPCI/View/layout.phtml
+++ b/PHPCI/View/layout.phtml
@@ -71,6 +71,12 @@
color: #fff;
}
+ .pagination>li>span {
+ font-weight: bold;
+ background: #337ab7;
+ color: #fff;
+ }
+