]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Updated Notifications to new UI.
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 15 Mar 2010 10:56:29 +0000 (10:56 +0000)
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 15 Mar 2010 10:56:29 +0000 (10:56 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@5387 36083f99-b078-4883-b0ff-0f9b5a30f544

12 files changed:
mod/notifications/graphics/icon_notifications_site.gif [new file with mode: 0644]
mod/notifications/groups.php
mod/notifications/index.php
mod/notifications/languages/en.php
mod/notifications/views/default/notifications/css.php
mod/notifications/views/default/notifications/settings/usersettings.php [deleted file]
mod/notifications/views/default/notifications/subscriptions/collections.php
mod/notifications/views/default/notifications/subscriptions/form.php
mod/notifications/views/default/notifications/subscriptions/forminternals.php
mod/notifications/views/default/notifications/subscriptions/groupsform.php
mod/notifications/views/default/notifications/subscriptions/personal.php
views/default/css.php

diff --git a/mod/notifications/graphics/icon_notifications_site.gif b/mod/notifications/graphics/icon_notifications_site.gif
new file mode 100644 (file)
index 0000000..d12ca08
Binary files /dev/null and b/mod/notifications/graphics/icon_notifications_site.gif differ
index a425845cf1d529c6d53480dff12ed0dea63415af..c742f858daeea615b5a8b1a8ace351d682e3e808 100644 (file)
@@ -34,7 +34,7 @@
                ));
                
        // Insert it into the correct canvas layout
-               $body = elgg_view_layout('two_column_left_sidebar','',$body);
+               $body = elgg_view_layout('one_column_with_sidebar', $body);
                
        // Draw the page
                page_draw(elgg_echo('notifications:subscriptions:changesettings:groups'),$body);
index 79365842ca22e1711f81e039ad64e5ee59b93f33..47e4baad99d995379b472511111d1e5a80ca69fb 100644 (file)
@@ -31,7 +31,7 @@
                                                ));
                
        // Insert it into the correct canvas layout
-               $body = elgg_view_layout('two_column_left_sidebar','',$body);
+               $body = elgg_view_layout('one_column_with_sidebar', $body);
                
        // Draw the page
                page_draw(elgg_echo('notifications:subscriptions:changesettings'),$body);
index 05c7da86a7f0525d7501e9378848eefe059ef204..8573bbb3208c1388179e6aa418e14c02599b2986 100644 (file)
@@ -7,18 +7,18 @@
                'notifications:subscriptions:personal:description' => 'Receive notifications when actions are performed on your content',
                'notifications:subscriptions:personal:title' => 'Personal notifications',
        
-               'notifications:subscriptions:collections:title' => 'Toggle friends collections',
-               'notifications:subscriptions:collections:description' => 'To toggle settings for members of your friends collections, use the icons below. This will affect the corresponding users in the main notification settings panel at the bottom of the page. ',
-               'notifications:subscriptions:collections:edit' => 'To edit your friends collections, click here.',
+               'notifications:subscriptions:collections:title' => 'Friends',
+               'notifications:subscriptions:collections:description' => 'The following is an automatic collection made up of your friends. To receive updates select below. This will affect the corresponding users in the main notification settings panel at the bottom of the page. ',
+               'notifications:subscriptions:collections:edit' => 'To edit your shared access notifications, click here.',
        
                'notifications:subscriptions:changesettings' => 'Notifications',
                'notifications:subscriptions:changesettings:groups' => 'Group 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:description' => 'To receive notifications from your friends (on an individual basis) when they create new content, find them below and select the notification method you would like to use.',
        
-               'notifications:subscriptions:groups:description' => 'To receive notifications when new content is added to a group you are a member of, find it below and select the notification method you would like to use.',
+               'notifications:subscriptions:groups:description' => 'To receive notifications when new content is added to a group you are a member of, find it below and select the notification method(s) you would like to use.',
        
                'notifications:subscriptions:success' => 'Your notifications settings have been saved.',
        
index 5c855d84295718416b41d551189a337899615960..bd6067c85d924d694c6b72cea745186e7e32ccea 100644 (file)
@@ -1,15 +1,13 @@
 <?php
