aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-13 12:32:43 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-13 12:32:43 +0000
commitd611e9c962ce825eb7f4600f27f74c3dc477000f (patch)
treef5b600ce1ef7e27536548b514b3144ae138f1c7c /pages
parentf03c3bd5bfa8d8425121c769b27c4382147dec65 (diff)
downloadelgg-d611e9c962ce825eb7f4600f27f74c3dc477000f.tar.gz
elgg-d611e9c962ce825eb7f4600f27f74c3dc477000f.tar.bz2
Refs #2226 moving riverdashboard into core - need to clean up riverdashboard plugin and move to plugins repository and update plugins with new river views
git-svn-id: http://code.elgg.org/elgg/trunk@7610 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'pages')
-rw-r--r--pages/river.php59
1 files changed, 59 insertions, 0 deletions
diff --git a/pages/river.php b/pages/river.php
new file mode 100644
index 000000000..120ad4b57
--- /dev/null
+++ b/pages/river.php
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Main activity stream list page
+ */
+
+// $page_type comes from the page handler function
+
+$options = array();
+
+$type = get_input('type', 'all');
+$subtype = get_input('subtype', '');
+if ($subtype) {
+ $selector = "type=$type&subtype=$subtype";
+} else {
+ $selector = "type=$type";
+}
+
+if ($type != 'all') {
+ $options['type'] = $type;
+ if ($subtype) {
+ $options['subtype'] = $subtype;
+ }
+}
+
+switch ($page_type) {
+ case 'mine':
+ $title = elgg_echo('river:mine');
+ $page_filter = 'mine';
+ $options['subject_guid'] = get_loggedin_userid();
+ break;
+ case 'friends':
+ $title = elgg_echo('river:friends');
+ $page_filter = 'friends';
+ $options['relationship_guid'] = get_loggedin_userid();
+ $options['relationship'] = 'friend';
+ break;
+ default:
+ $title = elgg_echo('river:all');
+ $page_filter = 'all';
+ break;
+}
+
+$content = elgg_view('core/river/filter', array('selector' => $selector));
+
+$content .= elgg_list_river($options);
+
+$sidebar = elgg_view('core/river/sidebar');
+
+$params = array(
+ 'content' => $content,
+ 'sidebar' => $sidebar,
+ 'buttons' => '',
+ 'filter_context' => $page_filter,
+ 'class' => 'elgg-river-layout',
+);
+
+$body = elgg_view_layout('content', $params);
+
+echo elgg_view_page($title, $body);