From 771c5e5909e69f614372f6bfb43300647e5aa5e1 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 13 Feb 2009 13:03:33 +0000 Subject: New river dashboard. git-svn-id: https://code.elgg.org/elgg/trunk@2737 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/riverdashboard/index.php | 44 +++++++++++++++++++ mod/riverdashboard/start.php | 27 ++++++++++++ .../views/default/riverdashboard/nav.php | 50 ++++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 mod/riverdashboard/index.php create mode 100644 mod/riverdashboard/start.php create mode 100644 mod/riverdashboard/views/default/riverdashboard/nav.php (limited to 'mod/riverdashboard') diff --git a/mod/riverdashboard/index.php b/mod/riverdashboard/index.php new file mode 100644 index 000000000..d4be29b85 --- /dev/null +++ b/mod/riverdashboard/index.php @@ -0,0 +1,44 @@ + + * @copyright Curverider Ltd 2008-2009 + * @link http://elgg.org/ + */ + + require_once(dirname(dirname(dirname(__FILE__))) . '/engine/start.php'); + + gatekeeper(); + + $subtype = get_input('content',''); + $orient = get_input('display'); + + if ($subtype == 'all') $subtype = ''; + + switch($orient) { + case 'mine': + $subject_guid = $_SESSION['user']->guid; + $relationship_type = ''; + break; + case 'friends': $subject_guid = $_SESSION['user']->guid; + $relationship_type = 'friend'; + break; + default: $subject_guid = 0; + $relationship_type = ''; + break; + } + + $river = elgg_view_river_items($subject_guid, 0, $relationship_type, '', $subtype, ''); + $body = elgg_view('riverdashboard/nav',array( + 'subtype' => $subtype, + 'orient' => $orient + )); + $body .= $river; + + echo page_draw(elgg_echo('dashboard'),elgg_view_layout('two_column_left_sidebar','',$body)); + +?> \ No newline at end of file diff --git a/mod/riverdashboard/start.php b/mod/riverdashboard/start.php new file mode 100644 index 000000000..b99cff0a0 --- /dev/null +++ b/mod/riverdashboard/start.php @@ -0,0 +1,27 @@ + + * @copyright Curverider Ltd 2008-2009 + * @link http://elgg.org/ + */ + + function riverdashboard_init() { + + register_page_handler('dashboard','riverdashboard_dashboard'); + + } + + function riverdashboard_dashboard() { + + include(dirname(__FILE__) . '/index.php'); + + } + + register_plugin_hook('init','system','riverdashboard_init'); + +?> \ No newline at end of file diff --git a/mod/riverdashboard/views/default/riverdashboard/nav.php b/mod/riverdashboard/views/default/riverdashboard/nav.php new file mode 100644 index 000000000..a6e3a9381 --- /dev/null +++ b/mod/riverdashboard/views/default/riverdashboard/nav.php @@ -0,0 +1,50 @@ +registered_entities['object'])) { + foreach ($vars['config']->registered_entities['object'] as $object) + $contents['item:object:'.$object] = $object; + } + + $allselect = ''; $friendsselect = ''; $mineselect = ''; + switch($vars['orient']) { + case '': $allselect = 'class="riverdashboard_tabs_selected"'; + break; + case 'friends': $friendsselect = 'class="riverdashboard_tabs_selected"'; + break; + case 'mine': $mineselect = 'class="riverdashboard_tabs_selected"'; + break; + } + +?> + +
+ + +
+
+ + + +
+
+
\ No newline at end of file -- cgit v1.2.3