aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/views/default')
-rw-r--r--mod/groups/views/default/forum/viewposts.php20
1 files changed, 17 insertions, 3 deletions
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 @@
<div id="topic_posts"><!-- open the topic_posts div -->
<div id="pages_breadcrumbs"><b><a href="<?php echo $vars['url']; ?>pg/groups/forum/<?php echo $vars['entity']->container_guid; ?>/"><?php echo elgg_echo("groups:forum"); ?></a></b> > <?php echo $vars['entity']->title; ?></div>
- <!-- grab the topic title -->
- <div id="content_area_group_title"><h2><?php echo $vars['entity']->title; ?></h2></div>
<?php
//display follow up comments
- foreach($vars['entity']->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,
+ ));
+
+?>
+ <!-- grab the topic title -->
+ <div id="content_area_group_title"><h2><?php echo $vars['entity']->title; ?></h2></div>
+<?php
+
+ foreach($vars['entity']->getAnnotations('group_topic_post', 50, $offset, "asc") as $post) {
echo elgg_view("forum/topicposts",array('entity' => $post));