From 199b22e79c6c9f6673fc2c65c28fcc2a2078fab3 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 19 Mar 2011 18:37:25 +0000 Subject: Fixes #3171 added river widget using same name as 1.7 riverdashboard plugin git-svn-id: http://code.elgg.org/elgg/trunk@8774 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/widgets/river_widget/content.php | 27 ++++++++++++++++ views/default/widgets/river_widget/edit.php | 45 ++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 views/default/widgets/river_widget/content.php create mode 100644 views/default/widgets/river_widget/edit.php (limited to 'views/default') diff --git a/views/default/widgets/river_widget/content.php b/views/default/widgets/river_widget/content.php new file mode 100644 index 000000000..427fd92bf --- /dev/null +++ b/views/default/widgets/river_widget/content.php @@ -0,0 +1,27 @@ +num_display; + +$options = array( + 'limit' => $num, + 'pagination' => false, +); + +if (elgg_in_context('profile')) { + $options['subject_guid'] = elgg_get_page_owner_guid(); +} else { + if ($vars['entity']->content_type == 'friends') { + $options['relationship_guid'] = elgg_get_logged_in_user_guid(); + $options['relationship'] = 'friend'; + } +} + +$content = elgg_list_river($options); +if (!$content) { + $content = elgg_echo('river:none'); +} + +echo $content; diff --git a/views/default/widgets/river_widget/edit.php b/views/default/widgets/river_widget/edit.php new file mode 100644 index 000000000..e0351e883 --- /dev/null +++ b/views/default/widgets/river_widget/edit.php @@ -0,0 +1,45 @@ +content_type)) { + $vars['entity']->content_type = 'friends'; + } + $params = array( + 'name' => 'params[content_type]', + 'value' => $vars['entity']->content_type, + 'options_values' => array( + 'friends' => elgg_echo('river:widgets:friends'), + 'all' => elgg_echo('river:widgets:all'), + ), + ); + $type_dropdown = elgg_view('input/dropdown', $params); + ?> +
+ : + +
+ num_display)) { + $vars['entity']->num_display = 8; +} + +$params = array( + 'name' => 'params[num_display]', + 'value' => $vars['entity']->num_display, + 'options' => array(5, 8, 10, 12, 15, 20), +); +$num_dropdown = elgg_view('input/dropdown', $params); + +?> +
+ : + +
-- cgit v1.2.3