]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
missed this file from previous comment commit
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 6 Dec 2010 02:10:40 +0000 (02:10 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 6 Dec 2010 02:10:40 +0000 (02:10 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7545 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/comments/list.php [new file with mode: 0644]

diff --git a/views/default/comments/list.php b/views/default/comments/list.php
new file mode 100644 (file)
index 0000000..6dbe514
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+/**
+ * List comments with optional add form
+ *
+ * @uses $vars['entity']        ElggEntity
+ * @uses $vars['show_add_form'] Display add form or not
+ */
+
+$show_add_form = elgg_get_array_value('show_add_form', $vars, true);
+
+echo '<div class="elgg-comments">';
+
+echo list_annotations($vars['entity']->getGUID(), 'generic_comment');
+
+if ($show_add_form) {
+       $form_vars = array('name' => 'elgg_add_comment');
+       echo elgg_view_form('comments/add', $form_vars, $vars);
+}
+
+echo '</div>';