aboutsummaryrefslogtreecommitdiff
path: root/views/default/friends/collections.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-24 15:48:42 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-24 15:48:42 +0000
commit2b74ad2a779fc787644eb42ac4c0d072e3ae2c46 (patch)
tree36ba49eed80b6a9a96bf9562b249a10758597f45 /views/default/friends/collections.php
parentbcbdc8a7eda9a36166075ea7a07c99fadcab2b81 (diff)
downloadelgg-2b74ad2a779fc787644eb42ac4c0d072e3ae2c46.tar.gz
elgg-2b74ad2a779fc787644eb42ac4c0d072e3ae2c46.tar.bz2
Introducing the (still issue-packed) friend picker.
git-svn-id: https://code.elgg.org/elgg/trunk@1511 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/friends/collections.php')
-rw-r--r--views/default/friends/collections.php59
1 files changed, 59 insertions, 0 deletions
diff --git a/views/default/friends/collections.php b/views/default/friends/collections.php
new file mode 100644
index 000000000..a98e80c3a
--- /dev/null
+++ b/views/default/friends/collections.php
@@ -0,0 +1,59 @@
+<?php
+
+ /**
+ * Elgg friends collections
+ * Lists a user's friends collections
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ *
+ * @uses $vars['collections'] The array of friends collections
+ */
+
+ if (is_array($vars['collections']) && sizeof($vars['collections'])) {
+
+ echo "<div class=\"expandall\"><p>expand all</p></div>";
+ echo "<ul id=\"friends_collections_accordian\">";
+
+ foreach($vars['collections'] as $collection) {
+
+ echo elgg_view('friends/collection',array('collection' => $collection));
+
+ }
+
+ echo "</ul>";
+
+ } else {
+
+ echo elgg_echo("friends:nocollections");
+
+ }
+
+?>
+
+<script>
+$(document).ready(function(){
+
+$('#friends_collections_accordian h2').click(function () {
+ $(this.parentNode).children("[class=friends_picker]").slideToggle("fast");
+ return false;
+});
+
+// global more info expand all/close all
+$('div.expandall p').click(function () {
+ if (this.innerHTML == 'close all') {
+ $('div.friends_picker').slideUp("fast");
+ $('div.expandall p').html('expand all');
+}
+else {
+ $('div.friends_picker:hidden').slideDown("fast");
+ $('div.expandall p').html('close all');
+ }
+});
+
+});
+</script> \ No newline at end of file