aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/annotation/group_topic_post.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/views/default/annotation/group_topic_post.php')
-rw-r--r--mod/groups/views/default/annotation/group_topic_post.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/mod/groups/views/default/annotation/group_topic_post.php b/mod/groups/views/default/annotation/group_topic_post.php
index d2303aba8..f38d2a77a 100644
--- a/mod/groups/views/default/annotation/group_topic_post.php
+++ b/mod/groups/views/default/annotation/group_topic_post.php
@@ -1,8 +1,19 @@
<?php
-/**
- * Discussion reply
+/*
+ * Embeds an edit link for the annotation
*/
-$vars['delete_action'] = 'action/discussion/reply/delete';
+$annotation = elgg_extract('annotation', $vars);
echo elgg_view('annotation/default', $vars);
+
+if ($annotation->canEdit()) {
+ $form = elgg_view_form('discussion/reply/save', array(), array_merge(array(
+ 'entity' => get_entity($annotation->entity_guid),
+ 'annotation' => $annotation
+ ), $vars)
+ );
+
+ echo "<div class=\"hidden mbm\" id=\"edit-annotation-$annotation->id\">$form</div>";
+}
+