aboutsummaryrefslogtreecommitdiff
path: root/views/default/comments
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/comments')
-rw-r--r--views/default/comments/latest.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/views/default/comments/latest.php b/views/default/comments/latest.php
new file mode 100644
index 000000000..f8e1af10f
--- /dev/null
+++ b/views/default/comments/latest.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Latest comments on an entity
+ *
+ * @uses $vars['comments'] Array of comment objects
+ */
+
+if (isset($vars['comments'])) {
+ echo '<ul class="elgg-latest-comments">';
+ foreach ($vars['comments'] as $comment) {
+ $html = elgg_view_annotation($comment, false);
+ if ($html) {
+ echo "<li>$html</li>";
+ }
+ }
+ echo '</ul>';
+} \ No newline at end of file