blob: e86b9f885b04e3b42b4d76c0fb33a39e28956f01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
<?php
/**
* Gallery view
*
* @uses $vars['items']
*/
$items = $vars['items'];
if (!is_array($items) && sizeof($items) == 0) {
return true;
}
elgg_push_context('gallery');
$offset = $vars['offset'];
$limit = $vars['limit'];
$count = $vars['count'];
$pagination = elgg_extract('pagination', $vars, true);
$offset_key = elgg_extract('offset_key', $vars, 'offset');
$position = elgg_extract('position', $vars, 'after');
if ($pagination && $count) {
$nav .= elgg_view('navigation/pagination', array(
'offset' => $offset,
'count' => $count,
'limit' => $limit,
'offset_key' => $offset_key,
));
}
if ($position == 'before' || $position == 'both') {
echo $nav;
}
?>
<ul class="elgg-gallery">
<?php
foreach ($items as $item) {
echo '<li>';
echo elgg_view_list_item($item, $vars);
echo "</li>";
}
?>
</ul>
<?php
if ($position == 'after' || $position == 'both') {
echo $nav;
}
elgg_pop_context();
|