aboutsummaryrefslogtreecommitdiff
path: root/views/default/annotation/generic_comment.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-27 15:20:33 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-27 15:20:33 +0000
commit10e5db3119afca7060a680517393518be3aa54ab (patch)
treeec6c1eb164c3d73120bfa2632ebfad3189a94faa /views/default/annotation/generic_comment.php
parent5aa81ebf7107556b39336a326abc421d715c3650 (diff)
downloadelgg-10e5db3119afca7060a680517393518be3aa54ab.tar.gz
elgg-10e5db3119afca7060a680517393518be3aa54ab.tar.bz2
Brought generic comments into Elgg core
git-svn-id: https://code.elgg.org/elgg/trunk@1185 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/annotation/generic_comment.php')
-rw-r--r--views/default/annotation/generic_comment.php54
1 files changed, 54 insertions, 0 deletions
diff --git a/views/default/annotation/generic_comment.php b/views/default/annotation/generic_comment.php
new file mode 100644
index 000000000..a18bd9eb3
--- /dev/null
+++ b/views/default/annotation/generic_comment.php
@@ -0,0 +1,54 @@
+<?php
+
+ /**
+ * Elgg generic comment
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ *
+ */
+
+?>
+
+
+ <div class="generic_comment"><!-- start of generic_comment div -->
+
+ <div style="float:left;width:60px;">
+ <?php
+ echo elgg_view("profile/icon",array('entity' => get_entity($vars['annotation']->owner_guid), 'size' => 'tiny'));
+ ?>
+ </div>
+ <p>
+ <?php echo get_user($vars['annotation']->owner_guid)->username . " on " . friendly_time($vars['annotation']->time_created); ?>
+ </p>
+
+ <!-- output the actual comment -->
+ <p><?php echo elgg_view("output/longtext",array("value" => $vars['annotation']->value)); ?></p>
+
+ <?php
+
+ // if the user looking at the comment can edit, show the delete link
+ if ($vars['annotation']->canEdit()) {
+
+ ?>
+ <p>
+ <?php
+
+ echo elgg_view("output/confirmlink",array(
+ 'href' => $vars['url'] . "action/comments/delete&annotation_id=" . $vars['annotation']->id,
+ 'text' => elgg_echo('delete'),
+ 'confirm' => elgg_echo('deleteconfirm'),
+ ));
+
+ ?>
+ </p>
+
+ <?php
+ } //end of can edit if statement
+ ?>
+
+ </div><!-- end of generic_comment div --> \ No newline at end of file