-
-       /**
-        * Elgg notifications CSS
-        * 
-        * @package notifications
-        * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
-        * @author Curverider <info@elgg.com>
-        * @copyright Curverider Ltd 2008-2010
-        * @link http://elgg.org/
-        */
-
+/**
+ * Elgg notifications CSS
+ * 
+ * @package notifications
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.org/
+ */
 ?>
 
 #notificationstable td.namefield {
        line-height: 1.1em;
        padding:5px 0 5px 0;
 }
-#notificationstable td.namefield img {
-       padding:6px 10px 6px 3px;
-       float:left;
-}
 #notificationstable td.namefield p.namefieldlink {
-       margin:9px 0 0 0;
+       margin:5px 0 0 0;
+}
+#notificationstable td.namefield a img {
+       float:left;
+       width:25px;
+       height:25px; 
+       margin:5px 10px 5px 5px;
 }
 #notificationstable td.emailtogglefield,
 #notificationstable td.smstogglefield {
        display: block;
        outline: none;
 }
+#notificationstable td.sitetogglefield {
+       width:50px;
+       text-align: center;
+       vertical-align: middle;
+}
+#notificationstable td.sitetogglefield input {
+       margin-right:36px;
+       margin-top:5px;
+}
+#notificationstable td.sitetogglefield a {
+       width:46px;
+       height:24px;
+       cursor: pointer;
+       display: block;
+       outline: none;
+}
 #notificationstable td.emailtogglefield a.emailtoggleOff {
        background: url(<?php echo $vars['url']; ?>mod/notifications/graphics/icon_notifications_email.gif) no-repeat right 2px;
 }
 #notificationstable td.emailtogglefield a.emailtoggleOn {
        background: url(<?php echo $vars['url']; ?>mod/notifications/graphics/icon_notifications_email.gif) no-repeat right -36px;
 }
-
-.notification_collections,
-.notification_personal {
-       margin-bottom: 25px;
+#notificationstable td.sitetogglefield a.sitetoggleOff {
+       background: url(<?php echo $vars['url']; ?>mod/notifications/graphics/icon_notifications_site.gif) no-repeat right 2px;
 }
-/*
-.settings_form .friends_picker_container h3 {
-       color:#999999;
-       font-size:3em;
-       margin:0 0 20px;
-       text-align:left;
-       background: none;
-       border-bottom: none;
+#notificationstable td.sitetogglefield a.sitetoggleOn {
+       background: url(<?php echo $vars['url']; ?>mod/notifications/graphics/icon_notifications_site.gif) no-repeat right -37px;
+}
+.notification_friends,
+.notification_personal,
+.notifications_per_user {
+       margin-bottom: 25px;
 }
-*/
 
 
 
diff --git a/mod/notifications/views/default/notifications/settings/usersettings.php b/mod/notifications/views/default/notifications/settings/usersettings.php
deleted file mode 100644 (file)
index 15c5adc..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-
-?>
\ No newline at end of file
index 8fe49e672bb3b3fbf76840c1ea3cdef0b573567b..87906bf767ba5e684a32a4e39afd625f539e39bd 100644 (file)
        }
        
 </script>
-
+<div class="notification_friends">
 <h3>
        <?php echo elgg_echo('notifications:subscriptions:collections:title'); ?>
 </h3>
-<div class="notification_personal">
-<p>
+<p class="margin_none">
        <?php echo elgg_echo('notifications:subscriptions:collections:description'); ?>
-       <a href="<?php echo $vars['url']; ?>pg/collections/<?php echo $vars['user']->username; ?>"><?php echo elgg_echo('notifications:subscriptions:collections:edit') ?></a>
 </p>
-<table id="notificationstable" cellspacing="0" cellpadding="4" border="1" width="100%">
+<table id="notificationstable" cellspacing="0" cellpadding="4" border="0" width="100%">
   <tr>
     <td>&nbsp;</td>
 <?php
