diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-03 17:53:05 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-03 17:53:05 +0000 |
commit | 4766f36a4d74924f21ff329c4318ce4e069ffa04 (patch) | |
tree | 969b84632f2a8b0db79788a8a6db8e41d63e5cb4 /mod/groups/views/default/groups/forum_latest.php | |
parent | 57a217fd6b708844407486046a1faa23b46cac08 (diff) | |
download | elgg-4766f36a4d74924f21ff329c4318ce4e069ffa04.tar.gz elgg-4766f36a4d74924f21ff329c4318ce4e069ffa04.tar.bz2 |
Pulled in the interface changes.
git-svn-id: http://code.elgg.org/elgg/trunk@5257 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default/groups/forum_latest.php')
-rw-r--r-- | mod/groups/views/default/groups/forum_latest.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/mod/groups/views/default/groups/forum_latest.php b/mod/groups/views/default/groups/forum_latest.php new file mode 100644 index 000000000..6baa8a575 --- /dev/null +++ b/mod/groups/views/default/groups/forum_latest.php @@ -0,0 +1,38 @@ +<?php + + // Latest forum discussion for the group home page + + //check to make sure this group forum has been activated + if($vars['entity']->forum_enable != 'no'){ + +?> + +<div class="contentWrapper"> +<h2><?php echo elgg_echo('groups:latestdiscussion'); ?></h2> +<?php + + $forum = elgg_get_entities_from_annotations(array('types' => 'object', 'subtypes' => 'groupforumtopic', 'annotation_names' => 'group_topic_post', 'container_guid' => $vars['entity']->guid, 'limit' => 4, 'order_by' => 'maxtime desc')); + + if($forum){ + foreach($forum as $f){ + + $count_annotations = $f->countAnnotations("group_topic_post"); + + echo "<div class=\"forum_latest\">"; + echo "<div class=\"topic_owner_icon\">" . elgg_view('profile/icon',array('entity' => $f->getOwnerEntity(), 'size' => 'tiny', 'override' => true)) . "</div>"; + echo "<div class=\"topic_title\"><p><a href=\"{$vars['url']}mod/groups/topicposts.php?topic={$f->guid}&group_guid={$vars['entity']->guid}\">" . $f->title . "</a></p> <p class=\"topic_replies\"><small>".elgg_echo('groups:posts').": " . $count_annotations . "</small></p></div>"; + + echo "</div>"; + + } + } else { + echo "<div class=\"forum_latest\">"; + echo elgg_echo("grouptopic:notcreated"); + echo "</div>"; + } +?> +<div class="clearfloat" /></div> +</div> +<?php + }//end of forum active check +?>
\ No newline at end of file |