aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-06 01:48:53 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-06 01:48:53 +0000
commiteb306be905c9fd78600841070d0796bd99ae7f73 (patch)
tree4ad84690c3500dbcc9b7ca9feaddc0a2c9cd3f8c /engine/lib
parent835c5685e386216e016212f589cdef047b027ac4 (diff)
downloadelgg-eb306be905c9fd78600841070d0796bd99ae7f73.tar.gz
elgg-eb306be905c9fd78600841070d0796bd99ae7f73.tar.bz2
comments use the media view now
git-svn-id: http://code.elgg.org/elgg/trunk@7544 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/views.php42
1 files changed, 14 insertions, 28 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 3885babf1..d2e63d1a5 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -836,34 +836,14 @@ $list_type_toggle = true, $pagination = true) {
* @access private
*/
function elgg_view_annotation_list($annotations, $count, $offset, $limit) {
- $count = (int) $count;
- $offset = (int) $offset;
- $limit = (int) $limit;
-
- $html = "";
-
- $nav = elgg_view('navigation/pagination', array(
- 'baseurl' => $_SERVER['REQUEST_URI'],
- 'offset' => $offset,
- 'count' => $count,
- 'limit' => $limit,
- 'word' => 'annoff',
- 'nonefound' => false,
- ));
-
- $html .= $nav;
-
- if (is_array($annotations) && sizeof($annotations) > 0) {
- foreach ($annotations as $annotation) {
- $html .= elgg_view_annotation($annotation, true);
- }
- }
-
- if ($count) {
- $html .= $nav;
- }
+ $params = array(
+ 'annotations' => $annotations,
+ 'count' => (int) $count,
+ 'offset' => (int) $offset,
+ 'limit' => (int) $limit,
+ );
- return $html;
+ return elgg_view('annotation/list', $params);
}
/**
@@ -959,13 +939,19 @@ function elgg_view_comments($entity, $add_comment = true) {
if ($comemnts) {
return $comments;
} else {
+ $params = array(
+ 'entity' => $entity,
+ 'show_add_form' => $add_comment,
+ );
+ $comments = elgg_view('comments/list', $params);
+ /*
$comments = list_annotations($entity->getGUID(), 'generic_comment');
//display the new comment form if required
if ($add_comment) {
$comments .= elgg_view('comments/forms/edit', array('entity' => $entity));
}
-
+*/
return $comments;
}
}