diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-07-07 15:38:08 -0400 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-07-07 15:38:08 -0400 |
commit | c16bdb97aac98799b2de39e97696a684f5c50a21 (patch) | |
tree | ad842a5b53ff23b54b7a21bbfd189b06d6adbdc4 | |
parent | 7ae5ea0f266b771451b9aa9a36ce8d8c196aed4b (diff) | |
download | elgg-c16bdb97aac98799b2de39e97696a684f5c50a21.tar.gz elgg-c16bdb97aac98799b2de39e97696a684f5c50a21.tar.bz2 |
Fixes #3669. Dashboard now registers for default widgets.
-rw-r--r-- | mod/dashboard/start.php | 26 | ||||
-rw-r--r-- | views/default/admin/appearance/default_widgets.php | 2 |
2 files changed, 27 insertions, 1 deletions
diff --git a/mod/dashboard/start.php b/mod/dashboard/start.php index 9de1ee4af..69572bd32 100644 --- a/mod/dashboard/start.php +++ b/mod/dashboard/start.php @@ -17,6 +17,8 @@ function dashboard_init() { 'priority' => 450, 'section' => 'alt', )); + + elgg_register_plugin_hook_handler('get_list', 'default_widgets', 'dashboard_default_widgets'); } function dashboard_page_handler() { @@ -42,3 +44,27 @@ function dashboard_page_handler() { echo elgg_view_page($title, $body); } + + +/** + * Register user dashboard with default widgets + * + * @param unknown_type $hook + * @param unknown_type $type + * @param unknown_type $return + * @param unknown_type $params + * @return array + */ +function dashboard_default_widgets($hook, $type, $return, $params) { + $return[] = array( + 'name' => elgg_echo('dashboard'), + 'widget_context' => 'dashboard', + 'widget_columns' => 3, + + 'event' => 'create', + 'entity_type' => 'user', + 'entity_subtype' => ELGG_ENTITIES_ANY_VALUE, + ); + + return $return; +}
\ No newline at end of file diff --git a/views/default/admin/appearance/default_widgets.php b/views/default/admin/appearance/default_widgets.php index 5ce0d0acf..4416dc8f6 100644 --- a/views/default/admin/appearance/default_widgets.php +++ b/views/default/admin/appearance/default_widgets.php @@ -34,7 +34,7 @@ if (!$widget_context && $list) { $current_info = null; $tabs = array(); foreach ($list as $info) { - $url = "admin/settings/default_widgets?widget_context={$info['widget_context']}"; + $url = "admin/appearance/default_widgets?widget_context={$info['widget_context']}"; $selected = false; if ($widget_context == $info['widget_context']) { $selected = true; |