aboutsummaryrefslogtreecommitdiff
path: root/views/default/friends
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-06-29 21:35:09 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-06-29 21:35:09 +0000
commit18124259f3ca92b8357e4b903d8133e28a7e1cc5 (patch)
tree595be1fefdc0905f7eb46465c293725a3c1e33ce /views/default/friends
parent82f85ba30f16ec6cfb8abb86a94af08f84fdf825 (diff)
downloadelgg-18124259f3ca92b8357e4b903d8133e28a7e1cc5.tar.gz
elgg-18124259f3ca92b8357e4b903d8133e28a7e1cc5.tar.bz2
Closes #1015: Added a prompt before deleting an access collection. Also cleaned up some hard vs soft tab issues.
git-svn-id: https://code.elgg.org/elgg/trunk@3363 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/friends')
-rw-r--r--views/default/friends/collection.php28
1 files changed, 15 insertions, 13 deletions
diff --git a/views/default/friends/collection.php b/views/default/friends/collection.php
index cb3e2674c..bcb127c4a 100644
--- a/views/default/friends/collection.php
+++ b/views/default/friends/collection.php
@@ -26,17 +26,19 @@
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'] . "action/friends/deletecollection?collection={$coll->id}\" class=\"delete_collection\" onclick=\"$('div.friends_picker').empty();\"> </a>";
-
+ //as collections are private, check that the logged in user is the owner
+ if($coll->owner_guid == $_SESSION['user']->getGUID()) {
+ $confirm = addslashes(elgg_echo('question:areyousure'));
+ echo "<div class=\"friends_collections_controls\"> <a href=\"" . $vars['url'] . "action/friends/deletecollection?collection={$coll->id}\" class=\"delete_collection\" onclick=\"if (!confirm('{$confirm}')) { return false; }; $('div.friends_picker').empty();\"> </a>";
+ }
+
echo "</div>";
echo $coll->name;
echo " (<span id=\"friends_membership_count{$vars['friendspicker']}\">{$count}</span>) </h2>";
-
- // individual collection panels
- if($friends = $vars['collection']->entities){
- $content = elgg_view('friends/collectiontabs', array('owner' => $_SESSION['user'], 'collection' => $vars['collection'], 'friendspicker' => $vars['friendspicker']));
+
+ // individual collection panels
+ if($friends = $vars['collection']->entities){
+ $content = elgg_view('friends/collectiontabs', array('owner' => $_SESSION['user'], 'collection' => $vars['collection'], 'friendspicker' => $vars['friendspicker']));
echo elgg_view('friends/picker',array('entities' => $friends, 'value' => $members, 'content' => $content, 'replacement' => '', 'friendspicker' => $vars['friendspicker']));
?>
@@ -45,12 +47,12 @@ $(document).ready(function () {
$('#friends_picker_placeholder<?php echo $vars['friendspicker']; ?>').load('<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=list&collection=<?php echo $vars['collection']->id; ?>');
- });
+ });
</script>
<?php
- }
-
- // close friends_picker div and the accordian list item
- echo "</li>";
+ }
+
+ // close friends_picker div and the accordian list item
+ echo "</li>";
?> \ No newline at end of file