From 1d59e5fc4bcc10151831456436019aef90de2bd3 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 6 Mar 2011 01:39:23 +0000 Subject: Refs #2679 can comment on discussion forums in river now git-svn-id: http://code.elgg.org/elgg/trunk@8610 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/views/default/forms/discussion/reply/save.php | 15 +++++++++++---- .../views/default/river/object/groupforumtopic/create.php | 7 +++++++ 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'mod/groups/views/default') diff --git a/mod/groups/views/default/forms/discussion/reply/save.php b/mod/groups/views/default/forms/discussion/reply/save.php index 6281e941c..be258b8fe 100644 --- a/mod/groups/views/default/forms/discussion/reply/save.php +++ b/mod/groups/views/default/forms/discussion/reply/save.php @@ -2,21 +2,28 @@ /** * Discussion topic reply form bofy * - * @uses $vars['entity'] + * @uses $vars['entity'] A discussion topic object + * @uses $vars['inline'] Display a shortened form? */ if (isset($vars['entity']) && elgg_is_logged_in()) { + $inline = elgg_extract('inline', $vars, false); + + if ($inline) { + echo elgg_view('input/text', array('name' => 'group_topic_post')); + echo elgg_view('input/submit', array('value' => elgg_echo('reply'))); + } else { ?>
'group_topic_post')); ?>
elgg_echo('reply'))); - + echo elgg_view('input/submit', array('value' => elgg_echo('reply'))); + } echo elgg_view('input/hidden', array( 'name' => 'entity_guid', - 'value' => $vars['entity']->getGUID() + 'value' => $vars['entity']->getGUID(), )); } diff --git a/mod/groups/views/default/river/object/groupforumtopic/create.php b/mod/groups/views/default/river/object/groupforumtopic/create.php index 1ca871b58..2c914c3f8 100644 --- a/mod/groups/views/default/river/object/groupforumtopic/create.php +++ b/mod/groups/views/default/river/object/groupforumtopic/create.php @@ -33,3 +33,10 @@ if ($excerpt) { echo $excerpt; echo ''; } + +if (elgg_is_logged_in() && $container->isMember(elgg_get_logged_in_user_entity())) { + // inline comment form + echo elgg_view_form('discussion/reply/save', array( + 'id' => "groups-reply-{$object->getGUID()}", + ), array('entity' => $object, 'inline' => true)); +} -- cgit v1.2.3