aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/groups/views/default/river/object/groupforumtopic/create.php9
-rw-r--r--views/default/river/elements/body.php8
2 files changed, 16 insertions, 1 deletions
diff --git a/mod/groups/views/default/river/object/groupforumtopic/create.php b/mod/groups/views/default/river/object/groupforumtopic/create.php
index f92e54a5c..80e7b09aa 100644
--- a/mod/groups/views/default/river/object/groupforumtopic/create.php
+++ b/mod/groups/views/default/river/object/groupforumtopic/create.php
@@ -7,7 +7,16 @@ $object = $vars['item']->getObjectEntity();
$excerpt = strip_tags($object->description);
$excerpt = elgg_get_excerpt($excerpt);
+$responses = '';
+if (elgg_is_logged_in() && $object->canAnnotate(0, 'group_topic_post')) {
+ // inline comment form
+ $form_vars = array('id' => "groups-reply-{$object->getGUID()}", 'class' => 'hidden');
+ $body_vars = array('entity' => $object, 'inline' => true);
+ $responses = elgg_view_form('discussion/reply/save', $form_vars, $body_vars);
+}
+
echo elgg_view('river/item', array(
'item' => $vars['item'],
'message' => $excerpt,
+ 'responses' => $responses,
));
diff --git a/views/default/river/elements/body.php b/views/default/river/elements/body.php
index 080c04644..7eebb0c99 100644
--- a/views/default/river/elements/body.php
+++ b/views/default/river/elements/body.php
@@ -32,7 +32,13 @@ if ($attachments !== false) {
$attachments = "<div class=\"elgg-river-attachments\">$attachments</div>";
}
-$responses = elgg_view('river/elements/responses', $vars);
+$responses = elgg_extract('responses', $vars, false);
+if ($responses === false) {
+ $responses = elgg_view('river/elements/responses', $vars);
+}
+if ($responses) {
+ $responses = "<div class=\"elgg-river-responses\">$responses</div>";
+}
$group_string = '';
$object = $item->getObjectEntity();