diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-06 01:48:53 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-06 01:48:53 +0000 |
commit | eb306be905c9fd78600841070d0796bd99ae7f73 (patch) | |
tree | 4ad84690c3500dbcc9b7ca9feaddc0a2c9cd3f8c /views/default/annotation/list.php | |
parent | 835c5685e386216e016212f589cdef047b027ac4 (diff) | |
download | elgg-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 'views/default/annotation/list.php')
-rw-r--r-- | views/default/annotation/list.php | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/views/default/annotation/list.php b/views/default/annotation/list.php new file mode 100644 index 000000000..f432ad640 --- /dev/null +++ b/views/default/annotation/list.php @@ -0,0 +1,46 @@ +<?php +/** + * Annotation list + * + * @uses $vars['annotations'] + * @uses $vars['limit'] + * @uses $vars['offset'] + * @uses $vars['count'] + * @uses $vars['pagination'] + */ + +$offset = $vars['offset']; +$limit = $vars['limit']; +$count = $vars['count']; +$annotations = $vars['annotations']; +$pagination = elgg_get_array_value('pagination', $vars, true); + +$html = ""; +$nav = ""; + +if ($pagination) { + $nav .= elgg_view('navigation/pagination', array( + 'baseurl' => $_SERVER['REQUEST_URI'], + 'offset' => $offset, + 'count' => $count, + 'limit' => $limit, + 'word' => 'annoff', + 'nonefound' => false, + )); +} + +if (is_array($annotations) && count($annotations) > 0) { + $html .= '<ul class="elgg-annotation-list elgg-list">'; + foreach ($annotations as $annotation) { + $html .= '<li>'; + $html .= elgg_view_annotation($annotation, true); + $html .= '</li>'; + } + $html .= '</ul>'; +} + +if ($count) { + $html .= $nav; +} + +echo $html; |