aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-06 12:36:36 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-06 12:36:36 +0000
commit194f8a8cd2abe610689802e617f6a9da878c56d4 (patch)
tree30414e123aa486654270d455530efdb680e843b4 /mod
parent310ae3895a9aa4ac1b11e513d45a7745d2a48399 (diff)
downloadelgg-194f8a8cd2abe610689802e617f6a9da878c56d4.tar.gz
elgg-194f8a8cd2abe610689802e617f6a9da878c56d4.tar.bz2
Friends collections work
git-svn-id: https://code.elgg.org/elgg/trunk@2665 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/notifications/languages/en.php1
-rw-r--r--mod/notifications/views/default/notifications/subscriptions/collections.php22
-rw-r--r--mod/notifications/views/default/notifications/subscriptions/form.php4
-rw-r--r--mod/notifications/views/default/notifications/subscriptions/forminternals.php3
-rw-r--r--mod/notifications/views/default/notifications/subscriptions/personal.php4
5 files changed, 27 insertions, 7 deletions
diff --git a/mod/notifications/languages/en.php b/mod/notifications/languages/en.php
index 57fbdbff3..1f43c31de 100644
--- a/mod/notifications/languages/en.php
+++ b/mod/notifications/languages/en.php
@@ -11,6 +11,7 @@
'notifications:subscriptions:changesettings' => 'Notifications',
'notification:method:email' => 'Email',
+ 'notifications:subscriptions:title' => 'Notifications per user',
'notifications:subscriptions:description' => 'To receive notifications from your friends when they create new content, find them below and select the notification method you would like to use.',
'notifications:subscriptions:success' => 'Your subscription settings have been saved.',
diff --git a/mod/notifications/views/default/notifications/subscriptions/collections.php b/mod/notifications/views/default/notifications/subscriptions/collections.php
index 8cac8cf12..2ded67aee 100644
--- a/mod/notifications/views/default/notifications/subscriptions/collections.php
+++ b/mod/notifications/views/default/notifications/subscriptions/collections.php
@@ -3,9 +3,21 @@
if ($collections = get_user_access_collections($vars['user']->guid)) {
global $NOTIFICATION_HANDLERS;
?>
-<p>
+
+<script type="text/javascript">
+
+ function setCollection(members, method, id) {
+ for ( var i in members ) {
+ var checked = $('#' + method + 'collections' + id).children("INPUT[type='checkbox']").attr('checked');
+ $("#"+method+members[i]).children("INPUT[type='checkbox']").attr('checked', checked);
+ }
+ }
+
+</script>
+
+<h3>
<?php echo elgg_echo('notifications:subscriptions:collections:title'); ?>
-</p>
+</h3>
<div class="notification_personal">
<p>
<?php echo elgg_echo('notifications:subscriptions:collections:description'); ?>
@@ -29,6 +41,8 @@
<?php
foreach($collections as $collection) {
+ $members = get_members_of_access_collection($collection->id, true);
+ $members = implode(',',$members);
?>
<tr>
@@ -58,8 +72,8 @@
if ($i > 0) $fields .= "<td class=\"spacercolumn\">&nbsp;</td>";
$fields .= <<< END
<td class="{$method}togglefield">
- <a href="#" border="0" id="{$method}collections" class="{$method}toggleOff" onclick="adjust{$method}_alt('{$method}collections');">
- <input type="checkbox" name="{$method}collections[]" id="{$method}checkbox" onclick="adjust{$method}('{$method}collections');" value="{$collection->id}" {$collectionschecked[$method]} /></a></td>
+ <a href="#" border="0" id="{$method}collections{$collection->id}" class="{$method}toggleOff" onclick="adjust{$method}_alt('{$method}collections{$collection->id}'); setCollection([{$members}],'{$method}',{$collection->id});">
+ <input type="checkbox" name="{$method}collections[]" id="{$method}checkbox" onclick="adjust{$method}('{$method}collections{$collection->id}');" value="{$collection->id}" {$collectionschecked[$method]} /></a></td>
END;
$i++;
}
diff --git a/mod/notifications/views/default/notifications/subscriptions/form.php b/mod/notifications/views/default/notifications/subscriptions/form.php
index a81f4290b..ccae930fc 100644
--- a/mod/notifications/views/default/notifications/subscriptions/form.php
+++ b/mod/notifications/views/default/notifications/subscriptions/form.php
@@ -17,7 +17,8 @@
echo elgg_view('subscriptions/form/additions',$vars);
// Display a description
-?>
+?>
+<div class="settings_form">
<div class="notification_methods">
<?php
@@ -30,4 +31,5 @@
));
?>
+</div>
</div> \ No newline at end of file
diff --git a/mod/notifications/views/default/notifications/subscriptions/forminternals.php b/mod/notifications/views/default/notifications/subscriptions/forminternals.php
index e73dc5f3e..fa00059b9 100644
--- a/mod/notifications/views/default/notifications/subscriptions/forminternals.php
+++ b/mod/notifications/views/default/notifications/subscriptions/forminternals.php
@@ -1,3 +1,6 @@
+ <h3>
+ <?php echo elgg_echo('notifications:subscriptions:title'); ?>
+ </h3>
<p class="notification_methods_intro">
<?php echo elgg_echo('notifications:subscriptions:description'); ?>
</p>
diff --git a/mod/notifications/views/default/notifications/subscriptions/personal.php b/mod/notifications/views/default/notifications/subscriptions/personal.php
index 6c8069bd3..56984929e 100644
--- a/mod/notifications/views/default/notifications/subscriptions/personal.php
+++ b/mod/notifications/views/default/notifications/subscriptions/personal.php
@@ -5,9 +5,9 @@
?>
<div class="notification_personal">
<div class="notification_methods">
- <p class="notification_methods_intro">
+ <h3>
<?php echo elgg_echo('notifications:subscriptions:personal:title'); ?>
- </p>
+ </h3>
</div>
<table id="notificationstable" cellspacing="0" cellpadding="4" border="1" width="100%">
<tr>