Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
collections.php
Go to the documentation of this file.
1 <?php
12 if (is_array($vars['collections']) && sizeof($vars['collections'])) {
13  echo "<ul id=\"friends_collections_accordian\">";
14 
15  $friendspicker = 0;
16  foreach ($vars['collections'] as $collection) {
18  echo elgg_view('core/friends/collection', array(
19  'collection' => $collection,
20  'friendspicker' => $friendspicker,
21  ));
22  }
23 
24  echo "</ul>";
25 
26 } else {
27  echo elgg_echo("friends:nocollections");
28 }
29 
30 ?>
31 <?php //@todo JS 1.8: no ?>
32 <script>
33 require(['jquery'], function($) {
34  $(function () {
35  $('#friends_collections_accordian h2').on('click', function () {
36  $(this.parentNode).children("[class=friends-picker-main-wrapper]").slideToggle("fast");
37  });
38  });
39 });
40 </script>
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$collection
$vars['entity']
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:342
$friendspicker