diff --git a/htroot/Bookmarks_p.html b/htroot/Bookmarks_p.html index be0561c6b..aae65184b 100644 --- a/htroot/Bookmarks_p.html +++ b/htroot/Bookmarks_p.html @@ -102,10 +102,18 @@ Tagged with | #{tags}#previous page +#(/prev-page)# #(next-page)# -::next page +::next page #(/next-page)# -  +
+Show +10 +50 +100 +Bookmarks per page. All
diff --git a/htroot/Bookmarks_p.java b/htroot/Bookmarks_p.java index 685315f1b..4b95fb2fb 100644 --- a/htroot/Bookmarks_p.java +++ b/htroot/Bookmarks_p.java @@ -61,7 +61,7 @@ public class Bookmarks_p { public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) { serverObjects prop = new serverObjects(); plasmaSwitchboard switchboard = (plasmaSwitchboard) env; - int MAX_COUNT=10; //TODO: Changeable per Interface + int max_count=10; String tagName=""; int start=0; @@ -167,6 +167,9 @@ public class Bookmarks_p { if(post.containsKey("start")){ start=Integer.parseInt((String) post.get("start")); } + if(post.containsKey("num")){ + max_count=Integer.parseInt((String) post.get("num")); + } } Iterator it=switchboard.bookmarksDB.getTagIterator(true); int count=0; @@ -195,7 +198,7 @@ public class Bookmarks_p { Vector tags; Iterator tagsIt; int tagCount; - while(count= max_count){ + start=start-max_count; + if(start <0){ + start=0; + } + prop.put("prev-page", 1); + prop.put("prev-page_start", start); + prop.put("prev-page_tag", tagName); + prop.put("next-page_num", max_count); } prop.put("bookmarks", count); return prop;