aboutsummaryrefslogtreecommitdiff
path: root/views/default/core/friends/collections.php
blob: 5c1c824e7ce5d8d1801f7e9dd2051b51a664c088 (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
<?php
/**
 * Elgg friends collections
 * Lists a user's friends collections
 *
 * @package Elgg
 * @subpackage Core
 *
 * @uses $vars['collections'] The array of friends collections
 */

if (is_array($vars['collections']) && sizeof($vars['collections'])) {
	echo "<ul id=\"friends_collections_accordian\">";

	$friendspicker = 0;
	foreach ($vars['collections'] as $collection) {
		$friendspicker++;
		echo elgg_view('core/friends/collection', array(
			'collection' => $collection,
			'friendspicker' => $friendspicker,
		));
	}

	echo "</ul>";

} else {
	echo elgg_echo("friends:nocollections");
}

?>
<?php //@todo JS 1.8: no ?>
<script>
$(document).ready(function(){
	$('#friends_collections_accordian h2').click(function () {
		$(this.parentNode).children("[class=friends-picker]").slideToggle("fast");
		//return false;
	});
});
</script>