aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-19 14:49:01 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-19 14:49:01 +0000
commit14ba65e5a9f5c8a63e1b41cffb86e7e91de2e49a (patch)
treecd0282597ba841c00b80185e77fa2c85c3e18075 /views/default
parent6ed80f8a0bfada5b0d6bad1714a5c638d765f038 (diff)
downloadelgg-14ba65e5a9f5c8a63e1b41cffb86e7e91de2e49a.tar.gz
elgg-14ba65e5a9f5c8a63e1b41cffb86e7e91de2e49a.tar.bz2
Genericked up annotation/generic_comment view to allow reuse in plugins.
git-svn-id: http://code.elgg.org/elgg/trunk@8326 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r--views/default/annotation/generic_comment.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/views/default/annotation/generic_comment.php b/views/default/annotation/generic_comment.php
index d5eb7492c..0cf89b6a7 100644
--- a/views/default/annotation/generic_comment.php
+++ b/views/default/annotation/generic_comment.php
@@ -2,8 +2,11 @@
/**
* Elgg generic comment view
*
- * @uses $vars['annotation'] ElggAnnotation object
- * @uses $vars['full'] Display fill view or brief view
+ * @uses $vars['annotation'] ElggAnnotation object
+ * @uses $vars['full'] Display fill view or brief view
+ * @uses $vars['delete_action'] A custom action for the delete button. Defaults to
+ * action/comments/delete The annotation ID is passed
+ * as 'annotation_id'.
*/
if (!isset($vars['annotation'])) {
@@ -11,6 +14,7 @@ if (!isset($vars['annotation'])) {
}
$full_view = elgg_extract('full', $vars, true);
+$delete_action = elgg_extract('delete_action', $vars, 'action/comments/delete');
$comment = $vars['annotation'];
@@ -32,8 +36,9 @@ if ($full_view) {
$delete_button = '';
if ($comment->canEdit()) {
- $delete_button = elgg_view("output/confirmlink",array(
- 'href' => "action/comments/delete?annotation_id={$comment->id}",
+ $url = elgg_http_add_url_query_elements($delete_action, array('annotation_id' => $comment->id));
+ $delete_button = elgg_view("output/confirmlink", array(
+ 'href' => $url,
'text' => elgg_echo('delete'),
'confirm' => elgg_echo('deleteconfirm')
));
@@ -59,7 +64,7 @@ HTML;
// brief view
//@todo need link to actual comment!
-
+
$on = elgg_echo('on');
$body = <<<HTML