Author: ssmiweve
Date: 2009-01-19 15:53:44 +0100 (Mon, 19 Jan 2009)
New Revision: 7150
Modified:
branches/2.18/view-control-spi/src/main/java/no/sesat/search/view/navigation/ResultPagingNavigationController.java
Log:
SKER5036 Could be a good idea to have the possibility to jump result pages with
more than one page at the time.
Modified:
branches/2.18/view-control-spi/src/main/java/no/sesat/search/view/navigation/ResultPagingNavigationController.java
===================================================================
---
branches/2.18/view-control-spi/src/main/java/no/sesat/search/view/navigation/ResultPagingNavigationController.java
2009-01-16 13:22:45 UTC (rev 7149)
+++
branches/2.18/view-control-spi/src/main/java/no/sesat/search/view/navigation/ResultPagingNavigationController.java
2009-01-19 14:53:44 UTC (rev 7150)
@@ -106,14 +106,7 @@
// Add navigation item for previous page.
if (pager.getCurrentPage() > 1) {
- final String pageOffset =
Integer.toString(pager.getOffsetOfPage(pager.getCurrentPage() - 1));
-
- item.addResult(new BasicNavigationItem(
- messages.getMessage(MSG_PREV),
- context.getUrlGenerator().getURL(pageOffset, config),
- config.getPageSize()));
-
- // Add navigation for multi-previous page.
+ // Add navigation for multi-previous page first.
if(config.getMultiplePageSize() > 0 && pager.getCurrentPage()
> config.getMultiplePageSize()) {
final String pageOffsetMulti = Integer.toString(
@@ -124,6 +117,14 @@
context.getUrlGenerator().getURL(pageOffsetMulti,
config),
config.getMultiplePageSize()*config.getPageSize()));
}
+
+ final String pageOffset =
Integer.toString(pager.getOffsetOfPage(pager.getCurrentPage() - 1));
+
+ item.addResult(new BasicNavigationItem(
+ messages.getMessage(MSG_PREV),
+ context.getUrlGenerator().getURL(pageOffset, config),
+ config.getPageSize()));
+
}
// Add navigation items for the individual page thumbnails.
_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits