Commit e2fbf743 authored by Evan Goldenberg's avatar Evan Goldenberg Committed by Richard Mansfield

factor out notifications into an "inbox" tab, and rename things accordingly

Having notifications under the settings tab makes little sense. This
commit makes the following changes:

    - separate site notifications into its own main nav item called
      "inbox". Everything under "settings" is now a settings page!
    - in settings, rename "activity preferences" to "notifications"
    - in settings, rename "preferences" to "account"
    - updates to help text to reflect the above
Signed-off-by: default avatarEvan Goldenberg <evang@catalyst.net.nz>
parent d506c719
......@@ -26,14 +26,14 @@
*/
define('INTERNAL', 1);
define('MENUITEM', 'settings/notifications');
define('MENUITEM', 'inbox');
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'account');
define('SECTION_PAGE', 'activity');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
require_once('pieforms/pieform.php');
define('TITLE', get_string('notifications'));
define('TITLE', get_string('inbox'));
$types = get_records_assoc('activity_type', 'admin', 0, 'plugintype,pluginname,name', 'id,name,plugintype,pluginname');
$types = array_map(create_function('$a', '
......@@ -203,7 +203,7 @@ $smarty->assign('markdel', 'markread(document.notificationlist, \'del\'); return
$smarty->assign('typechange', 'activitylist.type = this.options[this.selectedIndex].value; activitylist.doupdate();');
$smarty->assign('types', $types);
$smarty->assign('INLINEJAVASCRIPT', $javascript);
$smarty->assign('PAGEHEADING', hsc(get_string('notifications')));
$smarty->assign('PAGEHEADING', hsc(get_string('inbox')));
$smarty->assign('deleteall', $deleteall);
$smarty->display('account/activity/index.tpl');
?>
......@@ -26,13 +26,13 @@
*/
define('INTERNAL', 1);
define('MENUITEM', 'settings/activitypreferences');
define('MENUITEM', 'settings/notifications');
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'account');
define('SECTION_PAGE', 'activitypreferences');
define('SECTION_PAGE', 'notifications');
require(dirname(dirname(dirname(dirname(__FILE__)))) . '/init.php');
define('TITLE', get_string('activityprefs'));
define('TITLE', get_string('notifications'));
require_once('pieforms/pieform.php');
require_once(get_config('libroot') . 'activity.php');
......@@ -100,7 +100,7 @@ $prefsform = pieform(array(
$smarty = smarty();
$smarty->assign('prefsdescr', get_string('prefsdescr', 'activity'));
$smarty->assign('form', $prefsform);
$smarty->assign('PAGEHEADING', hsc(get_string('activityprefs')));
$smarty->assign('PAGEHEADING', hsc(get_string('notifications')));
$smarty->display('account/activity/preferences/index.tpl');
function activityprefs_submit(Pieform $form, $values) {
......
......@@ -26,13 +26,13 @@
*/
define('INTERNAL', 1);
define('MENUITEM', 'settings/preferences');
define('MENUITEM', 'settings/account');
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'account');
define('SECTION_PAGE', 'preferences');
require(dirname(dirname(__FILE__)) . '/init.php');
define('TITLE', get_string('preferences'));
define('TITLE', get_string('account'));
require_once('pieforms/pieform.php');
// load up user preferences
......@@ -305,7 +305,7 @@ function clearPasswords(form, data) {
}
}
");
$smarty->assign('PAGEHEADING', hsc(get_string('preferences')));
$smarty->assign('PAGEHEADING', hsc(get_string('account')));
$smarty->display('account/index.tpl');
......
......@@ -41,7 +41,7 @@ $string['typegroupmessage'] = 'Group message';
$string['type'] = 'Activity type';
$string['attime'] = 'at';
$string['prefsdescr'] = 'If you select either of the email options, notifications will still be entered in the Activity log, but they will be automatically marked as read.';
$string['prefsdescr'] = 'If you select either of the email options, notifications will still arrive in your Inbox, but they will be automatically marked as read.';
$string['subject'] = 'Subject';
$string['date'] = 'Date';
......
<h3>Notifications</h3>
<p>This is a list of system activities or events that apply to you. Use the activity preferences area to decide how you will receive notifications of these. Once you have read a notification you can mark it for removal from your list.</p>
<h3>Inbox</h3>
<p>This is a list of system activities or events that apply to you. Use the Notifications page in the Settings area to decide how you will receive notifications of these. Once you have read a notification you can mark it for removal from your list.</p>
<p><strong>Note:</strong> Read notifications will automatically expire and be removed from your list after 60 days.</p>
<h3>Activity Preferences</h3>
<h3>Notifications</h3>
<p>You may select how you receive notifications for each activity type.</p>
<h4>Notification Types</h4>
<p><strong>Activity Log:</strong> your notifications area will display a list of activity notifications received.</p>
......
<h3>Settings</h3>
<h3>My Account</h3>
<p>The settings area lets you configure how you use the site and how you will be will contacted with important information and notifications.</p>
<p>Accounts automatically expire after a period of time specified by your site administrator. You will be warned of upcoming account expiry, and told how to save your portfolio.</p>
<p><strong>Note:</strong> It is important to save each new entry using the button at the foot of the section.</p>
......
......@@ -489,12 +489,13 @@ $string['about'] = 'About';
$string['contactus'] = 'Contact Us';
// my account
$string['account'] = 'My account';
$string['account'] = 'My Account';
$string['accountprefs'] = 'Preferences';
$string['preferences'] = 'Preferences';
$string['activityprefs'] = 'Activity preferences';
$string['changepassword'] = 'Change password';
$string['notifications'] = 'Notifications';
$string['inbox'] = 'Inbox';
$string['institutionmembership'] = 'Institution Membership';
$string['institutionmembershipdescription'] = 'If you are a member of any institutions, they will be listed here. You may also request membership of an institution, and if any institutions have invited you to join, you can accept or decline the invitation.';
$string['youareamemberof'] = 'You are a member of %s';
......
......@@ -1906,6 +1906,12 @@ function mahara_standard_nav() {
'title' => get_string('findfriends'),
'weight' => 40,
),
array(
'path' => 'inbox',
'url' => 'account/activity/',
'title' => get_string('inbox'),
'weight' => 50,
),
array(
'path' => 'settings',
'url' => 'account/',
......@@ -1913,21 +1919,15 @@ function mahara_standard_nav() {
'weight' => 60,
),
array(
'path' => 'settings/preferences',
'path' => 'settings/account',
'url' => 'account/',
'title' => get_string('preferences'),
'title' => get_string('account'),
'weight' => 10,
),
array(
'path' => 'settings/notifications',
'url' => 'account/activity/',
'title' => get_string('notifications'),
'weight' => 20,
),
array(
'path' => 'settings/activitypreferences',
'url' => 'account/activity/preferences/',
'title' => get_string('activityprefs'),
'title' => get_string('notifications'),
'weight' => 30,
),
array(
......
......@@ -27,5 +27,5 @@
defined('INTERNAL') || die();
$string['name'] = 'Activity log';
$string['name'] = 'Inbox';
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment