aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/default/friends/collection.php2
-rw-r--r--views/default/friends/collectiontabs.php21
-rw-r--r--views/default/friends/picker.php2
3 files changed, 21 insertions, 4 deletions
diff --git a/views/default/friends/collection.php b/views/default/friends/collection.php
index b4f015f16..0d6f2b059 100644
--- a/views/default/friends/collection.php
+++ b/views/default/friends/collection.php
@@ -38,7 +38,7 @@
if($friends = $vars['collection']->entities){
$members = $vars['collection']->members;
$content = elgg_view('friends/tablelist',array('entities' => $members));
- $content .= elgg_view('friends/collectiontabs');
+ $content .= elgg_view('friends/collectiontabs', array('members' => $members, 'friends' => $friends, 'collection' => $vars['collection']));
echo elgg_view('friends/picker',array('entities' => $friends, 'value' => $members, 'content' => $content));
}
diff --git a/views/default/friends/collectiontabs.php b/views/default/friends/collectiontabs.php
index fabd9857b..1e417017f 100644
--- a/views/default/friends/collectiontabs.php
+++ b/views/default/friends/collectiontabs.php
@@ -1,10 +1,27 @@
<?php
+ global $friendspicker;
+ if (!isset($friendspicker)) $friendspicker = 0;
+
+ if (isset($vars['members'])) {
+ $members = implode(',',$vars['members']);
+ } else {
+ $members = "";
+ }
+
+ $friends = "";
+ if (isset($vars['friends'])) {
+ foreach($friends as $friend) {
+ if (!empty($friends)) $friends .= ",";
+ $friends .= $friend->getGUID();
+ }
+ }
+
?>
<div id="friendsPickerNavigationTabs">
<ul>
-<li class="selected"><a href="#">Collection members</a></li>
-<li><a href="#">Edit collection</a></li>
+<li class="selected"><a href='#' onclick='$("#friends_picker_placeholder<?php echo $friendspicker + 1; ?>").load("<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=list&members=<?php echo $members; ?>"); return false;'>Collection members</a></li>
+<li><a href="#" onclick='$("#friends_picker_placeholder<?php echo $friendspicker + 1; ?>").load("<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=picker&members=<?php echo $members; ?>&friends=<?php echo $friends; ?>"); return false;'>Edit collection</a></li>
</ul>
</div> \ No newline at end of file
diff --git a/views/default/friends/picker.php b/views/default/friends/picker.php
index ca95c22bd..329264f13 100644
--- a/views/default/friends/picker.php
+++ b/views/default/friends/picker.php
@@ -74,7 +74,7 @@
?>
- <div class="friends_picker_placeholder<?php echo $friendspicker; ?>">
+ <div id="friends_picker_placeholder<?php echo $friendspicker; ?>">
<?php