@@ -30,7 +28,7 @@
        global $NOTIFICATION_HANDLERS;
        foreach($NOTIFICATION_HANDLERS as $method => $foo) {
                if ($i > 0)
-                       echo "<td class=\"spacercolumn\">&nbsp;</td>";
+                       echo "<td class='spacercolumn'>&nbsp;</td>";
 ?>
        <td class="<?php echo $method; ?>togglefield"><?php echo elgg_echo('notification:method:'.$method); ?></td>
 <?php
@@ -71,7 +69,7 @@
                                        $collectionschecked[$method] = '';
                                }
                        }
-                       if ($i > 0) $fields .= "<td class=\"spacercolumn\">&nbsp;</td>";
+                       if ($i > 0) $fields .= "<td class='spacercolumn'>&nbsp;</td>";
                        $fields .= <<< END
                            <td class="{$method}togglefield">
                            <a border="0" id="{$method}collections-1" class="{$method}toggleOff" onclick="adjust{$method}_alt('{$method}collections-1'); setCollection([{$members}],'{$method}',-1);">
@@ -85,7 +83,10 @@ END;
        <td>&nbsp;</td>
   </tr>
 <?php
-
+/*
+       @todo
+       collections removed from notifications - they are no longer used and will be replaced with shared access collections
+       
        if ($collections = get_user_access_collections($vars['user']->guid)) {
        foreach($collections as $collection) {
                $members = get_members_of_access_collection($collection->id, true);
@@ -117,7 +118,7 @@ END;
                                        $collectionschecked[$method] = '';
                                }
                        }
-                       if ($i > 0) $fields .= "<td class=\"spacercolumn\">&nbsp;</td>";
+                       if ($i > 0) $fields .= "<td class='spacercolumn'>&nbsp;</td>";
                        $fields .= <<< END
                            <td class="{$method}togglefield">
                            <a border="0" id="{$method}collections{$collection->id}" class="{$method}toggleOff" onclick="adjust{$method}_alt('{$method}collections{$collection->id}'); setCollection([{$members}],'{$method}',{$collection->id});">
@@ -136,6 +137,7 @@ END;
        }
 }
 
+*/
 ?>
 </table>
 </div>
index d96d6b7a73e6d67c0fd89c1e88684ef5b4ae07ee..8ad0110bf0b883f4be62b443c034675fddbefc06 100644 (file)
@@ -18,8 +18,7 @@
                
        // Display a description
 ?>
-<div class="contentWrapper">
-<div class="notification_methods">
+<div class="user_settings notifications">
 <?php
 
        echo elgg_view('input/form',array(
@@ -32,4 +31,3 @@
 
 ?>
 </div>
-</div>
\ No newline at end of file
index 9030d20a8f4b98d88eabffc591731e104ebdba39..97fe77cac329d4fe6d91cbff45d0f81db9803df2 100644 (file)
@@ -1,7 +1,9 @@
+
+<div class="notifications_per_user">
        <h3>
                <?php echo elgg_echo('notifications:subscriptions:title'); ?>
        </h3>
-       <p class="notification_methods_intro">
+       <p>
                <?php echo elgg_echo('notifications:subscriptions:description'); ?>
        </p>
 <?php
                                ksort($users[$letter]);
 ?>
 
-<table id="notificationstable" cellspacing="0" cellpadding="4" border="1" width="100%">
+<table id="notificationstable" cellspacing="0" cellpadding="4" border="0" width="100%">
   <tr>
     <td>&nbsp;</td>
 <?php
        $i = 0; 
        foreach($NOTIFICATION_HANDLERS as $method => $foo) {
                if ($i > 0)
-                       echo "<td class=\"spacercolumn\">&nbsp;</td>";
+                       echo "<td class='spacercolumn'>&nbsp;</td>";
 ?>
        <td class="<?php echo $method; ?>togglefield"><?php echo elgg_echo('notification:method:'.$method); ?></td>
 <?php
                                        } else {
                                                $checked[$method] = '';
                                        }
-                                       if ($i > 0) $fields .= "<td class=\"spacercolumn\">&nbsp;</td>";
+                                       if ($i > 0) $fields .= "<td class='spacercolumn'>&nbsp;</td>";
                                        $fields .= <<< END
                                            <td class="{$method}togglefield">
                                            <a border="0" id="{$method}{$friend->guid}" class="{$method}toggleOff" onclick="adjust{$method}_alt('{$method}{$friend->guid}');">
@@ -303,13 +305,9 @@ END;
        }
 
 ?>
-
-
-
-<div class="clearfloat"></div>
-<div class="friendspicker_savebuttons">
+<div class="divider">
        <input type="submit" value="<?php echo elgg_echo('save'); ?>" />
-<br /></div>   
-       
+</div> 
+</div>
        
        
\ No newline at end of file
index cf7f449063dcdf77a795925633de073ea7f23bfc..4beefb94382e323f6ee7176917cbbb82dd2b4830 100644 (file)
                $subsbig[$method] = $tmparray;
        }
 
