diff options
Diffstat (limited to 'mod/groups/views/default/river/object')
-rw-r--r-- | mod/groups/views/default/river/object/groupforumtopic/create.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mod/groups/views/default/river/object/groupforumtopic/create.php b/mod/groups/views/default/river/object/groupforumtopic/create.php new file mode 100644 index 000000000..e7d92bc08 --- /dev/null +++ b/mod/groups/views/default/river/object/groupforumtopic/create.php @@ -0,0 +1,22 @@ +<?php +/** + * Group forum topic create river view. + */ + +$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/elements/layout', array( + 'item' => $vars['item'], + 'message' => $excerpt, + 'responses' => $responses, +)); |