aboutsummaryrefslogtreecommitdiff
path: root/pages/tasks/world.php
blob: 93dcb276297a35332c766280a15e0b8e59504ce8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
 * List all tasks
 *
 * @package ElggTasks
 */

$title = elgg_echo('tasks:all');

elgg_pop_breadcrumb();
elgg_push_breadcrumb(elgg_echo('tasks'));

$lists = elgg_get_entities_from_metadata(array(
	'type' => 'object',
	'subtype' => 'task',
	'count' => true,
	'metadata_name' => 'list_guid',
	'metadata_value' => 0,
));

elgg_register_title_button('tasks', 'add');

$content = elgg_list_entities_from_metadata(array(
	'type' => 'object',
	'subtype' => 'task',
	'full_view' => false,
	'metadata_name' => 'list_guid',
	'metadata_value' => 0,
));
if (!$content) {
	$content = '<p>' . elgg_echo('tasks:none') . '</p>';
}

$body = elgg_view_layout('content', array(
	'filter_context' => 'all',
	'content' => $content,
	'title' => $title,
	'sidebar' => elgg_view('tasks/sidebar'),
));

echo elgg_view_page($title, $body);