From db787a3ab93da0c2141d33f3058f9dc2f34d6f2a Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 17 Dec 2010 20:36:36 +0000 Subject: reorganized the settings views and updated the pages to use new layout git-svn-id: http://code.elgg.org/elgg/trunk@7663 36083f99-b078-4883-b0ff-0f9b5a30f544 --- pages/settings/account.php | 27 +++++++++++++++++++++++++++ pages/settings/index.php | 19 ------------------- pages/settings/plugins.php | 23 ----------------------- pages/settings/statistics.php | 15 ++++++++++----- pages/settings/tools.php | 28 ++++++++++++++++++++++++++++ pages/settings/user.php | 22 ---------------------- 6 files changed, 65 insertions(+), 69 deletions(-) create mode 100644 pages/settings/account.php delete mode 100644 pages/settings/index.php delete mode 100644 pages/settings/plugins.php create mode 100644 pages/settings/tools.php delete mode 100644 pages/settings/user.php (limited to 'pages') diff --git a/pages/settings/account.php b/pages/settings/account.php new file mode 100644 index 000000000..88e916658 --- /dev/null +++ b/pages/settings/account.php @@ -0,0 +1,27 @@ +canEdit())) { + set_page_owner(get_loggedin_userid()); +} + +$title = elgg_echo('usersettings:user'); + +$content .= elgg_view('core/settings/account'); + +$params = array( + 'content' => $content, + 'title' => $title, +); +$body = elgg_view_layout('one_sidebar', $params); + +echo elgg_view_page($title, $body); diff --git a/pages/settings/index.php b/pages/settings/index.php deleted file mode 100644 index dbc8c87da..000000000 --- a/pages/settings/index.php +++ /dev/null @@ -1,19 +0,0 @@ -canEdit())) { - set_page_owner(get_loggedin_userid()); -} - -// Forward to the user settings -forward('pg/settings/user/' . elgg_get_page_owner()->username . "/"); \ No newline at end of file diff --git a/pages/settings/plugins.php b/pages/settings/plugins.php deleted file mode 100644 index 657519d38..000000000 --- a/pages/settings/plugins.php +++ /dev/null @@ -1,23 +0,0 @@ -canEdit())) { - set_page_owner(get_loggedin_userid()); -} - -$content = elgg_view_title(elgg_echo("usersettings:plugins")); -$content .= elgg_view("usersettings/plugins", - array('installed_plugins' => get_installed_plugins())); - -$body = elgg_view_layout('one_column_with_sidebar', array('content' => $content)); - -echo elgg_view_page(elgg_echo("usersettings:plugins"), $body); diff --git a/pages/settings/statistics.php b/pages/settings/statistics.php index 741003308..165c31e8e 100644 --- a/pages/settings/statistics.php +++ b/pages/settings/statistics.php @@ -6,7 +6,7 @@ * @subpackage Core */ -// Make sure only valid admin users can see this +// Only logged in users gatekeeper(); // Make sure we don't open a security hole ... @@ -14,9 +14,14 @@ if ((!elgg_get_page_owner()) || (!elgg_get_page_owner()->canEdit())) { set_page_owner(get_loggedin_userid()); } -$content = elgg_view_title(elgg_echo("usersettings:statistics")); -$content .= elgg_view("usersettings/statistics"); +$title = elgg_echo("usersettings:statistics"); -$body = elgg_view_layout('one_column_with_sidebar', array('content' => $content)); +$content = elgg_view("core/settings/statistics"); -echo elgg_view_page(elgg_echo("usersettings:statistics"), $body); +$params = array( + 'content' => $content, + 'title' => $title, +); +$body = elgg_view_layout('one_sidebar', array('content' => $content)); + +echo elgg_view_page($title, $body); diff --git a/pages/settings/tools.php b/pages/settings/tools.php new file mode 100644 index 000000000..e1c247581 --- /dev/null +++ b/pages/settings/tools.php @@ -0,0 +1,28 @@ +canEdit())) { + set_page_owner(get_loggedin_userid()); +} + +$title = elgg_echo("usersettings:plugins"); + +$content = elgg_view("core/settings/tools", + array('installed_plugins' => get_installed_plugins())); + +$params = array( + 'content' => $content, + 'title' => $title, +); +$body = elgg_view_layout('one_sidebar', $params); + +echo elgg_view_page($title, $body); diff --git a/pages/settings/user.php b/pages/settings/user.php deleted file mode 100644 index 2a530548c..000000000 --- a/pages/settings/user.php +++ /dev/null @@ -1,22 +0,0 @@ -canEdit())) { - set_page_owner(get_loggedin_userid()); -} - -$content = elgg_view_title(elgg_echo('usersettings:user')); -$content .= elgg_view("usersettings/form"); - -$body = elgg_view_layout("one_column_with_sidebar", array('content' => $content)); - -echo elgg_view_page(elgg_echo("usersettings:user"), $body); -- cgit v1.2.3