From 3f293fe7b5deae93bc90e8f9f30a6b5ae221ea2e Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 20 May 2011 02:51:33 +0000 Subject: Refs #3340 pulls dashboard out as plugin git-svn-id: http://code.elgg.org/elgg/trunk@9108 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/dashboard/manifest.xml | 16 ++++++++++ mod/dashboard/start.php | 42 +++++++++++++++++++++++++ mod/dashboard/views/default/dashboard/blurb.php | 17 ++++++++++ 3 files changed, 75 insertions(+) create mode 100644 mod/dashboard/manifest.xml create mode 100644 mod/dashboard/start.php create mode 100644 mod/dashboard/views/default/dashboard/blurb.php (limited to 'mod/dashboard') diff --git a/mod/dashboard/manifest.xml b/mod/dashboard/manifest.xml new file mode 100644 index 000000000..b5e9cff2e --- /dev/null +++ b/mod/dashboard/manifest.xml @@ -0,0 +1,16 @@ + + + User Dashboard + Core developers + 1.8 + bundled + A widget-based dashboard for your users + http://www.elgg.org/ + See COPYRIGHT.txt + GNU Public License version 2 + + elgg_version + 2010030101 + + advanced + \ No newline at end of file diff --git a/mod/dashboard/start.php b/mod/dashboard/start.php new file mode 100644 index 000000000..4fa048b3d --- /dev/null +++ b/mod/dashboard/start.php @@ -0,0 +1,42 @@ + 'dashboard', + 'href' => 'dashboard', + 'text' => elgg_view_icon('home') . elgg_echo('dashboard'), + 'priority' => 450, + 'section' => 'alt', + )); +} + +function dashboard_page_handler() { + // Ensure that only logged-in users can see this page + gatekeeper(); + + // Set context and title + elgg_set_context('dashboard'); + elgg_set_page_owner_guid(elgg_get_logged_in_user_guid()); + $title = elgg_echo('dashboard'); + + // wrap intro message in a div + $intro_message = elgg_view('dashboard/blurb'); + + $params = array( + 'content' => $intro_message, + 'num_columns' => 3, + 'show_access' => false, + ); + $widgets = elgg_view_layout('widgets', $params); + + $body = elgg_view_layout('one_column', array('content' => $widgets)); + + echo elgg_view_page($title, $body); +} diff --git a/mod/dashboard/views/default/dashboard/blurb.php b/mod/dashboard/views/default/dashboard/blurb.php new file mode 100644 index 000000000..202be1dc5 --- /dev/null +++ b/mod/dashboard/views/default/dashboard/blurb.php @@ -0,0 +1,17 @@ + + +
+ 'dashboard-info', + 'class' => 'elgg-inner elgg-border-plain pam mhs mbl mtn', + 'value' => elgg_echo("dashboard:nowidgets"), + )); + +?> +
\ No newline at end of file -- cgit v1.2.3