Simple status box for the sidebar.
[elgg_plugins.git] / tasks / search.php
blobe2732fc9fc21e794e68cdcf591bb282408b8c919
1 <?php
3 require("../../includes.php");
4 global $page_owner;
7 $page_owner = optional_param('tasklist', $_SESSION['userid'], PARAM_INT);
8 $search_tag = optional_param('tag', '');
10 if (empty($search_tag)) {
11 header("Location: index.php?owner=".$page_owner);
12 exit;
16 define("context","tasks");
17 templates_page_setup();
20 $body = "";
22 $body .= tasks_display($page_owner,$_SESSION['userid'],gettext("Your tasks tagged with $search_tag on this tasklist"),false,$search_tag);
23 $body .= tasks_display(0 - $page_owner,$_SESSION['userid'],gettext("Your tasks tagged with $search_tag elsewhere"),false,$search_tag);
24 $body .= tasks_display($page_owner,-1,gettext("Other peoples' tasks tagged with $search_tag on this tasklist"),false,$search_tag);
25 $body .= tasks_display(0 - $page_owner,-1,gettext("Other peoples' tasks tagged with $search_tag elsewhere"),false,$search_tag);
27 $body .= "<h2>". gettext("Related resources") . "</h2>";
28 $body .= "<p><a href=\"" . $CFG->wwwroot . "search/all.php?tag=$search_tag&=all&=search\">" . gettext("Click here for related resources.") . "</a></p>";
30 $title = user_info("name",$page_owner) . " :: " . gettext("Tasks tagged with $search_tag");
32 $body = templates_draw( array(
33 'context' => 'contentholder',
34 'title' => $title,
35 'body' => $body
36 ));
38 echo templates_page_draw(array($title, $body));