diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-18 18:37:32 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-18 18:37:32 +0000 |
commit | dd09373e0cefa8d33d0e9faa741593802d53c2a7 (patch) | |
tree | ebf986bfabd17bfd5adb3b560e762b83f0a8b825 /views/default/layout/objects/list.php | |
parent | 067c53f2575b96573b3c6966747bb0426669ae02 (diff) | |
download | elgg-dd09373e0cefa8d33d0e9faa741593802d53c2a7.tar.gz elgg-dd09373e0cefa8d33d0e9faa741593802d53c2a7.tar.bz2 |
Refs #2950: layout/objects => page/components
git-svn-id: http://code.elgg.org/elgg/trunk@8288 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/layout/objects/list.php')
-rw-r--r-- | views/default/layout/objects/list.php | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/views/default/layout/objects/list.php b/views/default/layout/objects/list.php deleted file mode 100644 index 374922ecd..000000000 --- a/views/default/layout/objects/list.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php -/** - * View a list of items - * - * @package Elgg - * - * @uses $vars['items'] Array of ElggEntity or ElggAnnotation objects - * @uses $vars['offset'] Index of the first list item in complete list - * @uses $vars['limit'] Number of items per page - * @uses $vars['count'] Number of items in the complete list - * @uses $vars['base_url'] Base URL of list (optional) - * @uses $vars['pagination'] Show pagination? (default: true) - * @uses $vars['position'] Position of the pagination: before, after, or both - * @uses $vars['full_view'] Show the full view of the items (default: false) - * @uses $vars['list_class'] Additional CSS class for the <ul> element - * @uses $vars['item_class'] Additional CSS class for the <li> elements - */ - -$items = $vars['items']; -$offset = $vars['offset']; -$limit = $vars['limit']; -$count = $vars['count']; -$base_url = $vars['base_url']; -$pagination = elgg_extract('pagination', $vars, true); -$full_view = elgg_extract('full_view', $vars, false); -$offset_key = elgg_extract('offset_key', $vars, 'offset'); -$position = elgg_extract('position', $vars, 'after'); - -$list_class = 'elgg-list'; -if (isset($vars['list_class'])) { - $list_class = "{$vars['list_class']} $list_class"; -} - -$item_class = 'elgg-list-item'; -if (isset($vars['item_class'])) { - $item_class = "{$vars['item_class']} $item_class"; -} - -$html = ""; -$nav = ""; - -if ($pagination && $count) { - $nav .= elgg_view('navigation/pagination', array( - 'baseurl' => $base_url, - 'offset' => $offset, - 'count' => $count, - 'limit' => $limit, - 'offset_key' => $offset_key, - )); -} - -if (is_array($items) && count($items) > 0) { - $html .= "<ul class=\"$list_class\">"; - foreach ($items as $item) { - if (elgg_instanceof($item)) { - $id = "elgg-{$item->getType()}-{$item->getGUID()}"; - } else { - $id = "item-{$item->getType()}-{$item->id}"; - } - $html .= "<li id=\"$id\" class=\"$item_class\">"; - $html .= elgg_view_list_item($item, $full_view, $vars); - $html .= '</li>'; - } - $html .= '</ul>'; -} - -if ($position == 'before' || $position == 'both') { - $html = $nav . $html; -} - -if ($position == 'after' || $position == 'both') { - $html .= $nav; -} - -echo $html; |