aboutsummaryrefslogtreecommitdiff
path: root/views/default/admin
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/admin')
-rw-r--r--views/default/admin/appearance/default_widgets.php82
-rw-r--r--views/default/admin/appearance/menu_items.php79
-rw-r--r--views/default/admin/appearance/profile_fields.php24
-rw-r--r--views/default/admin/appearance/profile_fields/list.php55
-rw-r--r--views/default/admin/components/plugin.php153
-rw-r--r--views/default/admin/components/plugin_settings.php19
-rw-r--r--views/default/admin/dashboard.php12
-rw-r--r--views/default/admin/footer.php9
-rw-r--r--views/default/admin/header.php27
-rw-r--r--views/default/admin/overview.php80
-rw-r--r--views/default/admin/overview/numentities.php7
-rw-r--r--views/default/admin/overview/online.php22
-rw-r--r--views/default/admin/plugin_settings.php26
-rw-r--r--views/default/admin/plugins.php197
-rw-r--r--views/default/admin/plugins/advanced.php104
-rw-r--r--views/default/admin/plugins/simple.php94
-rw-r--r--views/default/admin/settings/advanced.php9
-rw-r--r--views/default/admin/settings/advanced/site_secret.php11
-rw-r--r--views/default/admin/settings/basic.php9
-rw-r--r--views/default/admin/sidebar.php8
-rw-r--r--views/default/admin/site/advanced.php67
-rw-r--r--views/default/admin/site/basic.php29
-rw-r--r--views/default/admin/statistics/overview.php13
-rw-r--r--views/default/admin/statistics/overview/basic.php19
-rw-r--r--views/default/admin/statistics/overview/numentities.php40
-rw-r--r--views/default/admin/statistics/server.php8
-rw-r--r--views/default/admin/statistics/server/php.php50
-rw-r--r--views/default/admin/statistics/server/web_server.php16
-rw-r--r--views/default/admin/users/add.php6
-rw-r--r--views/default/admin/users/admins.php12
-rw-r--r--views/default/admin/users/newest.php21
-rw-r--r--views/default/admin/users/online.php19
32 files changed, 651 insertions, 676 deletions
diff --git a/views/default/admin/appearance/default_widgets.php b/views/default/admin/appearance/default_widgets.php
new file mode 100644
index 000000000..1bf5791ac
--- /dev/null
+++ b/views/default/admin/appearance/default_widgets.php
@@ -0,0 +1,82 @@
+<?php
+/**
+ * Default widgets landing page.
+ *
+ * @package Elgg.Core
+ * @subpackage Administration.DefaultWidgets
+ */
+
+$object = elgg_get_entities(array(
+ 'type' => 'object',
+ 'subtype' => 'moddefaultwidgets',
+ 'limit' => 1,
+));
+
+if ($object) {
+ echo elgg_view('output/url', array(
+ 'text' => elgg_echo('upgrade'),
+ 'href' => 'action/widgets/upgrade',
+ 'is_action' => true,
+ 'is_trusted' => true,
+ 'class' => 'elgg_button elgg-button-submit',
+ 'title' => 'Upgrade your default widgets to work on Elgg 1.8',
+ ));
+}
+
+elgg_push_context('default_widgets');
+$widget_context = get_input('widget_context');
+$list = elgg_trigger_plugin_hook('get_list', 'default_widgets', null, array());
+
+// default to something if we can
+if (!$widget_context && $list) {
+ $widget_context = $list[0]['widget_context'];
+}
+
+$current_info = null;
+$tabs = array();
+foreach ($list as $info) {
+ $url = "admin/appearance/default_widgets?widget_context={$info['widget_context']}";
+ $selected = false;
+ if ($widget_context == $info['widget_context']) {
+ $selected = true;
+ $current_info = $info;
+ }
+
+ $tabs[] = array(
+ 'title' => $info['name'],
+ 'url' => $url,
+ 'selected' => $selected
+ );
+}
+
+$tabs_vars = array(
+ 'tabs' => $tabs
+);
+
+echo elgg_view('navigation/tabs', $tabs_vars);
+
+echo elgg_view('output/longtext', array('value' => elgg_echo('admin:default_widgets:instructions')));
+
+if (!$current_info) {
+ $content = elgg_echo('admin:default_widgets:unknown_type');
+} else {
+ // default widgets are owned and saved to the site.
+ elgg_set_page_owner_guid(elgg_get_config('site_guid'));
+ elgg_push_context($current_info['widget_context']);
+
+ $default_widgets_input = elgg_view('input/hidden', array(
+ 'name' => 'default_widgets',
+ 'value' => 1
+ ));
+
+ $params = array(
+ 'content' => $default_widgets_input,
+ 'num_columns' => $current_info['widget_columns'],
+ );
+
+ $content = elgg_view_layout('widgets', $params);
+ elgg_pop_context();
+}
+elgg_pop_context();
+
+echo $content;
diff --git a/views/default/admin/appearance/menu_items.php b/views/default/admin/appearance/menu_items.php
index e6a40c754..1d5c95cf9 100644
--- a/views/default/admin/appearance/menu_items.php
+++ b/views/default/admin/appearance/menu_items.php
@@ -6,82 +6,5 @@
* @subpackage Core
*/
-$menu_items = get_register('menu');
-$featured_urls = get_config('menu_items_featured_urls');
-// get an alphabetical sort of the items + urls
-foreach ($menu_items as $name => $info) {
- $menu_sorted[$info->name] = $info->value->url;
-}
-
-ksort($menu_sorted);
-
-$pulldown_values = array_flip($menu_sorted);
-$pulldown_values[''] = elgg_echo('none');
-
-echo elgg_view_title(elgg_echo('admin:menu_items'));
-echo "<div class='admin_settings menuitems'><h3>".elgg_echo('admin:menu_items:configure')."</h3>";
-echo "<p class='margin_top'>".strip_tags(elgg_view('output/longtext', array('value' => elgg_echo("admin:menu_items:description"))))."</p>";
-$form_body = '';
-
-// @todo Could probably make this number configurable
-for ($i=0; $i<6; $i++) {
- if (array_key_exists($i, $featured_urls)) {
- $current_value = $featured_urls[$i]->value->url;
- } else {
- $current_value = '';
- }
-
- $form_body .= elgg_view('input/pulldown', array(
- 'options_values' => $pulldown_values,
- 'internalname' => 'featured_urls[]',
- 'value' => $current_value
- ));
-}
-
-// add arbitrary links
-$form_body .= "<h3>".elgg_echo('admin:add_menu_item')."</h3>";
-$form_body .= elgg_view('output/longtext', array('value' => elgg_echo("admin:add_menu_item:description")));
-
-$custom_items = get_config('menu_items_custom_items');
-
-$name_str = elgg_echo('name');
-$url_str = elgg_echo('admin:plugins:label:website');
-
-$form_body .= '<ul class="custom_menuitems">';
-
-if (is_array($custom_items)) {
- foreach ($custom_items as $url => $name) {
- $name_input = elgg_view('input/text', array(
- 'internalname' => 'custom_item_names[]',
- 'value' => $name
- ));
-
- $url_input = elgg_view('input/text', array(
- 'internalname' => 'custom_item_urls[]',
- 'value' => $url
- ));
-
- $form_body .= "<li class='custom_menuitem'>$name_str: $name_input $url_str: $url_input $delete</li>";
- }
-}
-
-$new = elgg_echo('new');
-$name_input = elgg_view('input/text', array(
- 'internalname' => 'custom_item_names[]',
-));
-
-$url_input = elgg_view('input/text', array(
- 'internalname' => 'custom_item_urls[]',
-));
-
-$form_body .= "<li class='custom_menuitem'>$name_str: $name_input $url_str: $url_input</li>
-</ul>";
-
-$form_body .= elgg_view('input/submit', array('value' => elgg_echo('save')));
-
-echo elgg_view('input/form', array(
- 'body' => $form_body,
- 'action' => elgg_get_site_url()."action/admin/menu_items"
-));
-echo "</div>"; \ No newline at end of file
+echo elgg_view_form('admin/menu/save', array('class' => 'elgg-form-settings'));
diff --git a/views/default/admin/appearance/profile_fields.php b/views/default/admin/appearance/profile_fields.php
new file mode 100644
index 000000000..f1d78c19f
--- /dev/null
+++ b/views/default/admin/appearance/profile_fields.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Admin area: edit default profile fields
+ */
+
+$add = elgg_view_form('profile/fields/add', array('class' => 'elgg-form-settings'), array());
+$list = elgg_view('admin/appearance/profile_fields/list');
+
+$reset = elgg_view('output/confirmlink', array(
+ 'text' => elgg_echo('reset'),
+ 'href' => 'action/profile/fields/reset',
+ 'title' => elgg_echo('profile:resetdefault'),
+ 'confirm' => elgg_echo('profile:resetdefault:confirm'),
+ 'class' => 'elgg-button elgg-button-cancel',
+ 'is_trusted' => 'true',
+));
+
+$body = <<<__HTML
+$add
+$list
+<div class="mtl">$reset</div>
+__HTML;
+
+echo $body;
diff --git a/views/default/admin/appearance/profile_fields/list.php b/views/default/admin/appearance/profile_fields/list.php
new file mode 100644
index 000000000..b9440a95d
--- /dev/null
+++ b/views/default/admin/appearance/profile_fields/list.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Profile fields.
+ *
+ * @todo Needs some review
+ */
+
+// List form elements
+$n = 0;
+$loaded_defaults = array();
+$items = array();
+$fieldlist = elgg_get_config('profile_custom_fields');
+if ($fieldlist) {
+ $fieldlistarray = explode(',', $fieldlist);
+ foreach ($fieldlistarray as $listitem) {
+ $translation = elgg_get_config("admin_defined_profile_$listitem");
+ $type = elgg_get_config("admin_defined_profile_type_$listitem");
+ if ($translation && $type) {
+ $item = new stdClass;
+ $item->translation = $translation;
+ $item->shortname = $listitem;
+ $item->name = "admin_defined_profile_$listitem";
+ $item->type = elgg_echo("profile:field:$type");
+ $items[] = $item;
+ }
+ }
+}
+?>
+<ul id="elgg-profile-fields" class="mvm">
+<?php
+
+$save = elgg_echo('save');
+$cancel = elgg_echo('cancel');
+
+foreach ($items as $item) {
+ echo elgg_view("profile/", array('value' => $item->translation));
+
+ //$even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
+ $url = elgg_view('output/url', array(
+ 'href' => "action/profile/fields/delete?id={$item->shortname}",
+ 'text' => elgg_view_icon('delete-alt'),
+ 'is_action' => true,
+ 'is_trusted' => true,
+ ));
+ $type = elgg_echo($item->type);
+ echo <<<HTML
+<li id="$item->shortname" class="clearfix">
+ <span class="elgg-icon elgg-icon-drag-arrow elgg-state-draggable"></span>
+ <b><span id="elgg-profile-field-{$item->shortname}" class="elgg-state-editable">$item->translation</span></b> [$type] $url
+</li>
+HTML;
+}
+
+?>
+</ul> \ No newline at end of file
diff --git a/views/default/admin/components/plugin.php b/views/default/admin/components/plugin.php
deleted file mode 100644
index 013f0cd07..000000000
--- a/views/default/admin/components/plugin.php
+++ /dev/null
@@ -1,153 +0,0 @@
-<?php
-/**
- * Elgg plugin manifest class
- *
- * This file renders a plugin for the admin screen, including active/deactive, manifest details & display plugin
- * settings.
- *
- * @package Elgg
- * @subpackage Core
- */
-
-$plugin = $vars['plugin'];
-$details = $vars['details'];
-
-$active = $details['active'];
-$manifest = $details['manifest'];
-
-$plugin_pretty_name = (isset($manifest['name'])) ? $manifest['name'] : $plugin;
-
-// Check elgg version if available
-$version_check_valid = false;
-if ($manifest['elgg_version']) {
- $version_check_valid = check_plugin_compatibility($manifest['elgg_version']);
-}
-
-$ts = time();
-$token = generate_action_token($ts);
-$active_class = ($active) ? 'active' : 'not_active';
-
-$top_url = $up_url = $down_url = $bottom_url = '';
-if ($vars['order'] > 10) {
- $top_url = elgg_get_site_url()."action/admin/plugins/reorder?plugin={$plugin}&order=1&__elgg_token=$token&__elgg_ts=$ts";
- $top_link = '<a href="' . elgg_format_url($top_url) . '">' . elgg_echo('top') . '</a>';
-
- $order = $vars['order'] - 11;
-
- $up_url = elgg_get_site_url()."action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts";
- $up_link = '<a href="' . elgg_format_url($up_url) . '">' . elgg_echo('up') . '</a>';
-}
-
-if ($vars['order'] < $vars['maxorder']) {
- $order = $vars['order'] + 11;
- $down_url = elgg_get_site_url()."action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts";
- $down_link = '<a href="' . elgg_format_url($down_url) . '">' . elgg_echo('down') . '</a>';
-
- $order = $vars['maxorder'] + 11;
- $bottom_url = elgg_get_site_url()."action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts";
- $bottom_link = '<a href="' . elgg_format_url($bottom_url) . '">' . elgg_echo('bottom') . '</a>';
-}
-
-if ($active) {
- $url = elgg_get_site_url()."action/admin/plugins/disable?plugin=$plugin&__elgg_token=$token&__elgg_ts=$ts";
- $enable_disable = '<a class="cancel_button" href="' . elgg_format_url($url) . '">' . elgg_echo('disable') . '</a>';
-} else {
- $url = elgg_get_site_url()."action/admin/plugins/enable?plugin=$plugin&__elgg_token=$token&__elgg_ts=$ts";
- $enable_disable = '<a class="submit_button" href="' . elgg_format_url($url) . '">' . elgg_echo('enable') . '</a>';
-}
-
-
-$categories_list = '';
-if ($manifest['category']) {
- $categories_arr = array();
- $base_url = elgg_get_site_url()."pg/admin/plugins?category=";
-
- foreach($manifest['category'] as $category) {
- $url = $base_url . urlencode($category);
- $categories_arr[] = "<a href=\"$url\">" . htmlspecialchars($category) . '</a>';
- }
-
- $categories_list = implode(', ', $categories_arr);
-}
-
-$screenshots = '';
-if ($manifest['screenshot']) {
- $base_url = elgg_get_site_url()."mod/";
-
- $limit = 4;
- foreach ($manifest['screenshot'] as $screenshot) {
- if ($limit <= 0) {
- break;
- }
-
- $screenshot_src = $base_url . $plugin . "/$screenshot";
- $screenshots .= "<li class=\"plugin_screenshot\"><a href=\"$screenshot_src\"><img src=\"$screenshot_src\"></a></li>";
-
- $limit--;
- }
-}
-
-?>
-
-<div class="plugin_details <?php echo $active_class ?>">
- <div class="admin_plugin_reorder">
- <?php echo "$top_link $up_link $down_link $bottom_link"; ?>
- </div><div class="clearfloat"></div>
-
- <div class="admin_plugin_enable_disable"><?php echo $enable_disable; ?></div>
-
- <?php
- if (elgg_view_exists("settings/{$plugin}/edit")) {
- $link = elgg_get_site_url()."pg/admin/plugin_settings/$plugin";
- $settings_link = "<a class='plugin_settings small link' href='$link'>[". elgg_echo('settings') ."]</a>";
- }
- ?>
- <h3><?php echo "$plugin_pretty_name $settings_link"; ?></h3>
- <?php
- echo $settings_panel;
-
- if ($manifest) {
- ?>
- <div class="plugin_description"><?php echo elgg_view('output/longtext',array('value' => $manifest['description'])); ?></div>
- <p class="plugin_author"><span><?php echo elgg_echo('admin:plugins:label:author') . "</span>: ". htmlspecialchars($manifest['author']) ?></p>
- <p class="plugin_version"><span><?php echo elgg_echo('admin:plugins:label:version') . "</span>: ". htmlspecialchars($manifest['version']) ?></p>
-
- <p><a class="manifest_details small link"><?php echo elgg_echo("admin:plugins:label:moreinfo"); ?></a></p>
-
- <div class="manifest_file hidden">
-
- <?php
- if ((!$version_check_valid) || (!isset($manifest['elgg_version']))) {
- ?>
- <div id="version_check">
- <?php
- if (!isset($manifest['elgg_version'])) {
- echo elgg_echo('admin:plugins:warning:elggversionunknown');
- } else {
- echo elgg_echo('admin:plugins:warning:elggtoolow');
- }
- ?>
- </div>
- <?php
- }
-
- ?>
- <div><?php echo elgg_echo('admin:plugins:label:directory') . ": ". htmlspecialchars($plugin) ?></div>
- <?php
- if ($categories_list) {
- ?>
- <div><?php echo elgg_echo('admin:plugins:label:categories') . ": ". $categories_list ?></div>
- <?php
- }
- if ($screenshots) {
- ?>
- <div><ul><?php echo $screenshots; ?></ul></div>
- <?php
- }
- ?>
- <div><?php echo elgg_echo('admin:plugins:label:copyright') . ": ". htmlspecialchars($manifest['copyright']) ?></div>
- <div><?php echo elgg_echo('admin:plugins:label:licence') . ": ". htmlspecialchars($manifest['licence'] . $manifest['license']) ?></div>
- <div><?php echo elgg_echo('admin:plugins:label:website') . ": "; ?><a href="<?php echo $manifest['website']; ?>"><?php echo $manifest['website']; ?></a></div>
- <?php } ?>
- </div>
-</div> \ No newline at end of file
diff --git a/views/default/admin/components/plugin_settings.php b/views/default/admin/components/plugin_settings.php
deleted file mode 100644
index 13e962634..000000000
--- a/views/default/admin/components/plugin_settings.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-/**
- * Elgg plugin settings
- *
- * @package Elgg
- * @subpackage Core
- */
-
-$plugin = $vars['plugin'];
-$plugin_info = load_plugin_manifest($plugin);
-
-$form_body = elgg_view("settings/{$plugin}/edit", $vars);
-$form_body .= elgg_view('input/hidden', array('internalname' => 'plugin', 'value' => $plugin));
-$form_body .= "<div class='divider'></div>" . elgg_view('input/submit', array('value' => elgg_echo('save')));
-$form_body .= elgg_view('input/reset', array('value' => elgg_echo('reset'), 'class' => 'action_button disabled'));
-
-echo elgg_view_title($plugin_info['name']);
-
-echo elgg_view('input/form', array('body' => $form_body, 'internalid' => 'plugin_settings', 'action' => elgg_get_site_url()."action/plugins/settings/save")); \ No newline at end of file
diff --git a/views/default/admin/dashboard.php b/views/default/admin/dashboard.php
new file mode 100644
index 000000000..d3976ca38
--- /dev/null
+++ b/views/default/admin/dashboard.php
@@ -0,0 +1,12 @@
+<?php
+
+elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());
+
+$params = array(
+ 'num_columns' => 2,
+ 'exact_match' => true,
+ 'show_access' => false,
+);
+$widgets = elgg_view_layout('widgets', $params);
+
+echo $widgets; \ No newline at end of file
diff --git a/views/default/admin/footer.php b/views/default/admin/footer.php
new file mode 100644
index 000000000..ce420e99a
--- /dev/null
+++ b/views/default/admin/footer.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ * Elgg admin footer. Extend this view to add content to the admin footer
+ */
+
+$options = array(
+ 'class' => 'elgg-menu-hz'
+);
+echo elgg_view_menu('admin_footer', $options); \ No newline at end of file
diff --git a/views/default/admin/header.php b/views/default/admin/header.php
new file mode 100644
index 000000000..331190a88
--- /dev/null
+++ b/views/default/admin/header.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Elgg admin header
+ */
+$admin_title = elgg_get_site_entity()->name . ' ' . elgg_echo('admin');
+
+$view_site = elgg_view('output/url', array(
+ 'href' => elgg_get_site_url(),
+ 'text' => elgg_echo('admin:view_site'),
+ 'is_trusted' => true,
+));
+$logout = elgg_view('output/url', array(
+ 'href' => 'action/logout',
+ 'text' => elgg_echo('logout'),
+ 'is_trusted' => true,
+));
+?>
+<h1 class="elgg-heading-site">
+ <a href="<?php echo elgg_get_site_url(); ?>admin">
+ <?php echo $admin_title; ?>
+ </a>
+</h1>
+<ul class="elgg-menu-user">
+ <li><?php echo elgg_echo('admin:loggedin', array(elgg_get_logged_in_user_entity()->name)); ?></li>
+ <li><?php echo $view_site; ?></li>
+ <li><?php echo $logout; ?></li>
+</ul> \ No newline at end of file
diff --git a/views/default/admin/overview.php b/views/default/admin/overview.php
deleted file mode 100644
index 804f4cc5e..000000000
--- a/views/default/admin/overview.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-/**
- * Elgg statistics screen
- *
- * @package Elgg
- * @subpackage Core
- */
-
-// Work out number of users
-$users_stats = get_number_users();
-$total_users = get_number_users(true);
-
-global $CONFIG;
-
-// Get version information
-$version = get_version();
-$release = get_version(true);
-
-echo elgg_view_title(elgg_echo('admin:overview'));
-?>
-<div class="admin_settings site_stats">
- <?php echo elgg_view('overview/extend'); ?>
- <h3><?php echo elgg_echo('admin:statistics:label:basic'); ?></h3>
- <table class="styled">
- <tr class="odd">
- <td class="column_one"><b><?php echo elgg_echo('admin:statistics:label:version'); ?> :</b></td>
- <td><?php echo elgg_echo('admin:statistics:label:version:release'); ?> - <?php echo $release; ?>, <?php echo elgg_echo('admin:statistics:label:version:version'); ?> - <?php echo $version; ?></td>
- </tr>
- <tr class="even">
- <td class="column_one"><b><?php echo elgg_echo('admin:statistics:label:numusers'); ?> :</b></td>
- <td><?php echo $users_stats; ?> <?php echo elgg_echo('active'); ?> / <?php echo $total_users; ?> <?php echo elgg_echo('total') ?></td>
- </tr>
-
- </table>
-</div>
-
-<?php
-
-
-// Get entity statistics
-$entity_stats = get_entity_statistics();
-$even_odd = "";
-?>
-<div class="admin_settings site_entities">
- <h3><?php echo elgg_echo('admin:statistics:label:numentities'); ?></h3>
- <table class="styled">
- <?php
- foreach ($entity_stats as $k => $entry) {
- arsort($entry);
- foreach ($entry as $a => $b) {
-
- //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 {
- if (empty($a)) {
- $a = elgg_echo("item:{$k}");
- } else {
- $a = elgg_echo("item:{$k}:{$a}");
- }
-
- if (empty($a)) {
- $a = "$k $a";
- }
- }
- echo <<< END
- <tr class="{$even_odd}">
- <td class="column_one">{$a}:</td>
- <td>{$b}</td>
- </tr>
-END;
- }
- }
- ?>
- </table>
-</div> \ No newline at end of file
diff --git a/views/default/admin/overview/numentities.php b/views/default/admin/overview/numentities.php
deleted file mode 100644
index 6ecd388dd..000000000
--- a/views/default/admin/overview/numentities.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-/**
- * Elgg statistics screen
- *
- * @package Elgg
- * @subpackage Core
- */
diff --git a/views/default/admin/overview/online.php b/views/default/admin/overview/online.php
deleted file mode 100644
index 19e65a764..000000000
--- a/views/default/admin/overview/online.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-/**
- * Elgg statistics screen
- *
- * @package Elgg
- * @subpackage Core
- */
-
-// users online
-if( (is_plugin_enabled('search')) && (is_plugin_enabled('profile')) ) {
- get_context('search');
- $users_online = get_online_users();
- get_context('admin');
- ?>
-
- <div class="admin_settings members_list users_online">
- <h3><?php echo elgg_echo('admin:statistics:label:onlineusers'); ?></h3>
- <?php echo $users_online; ?>
- </div>
-<?php
-}
-?> \ No newline at end of file
diff --git a/views/default/admin/plugin_settings.php b/views/default/admin/plugin_settings.php
new file mode 100644
index 000000000..1c6e9e206
--- /dev/null
+++ b/views/default/admin/plugin_settings.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Elgg plugin settings
+ *
+ * @uses ElggPlugin $vars['plugin'] The plugin object to display settings for.
+ *
+ * @package Elgg.Core
+ * @subpackage Plugins.Settings
+ */
+
+$plugin = $vars['plugin'];
+$plugin_id = $plugin->getID();
+
+// required for plugin settings backward compatibility
+$vars['entity'] = $plugin;
+
+$settings = false;
+
+if (elgg_view_exists("settings/$plugin_id/edit") || elgg_view_exists("plugins/$plugin_id/settings")) {
+ $title = $plugin->getManifest()->getName();
+
+ $params = array('id' => "$plugin_id-settings", 'class' => 'elgg-form-settings');
+ $body = elgg_view_form("plugins/settings/save", $params, $vars);
+
+ echo elgg_view_module('info', $title, $body);
+} \ No newline at end of file
diff --git a/views/default/admin/plugins.php b/views/default/admin/plugins.php
new file mode 100644
index 000000000..42f153d0f
--- /dev/null
+++ b/views/default/admin/plugins.php
@@ -0,0 +1,197 @@
+<?php
+/**
+ * Elgg administration plugin screen
+ *
+ * Shows a list of plugins that can be sorted and filtered.
+ *
+ * @package Elgg.Core
+ * @subpackage Admin.Plugins
+ */
+
+elgg_load_js('lightbox');
+elgg_load_css('lightbox');
+
+elgg_generate_plugin_entities();
+$installed_plugins = elgg_get_plugins('any');
+$show_category = get_input('category', 'all');
+$sort = get_input('sort', 'priority');
+
+// Get a list of the all categories
+// and trim down the plugin list if we're not viewing all categories.
+// @todo this could be cached somewhere after have the manifest loaded
+$categories = array();
+
+foreach ($installed_plugins as $id => $plugin) {
+ if (!$plugin->isValid()) {
+ if ($plugin->isActive()) {
+ // force disable and warn
+ elgg_add_admin_notice('invalid_and_deactivated_' . $plugin->getID(),
+ elgg_echo('ElggPlugin:InvalidAndDeactivated', array($plugin->getId())));
+ $plugin->deactivate();
+ }
+ continue;
+ }
+
+ $plugin_categories = $plugin->getManifest()->getCategories();
+
+ // handle plugins that don't declare categories
+ // unset them here because this is the list we foreach
+ switch ($show_category) {
+ case 'all':
+ break;
+ case 'active':
+ if (!$plugin->isActive()) {
+ unset($installed_plugins[$id]);
+ }
+ break;
+ case 'inactive':
+ if ($plugin->isActive()) {
+ unset($installed_plugins[$id]);
+ }
+ break;
+ case 'nonbundled':
+ if (in_array('bundled', $plugin_categories)) {
+ unset($installed_plugins[$id]);
+ }
+ break;
+ default:
+ if (!in_array($show_category, $plugin_categories)) {
+ unset($installed_plugins[$id]);
+ }
+ break;
+ }
+
+ if (isset($plugin_categories)) {
+ foreach ($plugin_categories as $category) {
+ if (!array_key_exists($category, $categories)) {
+ $categories[$category] = ElggPluginManifest::getFriendlyCategory($category);
+ }
+ }
+ }
+}
+
+$guids = array();
+foreach ($installed_plugins as $plugin) {
+ $guids[] = $plugin->getGUID();
+}
+
+// sort plugins
+switch ($sort) {
+ case 'date':
+ $plugin_list = array();
+ foreach ($installed_plugins as $plugin) {
+ $create_date = $plugin->getTimeCreated();
+ while (isset($plugin_list[$create_date])) {
+ $create_date++;
+ }
+ $plugin_list[$create_date] = $plugin;
+ }
+ krsort($plugin_list);
+ break;
+ case 'alpha':
+ $plugin_list = array();
+ foreach ($installed_plugins as $plugin) {
+ $plugin_list[$plugin->getFriendlyName()] = $plugin;
+ }
+ ksort($plugin_list);
+ break;
+ case 'priority':
+ default:
+ $plugin_list = $installed_plugins;
+ break;
+}
+
+
+
+asort($categories);
+
+// we want bundled/nonbundled pulled to be at the top of the list
+unset($categories['bundled']);
+unset($categories['nonbundled']);
+
+$common_categories = array(
+ 'all' => elgg_echo('admin:plugins:category:all'),
+ 'active' => elgg_echo('admin:plugins:category:active'),
+ 'inactive' => elgg_echo('admin:plugins:category:inactive'),
+ 'bundled' => elgg_echo('admin:plugins:category:bundled'),
+ 'nonbundled' => elgg_echo('admin:plugins:category:nonbundled'),
+);
+
+$categories = array_merge($common_categories, $categories);
+// security - only want a defined option
+if (!array_key_exists($show_category, $categories)) {
+ $show_category = reset($categories);
+}
+
+$category_form = elgg_view_form('admin/plugins/filter', array(
+ 'action' => 'admin/plugins',
+ 'method' => 'get',
+ 'disable_security' => true,
+), array(
+ 'category' => $show_category,
+ 'category_options' => $categories,
+ 'sort' => $sort,
+));
+
+
+$sort_options = array(
+ 'priority' => elgg_echo('admin:plugins:sort:priority'),
+ 'alpha' => elgg_echo('admin:plugins:sort:alpha'),
+ 'date' => elgg_echo('admin:plugins:sort:date'),
+);
+// security - only want a defined option
+if (!array_key_exists($sort, $sort_options)) {
+ $sort = reset($sort_options);
+}
+
+$sort_form = elgg_view_form('admin/plugins/sort', array(
+ 'action' => 'admin/plugins',
+ 'method' => 'get',
+ 'disable_security' => true,
+), array(
+ 'sort' => $sort,
+ 'sort_options' => $sort_options,
+ 'category' => $show_category,
+));
+
+$buttons = "<div class=\"clearfix mbm\">";
+$buttons .= elgg_view_form('admin/plugins/change_state', array(
+ 'action' => 'action/admin/plugins/activate_all',
+ 'class' => 'float',
+), array(
+ 'guids' => $guids,
+ 'action' => 'activate',
+));
+$buttons .= elgg_view_form('admin/plugins/change_state', array(
+ 'action' => 'action/admin/plugins/deactivate_all',
+ 'class' => 'float',
+), array(
+ 'guids' => $guids,
+ 'action' => 'deactivate',
+));
+$buttons .= "</div>";
+
+$buttons .= $category_form . $sort_form;
+
+// construct page header
+?>
+<div id="content_header" class="mbm clearfix">
+ <div class="content-header-options"><?php echo $buttons ?></div>
+</div>
+
+<div id="elgg-plugin-list">
+<?php
+
+$options = array(
+ 'limit' => 0,
+ 'full_view' => true,
+ 'list_type_toggle' => false,
+ 'pagination' => false,
+);
+if ($show_category == 'all' && $sort == 'priority') {
+ $options['display_reordering'] = true;
+}
+echo elgg_view_entity_list($plugin_list, $options);
+
+?>
+</div> \ No newline at end of file
diff --git a/views/default/admin/plugins/advanced.php b/views/default/admin/plugins/advanced.php
deleted file mode 100644
index 9aae4a05b..000000000
--- a/views/default/admin/plugins/advanced.php
+++ /dev/null
@@ -1,104 +0,0 @@
-<?php
-/**
- * Elgg administration advanced plugin screen
- *
- * Shows a list of all plugins sorted by load order.
- *
- * @package Elgg
- * @subpackage Core
- */
-
-regenerate_plugin_list();
-$installed_plugins = get_installed_plugins();
-$plugin_list = array();
-$show_category = get_input('category', NULL);
-
-// Get a list of the all categories
-// and trim down the plugin list if we're not viewing all categories.
-// @todo this could be cached somewhere after have the manifest loaded
-$categories = array();
-
-foreach ($installed_plugins as $id => $plugin) {
- $plugin_categories = $plugin['manifest']['category'];
-
- // handle plugins that don't declare categories
- if ((!$plugin_categories && $show_category) || ($show_category && !in_array($show_category, $plugin_categories))) {
- unset($installed_plugins[$id]);
- }
-
- foreach ($plugin_categories as $category) {
- if (!array_key_exists($category, $categories)) {
- $categories[$category] = elgg_echo("admin:plugins:label:moreinfo:categories:$category");
- }
- }
-}
-
-$ts = time();
-$token = generate_action_token($ts);
-$categories = array_merge(array('' => elgg_echo('admin:plugins:categories:all')), $categories);
-
-$category_pulldown = elgg_view('input/pulldown', array(
- 'internalname' => 'category',
- 'options_values' => $categories,
- 'value' => $show_category
-));
-
-$category_button = elgg_view('input/button', array(
- 'value' => elgg_echo('filter'),
- 'class' => 'action_button'
-));
-
-$category_form = elgg_view('input/form', array(
- 'body' => $category_pulldown . $category_button
-));
-
-// Page Header elements
-$title = elgg_view_title(elgg_echo('admin:plugins'));
-
-// @todo Until "en/disable all" means "All plugins on this page" hide when not looking at all.
-if (!isset($show_category) || empty($show_category)) {
- $buttons = "<a class='action_button' href=\"{$CONFIG->url}action/admin/plugins/enableall?__elgg_token=$token&amp;__elgg_ts=$ts\">".elgg_echo('enableall')."</a> <a class='action_button disabled' href=\"{$CONFIG->url}action/admin/plugins/disableall?__elgg_token=$token&amp;__elgg_ts=$ts\">".elgg_echo('disableall')."</a> ";
- $buttons .= "<br /><br />";
-} else {
- $buttons = '';
-}
-
-$buttons .= $category_form;
-
-// construct page header
-?>
-<div id="content_header" class="clearfloat">
- <div class="content_header_title"><?php echo $title ?></div>
- <div class="content_header_options"><?php echo $buttons ?></div>
-</div>
-<br />
-<?php
-
-$limit = get_input('limit', 10);
-$offset = get_input('offset', 0);
-
-$plugin_list = get_plugin_list();
-$max = 0;
-foreach($plugin_list as $key => $foo) {
- if ($key > $max) $max = $key;
-}
-
-// Display list of plugins
-$n = 0;
-foreach ($installed_plugins as $plugin => $data) {
- echo elgg_view('admin/components/plugin', array(
- 'plugin' => $plugin,
- 'details' => $data,
- 'maxorder' => $max,
- 'order' => array_search($plugin, $plugin_list)
- ));
- $n++;
-}
-?>
-<script type="text/javascript">
- $(document).ready(function() {
- $('a.manifest_details.link').click(function() {
- elgg_slide_toggle($(this), '.plugin_details', '.manifest_file');
- });
- });
-</script> \ No newline at end of file
diff --git a/views/default/admin/plugins/simple.php b/views/default/admin/plugins/simple.php
deleted file mode 100644
index 3baa00caf..000000000
--- a/views/default/admin/plugins/simple.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-/**
- * Elgg administration simple plugin screen
- *
- * Shows an alphabetical list of "simple" plugins.
- *
- * @package Elgg
- * @subpackage Core
- */
-
-regenerate_plugin_list();
-$installed_plugins = get_installed_plugins();
-$plugin_list = array();
-$title = elgg_view_title(elgg_echo('admin:plugins'));
-
-foreach ($installed_plugins as $installed_name => $plugin) {
- if (!isset($plugin['manifest']['admin_interface']) || $plugin['manifest']['admin_interface'] == 'advanced') {
- continue;
- }
-
- $plugin['installed_name'] = $installed_name;
-
- $plugin_list[$plugin['manifest']['name']] = $plugin;
-}
-
-ksort($plugin_list);
-$form_body .= <<<___END
- <div id="content_header" class="clearfloat">
- <div class="content_header_title">$title</div>
- </div>
- <ul class="admin_plugins margin_top">
-___END;
-
-foreach ($plugin_list as $name => $info) {
- $manifest = $info['manifest'];
- $version_valid = (isset($manifest['elgg_version'])) ? check_plugin_compatibility($manifest['elgg_version']) : FALSE;
- if ($info['active']) {
- $active_class = 'active';
- $checked = 'checked="checked"';
- } else {
- $active_class = 'not_active';
- $checked = '';
- }
-
- $author = $link = $version = $settings = '';
-
- if (isset($manifest['author'])) {
- $author = sprintf(elgg_echo('admin:plugins:author'), $manifest['author']);
- }
-
- if (isset($manifest['version'])) {
- $version = ' | ' . sprintf(elgg_echo('admin:plugins:version'), $manifest['version']);
- }
-
- if (isset($manifest['website'])) {
- $link = " | <a href=\"{$manifest['website']}\">" . elgg_echo('admin:plugins:plugin_website') . '</a>';
- }
-
- if (elgg_view_exists("settings/{$info['installed_name']}/edit")) {
- $settings_href = elgg_get_site_url()."pg/admin/plugin_settings/{$info['installed_name']}";
- $settings = " | <a class='plugin_settings link' href='$settings_href'>". elgg_echo('settings') ."</a>";
- }
-
- $form_body .= <<<___END
- <li class="plugin_details $active_class">
- <span class="plugin_controls">
- <input type="checkbox" id="{$info['installed_name']}" class="plugin_enabled" $checked name="enabled_plugins[]" value="{$info['installed_name']}"/>
- <label for="{$info['installed_name']}">$name</label>
- </span>
-
- <span class="plugin_info">
- <span class="plugin_description">
- {$manifest['description']}
- </span>
- <span class="plugin_metadata small">
- $author
- $version
- $link
- $settings
- </span>
- </span>
- </li>
-___END;
-}
-
-$form_body .= '</ul>';
-$form_body .= elgg_view('input/submit', array('value' => elgg_echo('save')));
-$form_body .= elgg_view('input/reset', array('value' => elgg_echo('reset'), 'class' => 'action_button disabled'));
-
-echo elgg_view('input/form', array(
- 'action' => elgg_get_site_url()."action/admin/plugins/simple_update_states",
- 'body' => $form_body,
- 'class' => 'admin_plugins_simpleview'
-)); \ No newline at end of file
diff --git a/views/default/admin/settings/advanced.php b/views/default/admin/settings/advanced.php
new file mode 100644
index 000000000..a262740f2
--- /dev/null
+++ b/views/default/admin/settings/advanced.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ * Elgg administration site advanced settings
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+echo elgg_view_form('admin/site/update_advanced', array('class' => 'elgg-form-settings'));
diff --git a/views/default/admin/settings/advanced/site_secret.php b/views/default/admin/settings/advanced/site_secret.php
new file mode 100644
index 000000000..e70ac7ab6
--- /dev/null
+++ b/views/default/admin/settings/advanced/site_secret.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Elgg administration site secret settings
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+echo elgg_view_form('admin/site/regenerate_secret', array(), array(
+ 'strength' => _elgg_get_site_secret_strength(),
+));
diff --git a/views/default/admin/settings/basic.php b/views/default/admin/settings/basic.php
new file mode 100644
index 000000000..9334ba81b
--- /dev/null
+++ b/views/default/admin/settings/basic.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ * Elgg administration site basic settings
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+echo elgg_view_form('admin/site/update_basic', array('class' => 'elgg-form-settings'));
diff --git a/views/default/admin/sidebar.php b/views/default/admin/sidebar.php
new file mode 100644
index 000000000..100ce2af8
--- /dev/null
+++ b/views/default/admin/sidebar.php
@@ -0,0 +1,8 @@
+<?php
+/**
+ * Admin sidebar -- just outputs the page menus
+ */
+
+$content = elgg_view_menu('page', array('sort_by' => 'priority', 'show_section_headers' => true));
+
+echo elgg_view_module('main', '', $content, array('class' => 'elgg-admin-sidebar-menu')); \ No newline at end of file
diff --git a/views/default/admin/site/advanced.php b/views/default/admin/site/advanced.php
deleted file mode 100644
index 00e63e95d..000000000
--- a/views/default/admin/site/advanced.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/**
- * Elgg administration site advanced settings
- *
- * @package Elgg
- * @subpackage Core
- */
-
-$action = elgg_get_site_url() . "action/admin/site/update_advanced";
-
-$form_body = "";
-
-foreach(array('wwwroot', 'path', 'dataroot', 'view') as $field) {
- $form_body .= "<p>";
- $form_body .= elgg_echo('installation:' . $field) . "<br />";
- $warning = elgg_echo('installation:warning:' . $field);
- if ($warning != 'installation:warning:' . $field) echo "<b>" . $warning . "</b><br />";
- $value = $vars['config']->$field;
- $form_body .= elgg_view("input/text",array('internalname' => $field, 'value' => $value));
- $form_body .= "</p>";
-}
-
-$form_body .= "<p>" . elgg_echo('admin:site:access:warning') . "<br />";
-$form_body .= elgg_echo('installation:sitepermissions') . elgg_view('input/access', array('internalname' => 'default_access','value' => $vars['config']->default_access)) . "</p>";
-$form_body .= "<p>" . elgg_echo('installation:allow_user_default_access:description') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:allow_user_default_access:label')), 'internalname' => 'allow_user_default_access', 'value' => ($vars['config']->allow_user_default_access ? elgg_echo('installation:allow_user_default_access:label') : "") )) . "</p>";
-$form_body .= "<p>" . elgg_echo('installation:simplecache:description') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:simplecache:label')), 'internalname' => 'simplecache_enabled', 'value' => ($vars['config']->simplecache_enabled ? elgg_echo('installation:simplecache:label') : "") )) . "</p>";
-$form_body .= "<p>" . elgg_echo('installation:viewpathcache:description') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:viewpathcache:label')), 'internalname' => 'viewpath_cache_enabled', 'value' => (($vars['config']->viewpath_cache_enabled) ? elgg_echo('installation:viewpathcache:label') : "") )) . "</p>";
-
-$debug_options = array('0' => elgg_echo('installation:debug:none'), 'ERROR' => elgg_echo('installation:debug:error'), 'WARNING' => elgg_echo('installation:debug:warning'), 'NOTICE' => elgg_echo('installation:debug:notice'));
-$form_body .= "<p>" . elgg_echo('installation:debug');
-$form_body .= elgg_view('input/pulldown', array('options_values' => $debug_options, 'internalname' => 'debug', 'value' => $vars['config']->debug));
-$form_body .= '</p>';
-
-// control new user registration
-$options = array(
- 'options' => array(elgg_echo('installation:registration:label')),
- 'internalname' => 'allow_registration',
- 'value' => $vars['config']->allow_registration ? elgg_echo('installation:registration:label') : '',
-);
-$form_body .= '<p>' . elgg_echo('installation:registration:description');
-$form_body .= '<br />' .elgg_view('input/checkboxes', $options) . '</p>';
-
-// control walled garden
-$options = array(
- 'options' => array(elgg_echo('installation:walled_garden:label')),
- 'internalname' => 'walled_garden',
- 'value' => $vars['config']->walled_garden ? elgg_echo('installation:walled_garden:label') : '',
-);
-$form_body .= '<p>' . elgg_echo('installation:walled_garden:description');
-$form_body .= '<br />' . elgg_view('input/checkboxes', $options) . '</p>';
-
-$form_body .= "<p>" . elgg_echo('installation:httpslogin') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:httpslogin:label')), 'internalname' => 'https_login', 'value' => ($vars['config']->https_login ? elgg_echo('installation:httpslogin:label') : "") )) . "</p>";
-
-$form_body .= "<p>" . elgg_echo('installation:disableapi') . "<br />";
-$on = elgg_echo('installation:disableapi:label');
-if ((isset($CONFIG->disable_api)) && ($CONFIG->disable_api == true)) {
- $on = ($vars['config']->disable_api ? "" : elgg_echo('installation:disableapi:label'));
-}
-$form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:disableapi:label')), 'internalname' => 'api', 'value' => $on ));
-$form_body .= "</p>";
-
-$form_body .= elgg_view('input/hidden', array('internalname' => 'settings', 'value' => 'go'));
-
-$form_body .= "<div class='divider'></div>".elgg_view('input/submit', array('value' => elgg_echo("save")));
-$form_body = "<div class='admin_settings site_admin margin_top'>".$form_body."</div>";
-echo elgg_view_title(elgg_echo('admin:site:advanced') . " " . elgg_echo('admin:site'));
-echo elgg_view('input/form', array('action' => $action, 'body' => $form_body));
diff --git a/views/default/admin/site/basic.php b/views/default/admin/site/basic.php
deleted file mode 100644
index f6b2d03e0..000000000
--- a/views/default/admin/site/basic.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/**
- * Elgg administration site basic settings
- *
- * @package Elgg
- * @subpackage Core
- */
-
-$action = elgg_get_site_url() . "action/admin/site/update_basic";
-
-$form_body = "";
-
-foreach(array('sitename','sitedescription', 'siteemail') as $field) {
- $form_body .= "<p>";
- $form_body .= elgg_echo('installation:' . $field) . "<br />";
- $warning = elgg_echo('installation:warning:' . $field);
- if ($warning != 'installation:warning:' . $field) echo "<b>" . $warning . "</b><br />";
- $value = $vars['config']->$field;
- $form_body .= elgg_view("input/text",array('internalname' => $field, 'value' => $value));
- $form_body .= "</p>";
-}
-
-$languages = get_installed_translations();
-$form_body .= "<p>" . elgg_echo('installation:language') . elgg_view("input/pulldown", array('internalname' => 'language', 'value' => $vars['config']->language, 'options_values' => $languages)) . "</p>";
-
-$form_body .= "<div class='divider'></div>".elgg_view('input/submit', array('value' => elgg_echo("save")));
-$form_body = "<div class='admin_settings site_admin margin_top'>".$form_body."</div>";
-echo elgg_view_title(elgg_echo('admin:site'));
-echo elgg_view('input/form', array('action' => $action, 'body' => $form_body));
diff --git a/views/default/admin/statistics/overview.php b/views/default/admin/statistics/overview.php
new file mode 100644
index 000000000..ac5aaac36
--- /dev/null
+++ b/views/default/admin/statistics/overview.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Elgg statistics screen
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+echo elgg_view('admin/statistics/extend');
+
+echo elgg_view_module('inline', elgg_echo('admin:statistics:label:basic'), elgg_view('admin/statistics/overview/basic'));
+
+echo elgg_view_module('inline', elgg_echo('admin:statistics:label:numentities'), elgg_view('admin/statistics/overview/numentities'));
diff --git a/views/default/admin/statistics/overview/basic.php b/views/default/admin/statistics/overview/basic.php
new file mode 100644
index 000000000..2c9b3b88e
--- /dev/null
+++ b/views/default/admin/statistics/overview/basic.php
@@ -0,0 +1,19 @@
+<?php
+// Work out number of users
+$users_stats = get_number_users();
+$total_users = get_number_users(true);
+
+// Get version information
+$version = get_version();
+$release = get_version(true);
+?>
+<table class="elgg-table-alt">
+ <tr class="odd">
+ <td><b><?php echo elgg_echo('admin:statistics:label:version'); ?> :</b></td>
+ <td><?php echo elgg_echo('admin:statistics:label:version:release'); ?> - <?php echo $release; ?>, <?php echo elgg_echo('admin:statistics:label:version:version'); ?> - <?php echo $version; ?></td>
+ </tr>
+ <tr class="even">
+ <td><b><?php echo elgg_echo('admin:statistics:label:numusers'); ?> :</b></td>
+ <td><?php echo $users_stats; ?> <?php echo elgg_echo('active'); ?> / <?php echo $total_users; ?> <?php echo elgg_echo('total') ?></td>
+ </tr>
+</table> \ No newline at end of file
diff --git a/views/default/admin/statistics/overview/numentities.php b/views/default/admin/statistics/overview/numentities.php
new file mode 100644
index 000000000..af4ae2773
--- /dev/null
+++ b/views/default/admin/statistics/overview/numentities.php
@@ -0,0 +1,40 @@
+<?php
+// Get entity statistics
+$entity_stats = get_entity_statistics();
+$even_odd = "";
+?>
+<table class="elgg-table-alt">
+<?php
+foreach ($entity_stats as $k => $entry) {
+ arsort($entry);
+ foreach ($entry as $a => $b) {
+
+ //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 {
+ if (empty($a)) {
+ $a = elgg_echo("item:{$k}");
+ } else {
+ $a = elgg_echo("item:{$k}:{$a}");
+ }
+
+ if (empty($a)) {
+ $a = "$k $a";
+ }
+ }
+
+ echo <<< END
+ <tr class="{$even_odd}">
+ <td>{$a}:</td>
+ <td>{$b}</td>
+ </tr>
+END;
+ }
+ }
+?>
+</table>
diff --git a/views/default/admin/statistics/server.php b/views/default/admin/statistics/server.php
new file mode 100644
index 000000000..9d21addc1
--- /dev/null
+++ b/views/default/admin/statistics/server.php
@@ -0,0 +1,8 @@
+<?php
+/**
+ * Server information
+ */
+
+echo elgg_view_module('inline', elgg_echo('admin:server:label:web_server'), elgg_view('admin/statistics/server/web_server'));
+
+echo elgg_view_module('inline', elgg_echo('admin:server:label:php'), elgg_view('admin/statistics/server/php'));
diff --git a/views/default/admin/statistics/server/php.php b/views/default/admin/statistics/server/php.php
new file mode 100644
index 000000000..7c6a51383
--- /dev/null
+++ b/views/default/admin/statistics/server/php.php
@@ -0,0 +1,50 @@
+<?php
+/**
+ * Server PHP info
+ */
+
+$php_log = ini_get('error_log');
+if (!$php_log) {
+ $php_log = elgg_echo('admin:server:error_log');
+}
+
+$post_max_size = elgg_get_ini_setting_in_bytes('post_max_size');
+$upload_max_filesize = elgg_get_ini_setting_in_bytes('upload_max_filesize');
+
+$post_max_size_warning = '';
+if ($upload_max_filesize > $post_max_size) {
+ // @todo show a link to something like http://nigel.mcnie.name/blog/uploadmaxfilesizepostmaxsize-experimentation ?
+ $post_max_size_warning = elgg_echo('admin:server:warning:post_max_too_small');
+}
+
+?>
+<table class="elgg-table-alt">
+ <tr class="odd">
+ <td><b><?php echo elgg_echo('admin:server:label:php_version'); ?> :</b></td>
+ <td><?php echo phpversion(); ?></td>
+ </tr>
+ <tr class="even">
+ <td><b><?php echo elgg_echo('admin:server:label:php_ini'); ?> :</b></td>
+ <td><?php echo php_ini_loaded_file(); ?></td>
+ </tr>
+ <tr class="odd">
+ <td><b><?php echo elgg_echo('admin:server:label:php_log'); ?> :</b></td>
+ <td><?php echo $php_log; ?></td>
+ </tr>
+ <tr class="even">
+ <td><b><?php echo elgg_echo('admin:server:label:mem_avail'); ?> :</b></td>
+ <td><?php echo number_format(elgg_get_ini_setting_in_bytes('memory_limit')); ?></td>
+ </tr>
+ <tr class="odd">
+ <td><b><?php echo elgg_echo('admin:server:label:mem_used'); ?> :</b></td>
+ <td><?php echo number_format(memory_get_peak_usage()); ?></td>
+ </tr>
+ <tr class="even">
+ <td><b><?php echo elgg_echo('admin:server:label:post_max_size'); ?> :</b></td>
+ <td><?php echo number_format($post_max_size); ?></td>
+ </tr>
+ <tr class="odd">
+ <td><b><?php echo elgg_echo('admin:server:label:upload_max_filesize'); ?> :</b></td>
+ <td><?php echo number_format($upload_max_filesize) . '&nbsp; ' . $post_max_size_warning; ?></td>
+ </tr>
+</table>
diff --git a/views/default/admin/statistics/server/web_server.php b/views/default/admin/statistics/server/web_server.php
new file mode 100644
index 000000000..904a54f4b
--- /dev/null
+++ b/views/default/admin/statistics/server/web_server.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Web server info
+ */
+
+?>
+<table class="elgg-table-alt">
+ <tr class="odd">
+ <td><b><?php echo elgg_echo('admin:server:label:server'); ?> :</b></td>
+ <td><?php echo $_SERVER['SERVER_SOFTWARE']; ?></td>
+ </tr>
+ <tr class="even">
+ <td><b><?php echo elgg_echo('admin:server:label:log_location'); ?> :</b></td>
+ <td><?php echo getenv('APACHE_LOG_DIR'); ?></td>
+ </tr>
+</table>
diff --git a/views/default/admin/users/add.php b/views/default/admin/users/add.php
index cc2da61db..6d22b9c29 100644
--- a/views/default/admin/users/add.php
+++ b/views/default/admin/users/add.php
@@ -3,5 +3,7 @@
* Display an add user form.
*/
-echo elgg_view_title(elgg_echo('admin:users'));
-echo elgg_view('account/forms/useradd', array('show_admin'=>true)); \ No newline at end of file
+$title = elgg_echo('adduser');
+$body = elgg_view_form('useradd', array(), array('show_admin' => true));
+
+echo elgg_view_module('inline', $title, $body); \ No newline at end of file
diff --git a/views/default/admin/users/admins.php b/views/default/admin/users/admins.php
new file mode 100644
index 000000000..9b175d437
--- /dev/null
+++ b/views/default/admin/users/admins.php
@@ -0,0 +1,12 @@
+<?php
+$admins = elgg_list_entities(array(), 'elgg_get_admins');
+
+?>
+<div class="elgg-module elgg-module-inline">
+ <div class="elgg-head">
+ <h3><?php echo elgg_echo('admin:statistics:label:admins'); ?></h3>
+ </div>
+ <div class="elgg-body">
+ <?php echo $admins; ?>
+ </div>
+</div>
diff --git a/views/default/admin/users/newest.php b/views/default/admin/users/newest.php
index 79de121e5..91a6fa338 100644
--- a/views/default/admin/users/newest.php
+++ b/views/default/admin/users/newest.php
@@ -1,17 +1,18 @@
<?php
// newest users
-if (is_plugin_enabled('profile')) {
- $users = elgg_list_entities(array(
- 'type' => 'user', 'subtype'=>null,
- 'full_view' => FALSE
- ));
+$users = elgg_list_entities(array(
+ 'type' => 'user',
+ 'subtype'=> null,
+ 'full_view' => FALSE
+));
- echo elgg_view_title(elgg_echo('admin:users'));
- ?>
+?>
- <div class="admin_settings members_list users_online">
+<div class="elgg-module elgg-module-inline">
+ <div class="elgg-head">
<h3><?php echo elgg_echo('admin:users:newest'); ?></h3>
+ </div>
+ <div class="elgg-body">
<?php echo $users; ?>
</div>
-<?php
-} \ No newline at end of file
+</div>
diff --git a/views/default/admin/users/online.php b/views/default/admin/users/online.php
index b172b994f..dbda06066 100644
--- a/views/default/admin/users/online.php
+++ b/views/default/admin/users/online.php
@@ -1,16 +1,13 @@
<?php
-// users online
-if ((is_plugin_enabled('search')) && (is_plugin_enabled('profile'))) {
- get_context('search');
- $users_online = get_online_users();
- get_context('admin');
-
- echo elgg_view_title(elgg_echo('admin:users'));
- ?>
- <div class="admin_settings members_list users_online">
+$users_online = get_online_users();
+
+?>
+<div class="elgg-module elgg-module-inline">
+ <div class="elgg-head">
<h3><?php echo elgg_echo('admin:statistics:label:onlineusers'); ?></h3>
+ </div>
+ <div class="elgg-body">
<?php echo $users_online; ?>
</div>
-<?php
-} \ No newline at end of file
+</div>