aboutsummaryrefslogtreecommitdiff
path: root/pages/tasks/friends.php
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-17 12:00:58 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-17 12:00:58 -0300
commit228d3697bcd0218605be2e28131574cc85293a2e (patch)
tree6a59c627f6226bd2b3056b959acc9cc871eb1f8f /pages/tasks/friends.php
downloadelgg-228d3697bcd0218605be2e28131574cc85293a2e.tar.gz
elgg-228d3697bcd0218605be2e28131574cc85293a2e.tar.bz2
Squashed 'mod/tasks/' content from commit c9b1097
git-subtree-dir: mod/tasks git-subtree-split: c9b1097ce081d6893f9c939146208559c089dc15
Diffstat (limited to 'pages/tasks/friends.php')
-rw-r--r--pages/tasks/friends.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/pages/tasks/friends.php b/pages/tasks/friends.php
new file mode 100644
index 000000000..cda0d6788
--- /dev/null
+++ b/pages/tasks/friends.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * List a user's friends' tasks
+ *
+ * @package ElggTasks
+ */
+
+$owner = elgg_get_page_owner_entity();
+if (!elgg_instanceof($owner, 'user')) {
+ forward('tasks/all');
+}
+
+elgg_register_title_button('tasks', 'add');
+
+elgg_push_breadcrumb($owner->name, "tasks/owner/$owner->username");
+elgg_push_breadcrumb(elgg_echo('friends'));
+
+$title = elgg_echo('tasks:friends');
+
+$content = list_user_friends_objects($owner->guid, 'task', 10, false);
+if (!$content) {
+ $content = elgg_echo('tasks:none');
+}
+
+$params = array(
+ 'filter_context' => 'friends',
+ 'content' => $content,
+ 'title' => $title,
+);
+
+$body = elgg_view_layout('content', $params);
+
+echo elgg_view_page($title, $body);