aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/river_widget/content.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/widgets/river_widget/content.php')
-rw-r--r--views/default/widgets/river_widget/content.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/views/default/widgets/river_widget/content.php b/views/default/widgets/river_widget/content.php
new file mode 100644
index 000000000..867fc9db6
--- /dev/null
+++ b/views/default/widgets/river_widget/content.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Activity widget content view
+ */
+
+$num = (int) $vars['entity']->num_display;
+
+$options = array(
+ 'limit' => $num,
+ 'pagination' => false,
+);
+
+if (elgg_in_context('dashboard')) {
+ if ($vars['entity']->content_type == 'friends') {
+ $options['relationship_guid'] = elgg_get_page_owner_guid();
+ $options['relationship'] = 'friend';
+ }
+} else {
+ $options['subject_guid'] = elgg_get_page_owner_guid();
+}
+
+$content = elgg_list_river($options);
+if (!$content) {
+ $content = elgg_echo('river:none');
+}
+
+echo $content;