diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-13 12:32:43 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-13 12:32:43 +0000 |
commit | d611e9c962ce825eb7f4600f27f74c3dc477000f (patch) | |
tree | f5b600ce1ef7e27536548b514b3144ae138f1c7c /views/default/core/river/footer.php | |
parent | f03c3bd5bfa8d8425121c769b27c4382147dec65 (diff) | |
download | elgg-d611e9c962ce825eb7f4600f27f74c3dc477000f.tar.gz elgg-d611e9c962ce825eb7f4600f27f74c3dc477000f.tar.bz2 |
Refs #2226 moving riverdashboard into core - need to clean up riverdashboard plugin and move to plugins repository and update plugins with new river views
git-svn-id: http://code.elgg.org/elgg/trunk@7610 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/core/river/footer.php')
-rw-r--r-- | views/default/core/river/footer.php | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/views/default/core/river/footer.php b/views/default/core/river/footer.php new file mode 100644 index 000000000..de27f265f --- /dev/null +++ b/views/default/core/river/footer.php @@ -0,0 +1,46 @@ +<?php +/** + * River item footer + */ + +$item = $vars['item']; +$object = $item->getObjectEntity(); + +// annotations do not have comments +if ($item->annotation_id != 0 || !$object) { + return true; +} + +$comment_count = count_annotations($object->getGUID(), '', '', 'generic_comment'); + +$comments = get_annotations($object->getGUID(), "", "", 'generic_comment', "", "", 3, 0, "desc"); +if ($comments) { + $comments = array_reverse($comments); + +?> + <span class="elgg-river-comments-tab"><?php echo elgg_echo('comments'); ?></span> + +<?php + + echo elgg_view_annotation_list($comments, array('list_class' => 'elgg-river-comments')); + + if ($comment_count > count($comments)) { + $num_more_comments = $comment_count - count($comments); + $url = $object->getURL(); + $params = array( + 'href' => $url, + 'text' => elgg_echo('river:comments:more', array($num_more_comments)), + ); + $link = elgg_view('output/url', $params); + echo "<div class=\"elgg-river-more\">$link</div>"; + } +} + +// inline comment form +$body = elgg_view('forms/comments/inline', array('entity' => $object)); +$params = array( + 'body' => $body, + 'action' => 'action/comments/add', + 'internalid' => "elgg-togglee-{$object->getGUID()}", +); +echo elgg_view('input/form', $params); |