aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--languages/en.php2
-rw-r--r--views/default/core/settings/account/default_access.php24
-rw-r--r--views/default/core/settings/account/email.php24
-rw-r--r--views/default/core/settings/account/language.php29
-rw-r--r--views/default/core/settings/account/name.php29
-rw-r--r--views/default/core/settings/account/notifications.php45
-rw-r--r--views/default/core/settings/account/password.php54
-rw-r--r--views/default/core/settings/statistics/numentities.php63
-rw-r--r--views/default/core/settings/statistics/online.php48
9 files changed, 137 insertions, 181 deletions
diff --git a/languages/en.php b/languages/en.php
index ae874a550..e9c333041 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -452,7 +452,7 @@ $english = array(
* Notifications
*/
'notifications:usersettings' => "Notification settings",
- 'notifications:methods' => "Please specify which methods you want to permit.",
+ 'notifications:methods' => "Select your notification methods.",
'notification:method:email' => 'Email',
'notifications:usersettings:save:ok' => "Your notification settings were successfully saved.",
diff --git a/views/default/core/settings/account/default_access.php b/views/default/core/settings/account/default_access.php
index e33211460..690f2714a 100644
--- a/views/default/core/settings/account/default_access.php
+++ b/views/default/core/settings/account/default_access.php
@@ -12,22 +12,14 @@ if (elgg_get_config('allow_user_default_access')) {
if (false === ($default_access = $user->getPrivateSetting('elgg_default_access'))) {
$default_access = elgg_get_config('default_access');
}
-?>
-<div class="elgg-module elgg-module-info">
- <div class="elgg-head">
- <h3><?php echo elgg_echo('default_access:settings'); ?></h3>
- </div>
- <div class="elgg-body">
- <p>
- <?php echo elgg_echo('default_access:label'); ?>:
- <?php
- echo elgg_view('input/access', array('name' => 'default_access', 'value' => $default_access));
+ $title = elgg_echo('default_access:settings');
+ $content = elgg_echo('default_access:label') . ': ';
+ $content .= elgg_view('input/access', array(
+ 'name' => 'default_access',
+ 'value' => $default_access,
+ ));
- ?>
- </p>
- </div>
-</div>
-<?php
+ echo elgg_view_module('info', $title, $content);
}
-} \ No newline at end of file
+}
diff --git a/views/default/core/settings/account/email.php b/views/default/core/settings/account/email.php
index fda83e795..4bcdbb100 100644
--- a/views/default/core/settings/account/email.php
+++ b/views/default/core/settings/account/email.php
@@ -9,19 +9,11 @@
$user = elgg_get_page_owner_entity();
if ($user) {
-?>
-<div class="elgg-module elgg-module-info">
- <div class="elgg-head">
- <h3><?php echo elgg_echo('email:settings'); ?></h3>
- </div>
- <div class="elgg-body">
- <p>
- <?php echo elgg_echo('email:address:label'); ?>:
- <?php
- echo elgg_view('input/email',array('name' => 'email', 'value' => $user->email));
- ?>
- </p>
- </div>
-</div>
-<?php
-} \ No newline at end of file
+ $title = elgg_echo('email:settings');
+ $content = elgg_echo('email:address:label') . ': ';
+ $content .= elgg_view('input/email', array(
+ 'name' => 'email',
+ 'value' => $user->email,
+ ));
+ echo elgg_view_module('info', $title, $content);
+}
diff --git a/views/default/core/settings/account/language.php b/views/default/core/settings/account/language.php
index 3a992966f..b36057422 100644
--- a/views/default/core/settings/account/language.php
+++ b/views/default/core/settings/account/language.php
@@ -9,23 +9,12 @@
$user = elgg_get_page_owner_entity();
if ($user) {
-?>
-<div class="elgg-module elgg-module-info">
- <div class="elgg-head">
- <h3><?php echo elgg_echo('user:set:language'); ?></h3>
- </div>
- <div class="elgg-body">
- <p>
- <?php echo elgg_echo('user:language:label'); ?>:
- <?php
- echo elgg_view("input/dropdown", array(
- 'name' => 'language',
- 'value' => $user->language,
- 'options_values' => get_installed_translations()
- ));
- ?>
- </p>
- </div>
-</div>
-<?php
-} \ No newline at end of file
+ $title = elgg_echo('user:set:language');
+ $content = elgg_echo('user:language:label') . ': ';
+ $content .= elgg_view("input/dropdown", array(
+ 'name' => 'language',
+ 'value' => $user->language,
+ 'options_values' => get_installed_translations()
+ ));
+ echo elgg_view_module('info', $title, $content);
+}
diff --git a/views/default/core/settings/account/name.php b/views/default/core/settings/account/name.php
index f719a84de..e356146a3 100644
--- a/views/default/core/settings/account/name.php
+++ b/views/default/core/settings/account/name.php
@@ -7,20 +7,15 @@
*/
$user = elgg_get_page_owner_entity();
-?>
-<div class="elgg-module elgg-module-info">
- <div class="elgg-head">
- <h3><?php echo elgg_echo('user:name:label'); ?></h3>
- </div>
- <div class="elgg-body">
- <p>
- <?php echo elgg_echo('name'); ?>:
- <?php
- echo elgg_view('input/text', array('name' => 'name', 'value' => $user->name));
- ?>
- </p>
- </div>
-</div>
-<?php
-// need the user's guid to make sure the correct user gets updated
-echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $user->guid));
+if ($user) {
+ $title = elgg_echo('user:name:label');
+ $content = elgg_echo('name') . ': ';
+ $content .= elgg_view('input/text', array(
+ 'name' => 'name',
+ 'value' => $user->name,
+ ));
+ echo elgg_view_module('info', $title, $content);
+
+ // need the user's guid to make sure the correct user gets updated
+ echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $user->guid));
+}
diff --git a/views/default/core/settings/account/notifications.php b/views/default/core/settings/account/notifications.php
index 51292b2c9..c212b3886 100644
--- a/views/default/core/settings/account/notifications.php
+++ b/views/default/core/settings/account/notifications.php
@@ -9,33 +9,20 @@
global $NOTIFICATION_HANDLERS;
$notification_settings = get_user_notification_settings(elgg_get_page_owner_guid());
-?>
-<div class="elgg-module elgg-module-info">
- <div class="elgg-head">
- <h3><?php echo elgg_echo('notifications:usersettings'); ?></h3>
- </div>
- <div class="elgg-body">
+$title = elgg_echo('notifications:usersettings');
-<p><?php echo elgg_echo('notifications:methods'); ?>
+$rows = '';
-<table>
-<?php
- // Loop through options
- foreach ($NOTIFICATION_HANDLERS as $k => $v) {
-?>
- <tr>
- <td><?php echo elgg_echo("notification:method:$k"); ?>: </td>
-
- <td>
-<?php
+// Loop through options
+foreach ($NOTIFICATION_HANDLERS as $k => $v) {
if ($notification_settings->$k) {
$val = "yes";
} else {
$val = "no";
}
-
- echo elgg_view('input/radio', array(
+
+ $radio = elgg_view('input/radio', array(
'name' => "method[$k]",
'value' => $val,
'options' => array(
@@ -44,12 +31,14 @@ $notification_settings = get_user_notification_settings(elgg_get_page_owner_guid
),
));
-?>
- </td>
- </tr>
-<?php
- }
-?>
-</table>
- </div>
-</div> \ No newline at end of file
+ $cells = '<td class="prm pbl">' . elgg_echo("notification:method:$k") . ': </td>';
+ $cells .= "<td>$radio</td>";
+
+ $rows .= "<tr>$cells</tr>";
+}
+
+
+$content = elgg_echo('notifications:methods');
+$content .= "<table>$rows</table>";
+
+echo elgg_view_module('info', $title, $content);
diff --git a/views/default/core/settings/account/password.php b/views/default/core/settings/account/password.php
index a80f3df6b..4857034b2 100644
--- a/views/default/core/settings/account/password.php
+++ b/views/default/core/settings/account/password.php
@@ -1,45 +1,33 @@
<?php
+
/**
* Provide a way of setting your password
*
* @package Elgg
* @subpackage Core
*/
-
$user = elgg_get_page_owner_entity();
if ($user) {
-?>
-<div class="elgg-module elgg-module-info">
- <div class="elgg-head">
- <h3><?php echo elgg_echo('user:set:password'); ?></h3>
- </div>
- <div class="elgg-body">
- <?php
- // only make the admin user enter current password for changing his own password.
- if (!elgg_is_admin_logged_in() || elgg_is_admin_logged_in() && $user->guid == elgg_get_logged_in_user_guid()) {
- ?>
- <p>
- <?php echo elgg_echo('user:current_password:label'); ?>:
- <?php
- echo elgg_view('input/password', array('name' => 'current_password'));
- ?>
- </p>
- <?php } ?>
+ $title = elgg_echo('user:set:password');
- <p>
- <?php echo elgg_echo('user:password:label'); ?>:
- <?php
- echo elgg_view('input/password', array('name' => 'password'));
- ?>
- </p>
+ // only make the admin user enter current password for changing his own password.
+ $admin = '';
+ if (!elgg_is_admin_logged_in() || elgg_is_admin_logged_in() && $user->guid == elgg_get_logged_in_user_guid()) {
+ $admin .= elgg_echo('user:current_password:label') . ': ';
+ $admin .= elgg_view('input/password', array('name' => 'current_password'));
+ $admin = "<p>$admin</p>";
+ }
- <p>
- <?php echo elgg_echo('user:password2:label'); ?>: <?php
- echo elgg_view('input/password', array('name' => 'password2'));
- ?>
- </p>
- </div>
-</div>
-<?php
-} \ No newline at end of file
+ $password = elgg_echo('user:password:label') . ': ';
+ $password .= elgg_view('input/password', array('name' => 'password'));
+ $password = "<p>$password</p>";
+
+ $password2 = elgg_echo('user:password2:label') . ': ';
+ $password2 .= elgg_view('input/password', array('name' => 'password2'));
+ $password2 = "<p>$password2</p>";
+
+ $content = $admin . $password . $password2;
+
+ echo elgg_view_module('info', $title, $content);
+}
diff --git a/views/default/core/settings/statistics/numentities.php b/views/default/core/settings/statistics/numentities.php
index 245fd67be..ce1705a2e 100644
--- a/views/default/core/settings/statistics/numentities.php
+++ b/views/default/core/settings/statistics/numentities.php
@@ -10,42 +10,35 @@
$entity_stats = get_entity_statistics(elgg_get_logged_in_user_guid());
if ($entity_stats) {
-?>
-<div class="elgg-module elgg-module-info">
- <div class="elgg-head">
- <h3><?php echo elgg_echo('usersettings:statistics:label:numentities'); ?></h3>
- </div>
- <div class="elgg-body">
- <table class="elgg-table-alt">
- <?php
- foreach ($entity_stats as $k => $entry) {
- foreach ($entry as $a => $b) {
+ $rows = '';
+ foreach ($entity_stats as $k => $entry) {
+ foreach ($entry as $a => $b) {
- //This function controls the alternating class
- $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
+ // This function controls the alternating class
+ $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
- if ($a == "__base__") {
- $a = elgg_echo("item:{$k}");
- if (empty($a)) {
- $a = $k;
- }
- } else {
- $a = elgg_echo("item:{$k}:{$a}");
- if (empty($a)) {
- $a = "$k $a";
- }
- }
- echo <<< END
- <tr class="{$even_odd}">
- <td class="column-one"><b>{$a}:</b></td>
- <td>{$b}</td>
- </tr>
-END;
+ if ($a == "__base__") {
+ $a = elgg_echo("item:{$k}");
+ if (empty($a)) {
+ $a = $k;
+ }
+ } else {
+ $a = elgg_echo("item:{$k}:{$a}");
+ if (empty($a)) {
+ $a = "$k $a";
}
}
- ?>
- </table>
- </div>
-</div>
-<?php
-} \ No newline at end of file
+ $rows .= <<< END
+ <tr class="{$even_odd}">
+ <td class="column-one"><b>{$a}:</b></td>
+ <td>{$b}</td>
+ </tr>
+END;
+ }
+ }
+
+ $title = elgg_echo('usersettings:statistics:label:numentities');
+ $content = "<table class=\"elgg-table-alt\">$rows</table>";
+
+ echo elgg_view_module('info', $title, $content);
+}
diff --git a/views/default/core/settings/statistics/online.php b/views/default/core/settings/statistics/online.php
index 65db42cb1..ce7ff35fb 100644
--- a/views/default/core/settings/statistics/online.php
+++ b/views/default/core/settings/statistics/online.php
@@ -1,6 +1,6 @@
<?php
/**
- * Elgg statistics screen showing online users.
+ * Statistics about this user.
*
* @package Elgg
* @subpackage Core
@@ -15,17 +15,35 @@ if ($log) {
$logged_in = $log[0]->time_created;
}
-?>
-<div class="elgg-module elgg-module-info">
- <div class="elgg-head">
- <h3><?php echo elgg_echo('usersettings:statistics:yourdetails'); ?></h3>
- </div>
- <div class="elgg-body">
- <table class="elgg-table-alt">
- <tr class="odd"><td class="column-one"><?php echo elgg_echo('usersettings:statistics:label:name'); ?></td><td><?php echo $user->name; ?></td></tr>
- <tr class="even"><td class="column-one"><?php echo elgg_echo('usersettings:statistics:label:email'); ?></td><td><?php echo $user->email; ?></td></tr>
- <tr class="odd"><td class="column-one"><?php echo elgg_echo('usersettings:statistics:label:membersince'); ?></td><td><?php echo date("r",$user->time_created); ?></td></tr>
- <tr class="even"><td class="column-one"><?php echo elgg_echo('usersettings:statistics:label:lastlogin'); ?></td><td><?php echo date("r",$logged_in); ?></td></tr>
- </table>
- </div>
-</div> \ No newline at end of file
+$label_name = elgg_echo('usersettings:statistics:label:name');
+$label_email = elgg_echo('usersettings:statistics:label:email');
+$label_member_since = elgg_echo('usersettings:statistics:label:membersince');
+$label_last_login = elgg_echo('usersettings:statistics:label:lastlogin');
+
+$time_created = date("r", $user->time_created);
+$last_login = date("r", $logged_in);
+
+$title = elgg_echo('usersettings:statistics:yourdetails');
+
+$content = <<<__HTML
+<table class="elgg-table-alt">
+ <tr class="odd">
+ <td class="column-one">$label_name</td>
+ <td>$user->name</td>
+ </tr>
+ <tr class="even">
+ <td class="column-one">$label_email</td>
+ <td>$user->email</td>
+ </tr>
+ <tr class="odd">
+ <td class="column-one">$label_member_since</td>
+ <td>$time_created</td>
+ </tr>
+ <tr class="even">
+ <td class="column-one">$label_last_login</td>
+ <td>$last_login</td>
+ </tr>
+</table>
+__HTML;
+
+echo elgg_view_module('info', $title, $content);