aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/default/annotation/generic_comment.php54
-rw-r--r--views/default/comments/forms/edit.php38
2 files changed, 92 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
diff --git a/views/default/comments/forms/edit.php b/views/default/comments/forms/edit.php
new file mode 100644
index 000000000..f28a53b36
--- /dev/null
+++ b/views/default/comments/forms/edit.php
@@ -0,0 +1,38 @@
+<?php
+
+ /**
+ * Elgg comments add form
+ *
+ * @package Elgg
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@curverider.co.uk>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity']
+ */
+
+ if (isset($vars['entity'])) {
+
+?>
+
+ <form action="<?php echo $vars['url']; ?>action/comments/add" method="post">
+ <h3>
+ <?php echo elgg_echo("generic_comments:add"); ?>
+ </h3>
+ <p>
+ <label><?php echo elgg_echo("generic_comments:text"); ?><br />
+ <textarea name="generic_comment" value="" id="generic_comment" class="expanding" /></textarea>
+ </label>
+ </p>
+ <p>
+ <input type="hidden" name="entity_guid" value="<?php echo $vars['entity']->getGUID(); ?>" />
+ <input type="submit" value="<?php echo elgg_echo("save"); ?>" />
+ </p>
+ </form>
+
+<?php
+
+ }
+
+?> \ No newline at end of file