-?>
-<?php echo elgg_view_title(elgg_echo('notifications:subscriptions:changesettings:groups')); ?>
-<div class="contentWrapper">
-       <div class="notification_methods">
-
+echo elgg_view_title(elgg_echo('notifications:subscriptions:changesettings:groups')); ?>
+<div class="notification_groups margin_top">
                <?php
                        echo elgg_view('notifications/subscriptions/jsfuncs',$vars);
                ?>
@@ -33,7 +30,7 @@
                if (isset($vars['groups']) && !empty($vars['groups'])) {
                        
 ?>
-<table id="notificationstable" cellspacing="0" cellpadding="4" border="1" width="100%">
+<table id="notificationstable" cellspacing="0" cellpadding="4" border="0" width="100%">
   <tr>
     <td>&nbsp;</td>
 <?php
@@ -41,7 +38,7 @@
        $i = 0; 
        foreach($NOTIFICATION_HANDLERS as $method => $foo) {
                if ($i > 0)
-                       echo "<td class=\"spacercolumn\">&nbsp;</td>";
+                       echo "<td class='spacercolumn'>&nbsp;</td>";
 ?>
        <td class="<?php echo $method; ?>togglefield"><?php echo elgg_echo('notification:method:'.$method); ?></td>
 <?php
@@ -95,5 +92,4 @@ END;
 ?>
 
                <input type="submit" value="<?php echo elgg_echo('save'); ?>" />
-       </div>
 </div>
\ No newline at end of file
index 6779fde73ef318ab2afe1bc3c072e660db027f46..d8ce0e97ead3f15b7091ac17ae1931bbc1b2f0ad 100644 (file)
@@ -9,14 +9,14 @@
                <?php echo elgg_echo('notifications:subscriptions:personal:title'); ?>
        </h3>
 </div>
-<table id="notificationstable" cellspacing="0" cellpadding="4" border="1" width="100%">
+<table id="notificationstable" cellspacing="0" cellpadding="4" border="0" width="100%">
   <tr>
     <td>&nbsp;</td>
 <?php
        $i = 0; 
        foreach($NOTIFICATION_HANDLERS as $method => $foo) {
                if ($i > 0)
-                       echo "<td class=\"spacercolumn\">&nbsp;</td>";
+                       echo "<td class='spacercolumn'>&nbsp;</td>";
 ?>
        <td class="<?php echo $method; ?>togglefield"><?php echo elgg_echo('notification:method:'.$method); ?></td>
 <?php
@@ -45,7 +45,7 @@
                                        $personalchecked[$method] = '';
                                }
                        }
-                       if ($i > 0) $fields .= "<td class=\"spacercolumn\">&nbsp;</td>";
+                       if ($i > 0) $fields .= "<td class='spacercolumn'>&nbsp;</td>";
                        $fields .= <<< END
                            <td class="{$method}togglefield">
                            <a  border="0" id="{$method}personal" class="{$method}toggleOff" onclick="adjust{$method}_alt('{$method}personal');">
index b323a9902a29cf5324e5f8441fc9320e818460c4..660b0ab53763cf1380f10812061bbdcc52a15464 100644 (file)
@@ -206,6 +206,9 @@ h2 {
        -webkit-border-radius: 8px; 
        -moz-border-radius: 8px;
 }
+.margin_none {
+       margin:0;
+}
 .margin_top {
        margin-top:10px;
 }