From 0f53ed87dc17446f295f7333c05c65ceec0bc528 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 4 Feb 2009 15:05:29 +0000 Subject: Added pagination to group topic posts. Fixes #704 git-svn-id: https://code.elgg.org/elgg/trunk@2644 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/views/default/forum/viewposts.php | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/groups/views/default/forum/viewposts.php b/mod/groups/views/default/forum/viewposts.php index a05443b6a..ba30f5b60 100644 --- a/mod/groups/views/default/forum/viewposts.php +++ b/mod/groups/views/default/forum/viewposts.php @@ -14,12 +14,26 @@
> title; ?>
- -

title; ?>

getAnnotations('group_topic_post', 50, 0, "asc") as $post) { + $count = $vars['entity']->countAnnotations('group_topic_post'); + $offset = (int) get_input('offset',0); + + $baseurl = $vars['url'] . "mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$vars['entity']->container_guid}"; + echo elgg_view('navigation/pagination',array( + 'limit' => 50, + 'offset' => $offset, + 'baseurl' => $baseurl, + 'count' => $count, + )); + +?> + +

title; ?>

+getAnnotations('group_topic_post', 50, $offset, "asc") as $post) { echo elgg_view("forum/topicposts",array('entity' => $post)); -- cgit v1.2.3