aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/views.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-13 12:32:43 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-13 12:32:43 +0000
commitd611e9c962ce825eb7f4600f27f74c3dc477000f (patch)
treef5b600ce1ef7e27536548b514b3144ae138f1c7c /engine/lib/views.php
parentf03c3bd5bfa8d8425121c769b27c4382147dec65 (diff)
downloadelgg-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 'engine/lib/views.php')
-rw-r--r--engine/lib/views.php31
1 files changed, 19 insertions, 12 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 7c542b289..fa65bcae8 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -835,18 +835,17 @@ $list_type_toggle = true, $pagination = true) {
* @return string The list of annotations
* @access private
*/
-function elgg_view_annotation_list($annotations, $count, $offset, $limit) {
- $params = array(
+function elgg_view_annotation_list($annotations, array $vars = array()) {
+ $defaults = array(
'items' => $annotations,
- 'count' => (int) $count,
- 'offset' => (int) $offset,
- 'limit' => (int) $limit,
- 'list-class' => 'elgg-annotation-list',
+ 'list_class' => 'elgg-annotation-list',
'full_view' => true,
'offset_key' => 'annoff',
);
- return elgg_view('layout/objects/list', $params);
+ $vars = array_merge($defaults, $vars);
+
+ return elgg_view('layout/objects/list', $vars);
}
/**
@@ -1062,11 +1061,19 @@ function elgg_view_form($action, $form_vars = array(), $body_vars = array()) {
* @since 1.8.0
* @access private
*/
-function elgg_view_list_item($item, $full_view, $vars) {
- if (elgg_instanceof($item)) {
- return elgg_view_entity($item, $full_view);
- } else {
- return elgg_view_annotation($item, $full_view);
+function elgg_view_list_item($item, $full_view, array $vars = array()) {
+ switch ($item->getType()) {
+ case 'user':
+ case 'object':
+ case 'group':
+ case 'site':
+ return elgg_view_entity($item, $full_view);
+ case 'annotation':
+ return elgg_view_annotation($item, $full_view);
+ case 'river':
+ return elgg_view_river_item($item);
+ default:
+ break;
}
}