diff options
Diffstat (limited to 'views/default/friends')
| -rw-r--r-- | views/default/friends/collection.php | 46 | ||||
| -rw-r--r-- | views/default/friends/collections.php | 59 | ||||
| -rw-r--r-- | views/default/friends/list.php | 27 | ||||
| -rw-r--r-- | views/default/friends/picker.php | 169 |
4 files changed, 0 insertions, 301 deletions
diff --git a/views/default/friends/collection.php b/views/default/friends/collection.php deleted file mode 100644 index b42b4467a..000000000 --- a/views/default/friends/collection.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php
-
- /**
- * Elgg friends collection
- * Lists one of 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/
- *
- * @see collections.php
- *
- * @uses $vars['collection'] The individual friends collection
- */
-
- $coll = $vars['collection'];
-
- if (is_array($vars['collection']->entities)) {
- $count = sizeof($vars['collection']->members);
- } else {
- $count = 0;
- }
-
- echo "<li><h2>";
-
- //as collections are private, check that the logged in user is the owner
- if($coll->owner_guid == $_SESSION['user']->getGUID())
- echo "<div class=\"friends_collections_controls\"> (<a href=\"" . $vars['url'] . "mod/friends/edit.php?collection={$coll->id}\">" . elgg_echo('edit') . "</a>) (<a href=\"" . $vars['url'] . "action/friends/deletecollection?collection={$coll->id}\">" . elgg_echo('delete') . "</a>)";
-
- echo "</div>";
- echo $coll->name;
- echo " ({$count}) </h2>";
-
- // Ben - this is where the friends picker view needs to go
- if($friends = $vars['collection']->entities){
- $members = $vars['collection']->members;
- echo elgg_view('friends/picker',array('entities' => $friends, 'value' => $members));
- }
-
- // close friends_picker div and the accordian list item
- echo "</li>";
-
-?>
\ No newline at end of file diff --git a/views/default/friends/collections.php b/views/default/friends/collections.php deleted file mode 100644 index a98e80c3a..000000000 --- a/views/default/friends/collections.php +++ /dev/null @@ -1,59 +0,0 @@ -<?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 diff --git a/views/default/friends/list.php b/views/default/friends/list.php deleted file mode 100644 index d45a3f374..000000000 --- a/views/default/friends/list.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php
-
- /**
- * Elgg friends list
- * Lists a user's friends
- *
- * @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['friends'] The array of ElggUser objects
- */
-
- if (is_array($vars['friends']) && sizeof($vars['friends']) > 0) {
-
- foreach($vars['friends'] as $friend) {
-
- echo elgg_view_entity($friend);
-
- }
-
- }
-
-?>
\ No newline at end of file diff --git a/views/default/friends/picker.php b/views/default/friends/picker.php deleted file mode 100644 index 7a0c57c12..000000000 --- a/views/default/friends/picker.php +++ /dev/null @@ -1,169 +0,0 @@ -<?php - - /** - * Elgg friends picker - * Lists the friends picker - * - * @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['entities'] The array of ElggUser objects - */ - - // Initialise internalname - if (!isset($vars['internalname'])) { - $internalname = "friend"; - } else { - $internalname = $vars['internalname']; - } - - // Initialise values - if (!isset($vars['value'])) { - $vars['value'] = array(); - } else { - if (!is_array($vars['value'])) { - $vars['value'] = (int) $vars['value']; - $vars['value'] = array($vars['value']); - } - } - - // We need to count the number of friends pickers on the page. - global $friendspicker; - if (!isset($friendspicker)) $friendspicker = 0; - $friendspicker++; - - $users = array(); - $activeletters = array(); - - // Sort users by letter - if (is_array($vars['entities']) && sizeof($vars['entities'])) - foreach($vars['entities'] as $user) { - - $letter = strtoupper(substr($user->name,0,1)); - if ($letter >= "0" && $letter <= "9") { - $letter = "0"; - } - if (!isset($users[$letter])) { - $users[$letter] = array(); - } - $users[$letter][$user->name] = $user; - - } - -?> - -<div class="friends_picker"> - <div class="friendsPicker_wrapper"> - <div id="friendsPicker<?php echo $friendspicker; ?>"> - <div class="friendsPicker_container"> -<?php - - // Initialise letters - $letter = 'A'; - while (1 == 1) { -?> - <div class="panel" title="<?php echo $letter; ?>"> - <div class="wrapper"> - <h3><?php echo $letter; ?></h3> - -<?php - - if (isset($users[$letter])) { - ksort($users[$letter]); - - echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"; - $col = 0; - - foreach($users[$letter] as $friend) { - if ($col == 0) echo "<tr>"; - - //echo "<p>" . $user->name . "</p>"; - $label = elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny')); - $options[$label] = $friend->getGUID(); - if (in_array($friend->getGUID(),$vars['value'])) { - $checked = "checked = \"checked\""; - if (!in_array($letter,$activeletters)) - $activeletters[] = $letter; - } else { - $checked = ""; - } - -?> - - <td> - - <input type="checkbox" <?php echo $checked; ?> name="<?php echo $internalname; ?>[]" value="<?php echo $options[$label]; ?>" /> - - </td> - - <td > - - <div style="width: 25px; margin-bottom: 15px;"> -<?php - - echo $label; - -?> - </div> - </td> - <td style="width: 300px; padding: 5px;"> -<?php - - echo $friend->name; - -?> - </td> -<?php - - $col++; - if ($col == 3) echo "</tr>"; - } - if ($col < 3) echo "</tr>"; - - echo "</table>"; - - } - -?> - - </div> - </div> -<?php - if ($letter == 'Z') break; - $letter++; - } - -?> - </div> - </div> - </div> -</div> - -<script type="text/javascript"> - //jQuery(window).bind("load", function() { - $(document).ready(function () { - // initialise picker - $("div#friendsPicker<?php echo $friendspicker; ?>").friendsPicker(); - }); -</script> -<script> - //jQuery(window).bind("load", function() { - $(document).ready(function () { - // manually add class to corresponding tab for panels that have content - needs to be automated eventually -<?php - if (sizeof($activeletters) > 0) - $chararray = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; - foreach($activeletters as $letter) { - $tab = strpos($chararray, $letter) + 1; -?> - $("div#friendsPickerNavigation<?php echo $friendspicker - 1; ?> li.tab<?php echo $tab; ?> a").addClass("tabHasContent"); -<?php - } - -?> - }); -</script>
\ No newline at end of file |
