diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-15 12:56:01 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-15 12:56:01 +0000 |
commit | a6eb3bf8d0f49e9b20fa8153ddca7b9d551f950d (patch) | |
tree | a435afa05cab8bf2ea5d7e4b785f018e695f1869 /views/default/core/friends/collectiontabs.php | |
parent | 2165e929ddf954f02a589234b2e0faef7ef18df7 (diff) | |
download | elgg-a6eb3bf8d0f49e9b20fa8153ddca7b9d551f950d.tar.gz elgg-a6eb3bf8d0f49e9b20fa8153ddca7b9d551f950d.tar.bz2 |
moving friends views into core
git-svn-id: http://code.elgg.org/elgg/trunk@7633 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/core/friends/collectiontabs.php')
-rw-r--r-- | views/default/core/friends/collectiontabs.php | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/views/default/core/friends/collectiontabs.php b/views/default/core/friends/collectiontabs.php new file mode 100644 index 000000000..6aef4bf1e --- /dev/null +++ b/views/default/core/friends/collectiontabs.php @@ -0,0 +1,57 @@ +<?php +/** + * Elgg friends collections + * Lists a user's friends collections + * + * @package Elgg + * @subpackage Core + * + * @uses $vars['collections'] The array of friends collections + */ + +$friendspicker = $vars['friendspicker']; + +$collectionid = $vars['collection']->id; +$ownerid = $vars['owner']->getGUID(); + +?> + +<div id="elgg-horizontal-tabbed-nav"> +<ul> +<li class="selected"><a href="#" class="collectionmembers<?php echo $friendspicker; ?>"><?php echo elgg_echo('friends:collections:members'); ?></a></li> + +<li><a href="#" class="editmembers<?php echo $friendspicker; ?>"><?php echo elgg_echo('friends:collections:edit'); ?></a></li> + +</ul> +</div> + +<script type="text/javascript"> +$(document).ready(function () { + + $('a.collectionmembers<?php echo $friendspicker; ?>').click(function () { + // load collection members pane + $('#friends-picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo elgg_get_site_url(); ?>pages/friends/pickercallback.php?username=<?php echo get_loggedin_user()->username; ?>&type=list&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $friendspicker; ?>'); + + // remove selected state from previous tab + $(this).parent().parent().find("li.selected").removeClass("selected"); + // add selected class to current tab + $(this).parent().addClass("selected"); + + return false; + }); + + $('a.editmembers<?php echo $friendspicker; ?>').click(function () { + // load friends picker pane + $('#friends-picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo elgg_get_site_url(); ?>pages/friends/pickercallback.php?username=<?php echo get_loggedin_user()->username; ?>&type=picker&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $friendspicker; ?>'); + + // remove selected state from previous tab + $(this).parent().parent().find("li.selected").removeClass("selected"); + // add selected class to current tab + $(this).parent().addClass("selected"); + + return false; + }); + + +}); +</script> |