aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/annotation
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-08-24 20:38:12 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-08-24 20:38:12 -0700
commit6f4ca315db3a8c162fe032e79a9b27f16732bf2d (patch)
treedeadd908bf531250913e174b6926f992189eacb7 /mod/groups/views/default/annotation
parent019729173bcd7c28760a5e97bc9a2ec79ada3278 (diff)
downloadelgg-6f4ca315db3a8c162fe032e79a9b27f16732bf2d.tar.gz
elgg-6f4ca315db3a8c162fe032e79a9b27f16732bf2d.tar.bz2
Fixes #3612, #3750. Added edit replies back to group plugin with the annotation menu.
Diffstat (limited to 'mod/groups/views/default/annotation')
-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>";
+}
+