diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-06-24 07:52:27 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-06-24 07:52:27 -0400 |
commit | fb0a9d896b9a0bd1193c63badad6a1990afc0109 (patch) | |
tree | 595e666f22aa3852ac2320b7b6192f64ab5c1d76 | |
parent | 9edc8c6004d1236a21e03fb1c820a6e749f1ee3b (diff) | |
download | elgg-fb0a9d896b9a0bd1193c63badad6a1990afc0109.tar.gz elgg-fb0a9d896b9a0bd1193c63badad6a1990afc0109.tar.bz2 |
fixed group forum discussion inline replies for activity page
-rw-r--r-- | mod/groups/views/default/river/object/groupforumtopic/create.php | 9 | ||||
-rw-r--r-- | views/default/river/elements/body.php | 8 |
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(); |