Skip to content

Commit

Permalink
Previous/Next page buttons #619 *in progress*
Browse files Browse the repository at this point in the history
  • Loading branch information
ollie64 committed Sep 15, 2015
1 parent 20ee120 commit 6cd0ff8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions celos-ui/src/main/java/com/collective/celos/ui/UIServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,14 @@ private static Tag makeBody(UIConfiguration conf) {
}

private static Tag makePaginationButtons(UIConfiguration conf) {
// in progress
return div();
List<Tag> contents = new ArrayList<>();
String tParam1 = TIME_PARAM + "=" + (conf.getTimeParam().plusMinutes(conf.getZoomLevelMinutes()));
String tParam2 = TIME_PARAM + "=" + (conf.getTimeParam().minusMinutes(conf.getZoomLevelMinutes()));
String urlPart = "/ui?" + ZOOM_PARAM + "=" + conf.getZoomLevelMinutes();
contents.add(a("< Prev page").withHref(urlPart + "&" + ZOOM_PARAM + "=" + tParam2));
contents.add(strong(" | "));
contents.add(a("Next page >").withHref(urlPart + "&" + ZOOM_PARAM + "=" + tParam1));
return div().with(contents).withClass("bigButtons");
}

private static Tag makeZoomButtons(UIConfiguration conf) {
Expand Down

0 comments on commit 6cd0ff8

Please sign in to comment.