aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/groups
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-19 16:31:35 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-19 16:31:35 +0000
commit856dc92ef07c9fe06339349224533a12898b31d7 (patch)
tree4e1a665848a8339a0c37cab948edab259f338d5f /mod/groups/views/default/groups
parent47e359de2e11aac5c89039fbac11c1c871d3baed (diff)
downloadelgg-856dc92ef07c9fe06339349224533a12898b31d7.tar.gz
elgg-856dc92ef07c9fe06339349224533a12898b31d7.tar.bz2
There was no point in group discussions having their own comment annotations, better to use the generic comments so this has been changed and a full group activity stream added. For v1.8, there will need to be an upgrade script which will change 'group_topic_post' -> 'generic_comment' and on all existing topics, take the first annotation of type 'group_topic_post' and populate the topic's description.
git-svn-id: http://code.elgg.org/elgg/trunk@6526 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default/groups')
-rw-r--r--mod/groups/views/default/groups/css.php3
-rw-r--r--mod/groups/views/default/groups/forum_latest.php17
2 files changed, 11 insertions, 9 deletions
diff --git a/mod/groups/views/default/groups/css.php b/mod/groups/views/default/groups/css.php
index fc160453a..d435b1f7c 100644
--- a/mod/groups/views/default/groups/css.php
+++ b/mod/groups/views/default/groups/css.php
@@ -150,5 +150,4 @@
- force tinyMCE to correct width */
.edit_comment .defaultSkin table.mceLayout {
width: 694px !important;
-}
-
+} \ No newline at end of file
diff --git a/mod/groups/views/default/groups/forum_latest.php b/mod/groups/views/default/groups/forum_latest.php
index 3c6ce6ccf..865b04ca2 100644
--- a/mod/groups/views/default/groups/forum_latest.php
+++ b/mod/groups/views/default/groups/forum_latest.php
@@ -8,23 +8,26 @@ if($vars['entity']->forum_enable != 'no'){
<h3><?php echo elgg_echo('groups:latestdiscussion'); ?></h3>
<?php
- $forum = elgg_get_entities_from_annotations(array('types' => 'object', 'subtypes' => 'groupforumtopic', 'annotation_names' => 'group_topic_post', 'container_guid' => $vars['entity']->guid, 'limit' => 6, 'order_by' => 'maxtime desc'));
+ $forum = elgg_get_entities(array('types' => 'object', 'subtypes' => 'groupforumtopic', 'container_guid' => $vars['entity']->guid, 'limit' => 6));
if($forum){
foreach($forum as $f){
- $count_annotations = $f->countAnnotations("group_topic_post");
+ $count_annotations = $f->countAnnotations("generic_comment");
echo "<div class='entity_listing clearfloat'>";
echo "<div class='entity_listing_icon'>" . elgg_view('profile/icon',array('entity' => $f->getOwnerEntity(), 'size' => 'tiny')) . "</div>";
echo "<div class='entity_listing_info'><p class='entity_title'><a href=\"{$vars['url']}mod/groups/topicposts.php?topic={$f->guid}&group_guid={$vars['entity']->guid}\">" . $f->title . "</a></p>";
- echo "<p class='entity_subtext'>".elgg_echo('groups:posts').": " . $count_annotations . "</p></div>";
+ echo "<p class='entity_subtext'>".elgg_echo('comments').": " . $count_annotations . "</p></div>";
echo "</div>";
}
} else {
- $create_discussion = $vars['url'] . "mod/groups/addtopic.php?group_guid=" . page_owner();
- echo "<p class='margin_top'><a href=\"{$create_discussion}\">".elgg_echo("groups:addtopic")."</a></p>";
+ if(page_owner_entity()->isMember($vars['user'])){
+ $create_discussion = $vars['url'] . "mod/groups/addtopic.php?group_guid=" . page_owner();
+ echo "<p class='margin_top'><a href=\"{$create_discussion}\">".elgg_echo("groups:addtopic")."</a></p>";
+ }else{
+ echo "<p class='margin_top'>". elgg_echo("grouptopic:notcreated") . "</p>";
+ }
}
-}//end of forum active check
-?> \ No newline at end of file
+}//end of forum active check \ No newline at end of file