From 228d3697bcd0218605be2e28131574cc85293a2e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 17 Mar 2014 12:00:58 -0300 Subject: Squashed 'mod/tasks/' content from commit c9b1097 git-subtree-dir: mod/tasks git-subtree-split: c9b1097ce081d6893f9c939146208559c089dc15 --- pages/tasks/new_task.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pages/tasks/new_task.php (limited to 'pages/tasks/new_task.php') diff --git a/pages/tasks/new_task.php b/pages/tasks/new_task.php new file mode 100644 index 000000000..06a98466d --- /dev/null +++ b/pages/tasks/new_task.php @@ -0,0 +1,48 @@ +getContainerEntity(); + if (!$container) { + $container = elgg_get_logged_in_user_guid(); + } +} elseif (elgg_instanceof($list, 'user') || elgg_instanceof($list, 'group')) { + $container = $list; + // not a real list + $list_guid = null; +} + +elgg_set_page_owner_guid($container->getGUID()); + +if (elgg_instanceof($container, 'user')) { + elgg_push_breadcrumb($container->name, "tasks/owner/$container->username/"); +} elseif (elgg_instanceof($container, 'group')) { + elgg_push_breadcrumb($container->name, "tasks/group/$container->guid/all"); +} + +$title = elgg_echo('tasks:add'); +elgg_push_breadcrumb($title); + + +$vars = task_prepare_form_vars(null, $list_guid); + +$content = elgg_view_form('tasks/edit', array(), $vars); + +$body = elgg_view_layout('content', array( + 'filter' => '', + 'content' => $content, + 'title' => $title, +)); + +echo elgg_view_page($title, $body); -- cgit v1.2.3