Elgg  Version 1.9
collectiontabs.php
Go to the documentation of this file.
1 <?php
12 $friendspicker = $vars['friendspicker'];
13 
14 $collectionid = $vars['collection']->id;
15 $ownerid = $vars['owner']->getGUID();
16 
17 ?>
18 
19 <ul class="elgg-tabs">
20  <li class="elgg-state-selected">
21  <a href="#" class="collectionmembers<?php echo $friendspicker; ?>">
22  <?php echo elgg_echo('friends:collections:members'); ?>
23  </a>
24  </li>
25  <li>
26  <a href="#" class="editmembers<?php echo $friendspicker; ?>">
27  <?php echo elgg_echo('friends:collections:edit'); ?>
28  </a>
29  </li>
30 </ul>
31 
32 <?php //@todo JS 1.8: no ?>
33 <script type="text/javascript">
34 $(function () {
35 
36  $('a.collectionmembers<?php echo $friendspicker; ?>').click(function () {
37  // load collection members pane
38  $('#friends-picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo elgg_get_site_url(); ?>pages/friends/collections/pickercallback.php?username=<?php echo elgg_get_logged_in_user_entity()->username; ?>&type=list&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $friendspicker; ?>');
39 
40  // remove selected state from previous tab
41  $(this).parent().parent().find("li.elgg-state-selected").removeClass("elgg-state-selected");
42  // add selected class to current tab
43  $(this).parent().addClass("elgg-state-selected");
44 
45  return false;
46  });
47 
48  $('a.editmembers<?php echo $friendspicker; ?>').click(function () {
49  // load friends picker pane
50  $('#friends-picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo elgg_get_site_url(); ?>pages/friends/collections/pickercallback.php?username=<?php echo elgg_get_logged_in_user_entity()->username; ?>&type=picker&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $friendspicker; ?>');
51 
52  // remove selected state from previous tab
53  $(this).parent().parent().find("li.elgg-state-selected").removeClass("elgg-state-selected");
54  // add selected class to current tab
55  $(this).parent().addClass("elgg-state-selected");
56 
57  return false;
58  });
59 
60 
61 });
62 </script>
ul
Definition: admin.php:44
$ownerid
$collectionid
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg echo
Translates a string.
Definition: languages.js:43
function elgg combo checkbox click(function(){if($(this).is(':checked')){$(this).prev().attr('disabled', true);$(this).prev().val('');}else{$(this).prev().attr('disabled', false);}})
elgg menu user li
Definition: admin.php:203
a
Definition: admin.php:97
list style type
Definition: admin.php:724
$friendspicker
if(file_exists($welcome)) $vars
Definition: upgrade.php:93