'.$vars['entity']->title.'';
$m .= '';
$added_date = date("d.m.Y", $vars['entity']->time_created);
$owner_link = " getOwnerEntity()->getURL()."\">".$vars['entity']->getOwnerEntity()->name."";
/*translation:Added by*/
$m .= elgg_echo("task_manager:Added_by") . $owner_link . "
" . $added_date;
$m .= '
';
$m .= '';
}
if ($vars['entity']->startline) {
/*translation:Startline*/
$m .= "". timestampIntoDate($vars['entity']->startline) ."
";
}
if ($vars['entity']->deadline) {
/*translation:Deadline*/
$m .= "". timestampIntoDate($vars['entity']->deadline) ."
";
}
if ($vars['entity']->target) {
/*translation:Target*/
$m .= "";
$target = $vars['entity']->target;
if (is_string($target)) {
$target = array($target);
}
$target = array_map('strtolower', $target);
$targets = "";
foreach ($target as $tg) {
if ($targets)
$targets .= ", ";
$ge = get_entity($tg);
$targets .= $ge->name;
}
$m .= $targets;
$m .= "
";
}
if ($vars['entity']->lecturer) {
/*translation:Lecturer*/
$m .= "";
$lecturer = $vars['entity']->lecturer;
if (is_string($lecturer)) {
$lecturer = array($lecturer);
}
$lecturer = array_map('strtolower', $lecturer);
$lecturers = "";
foreach ($lecturer as $tg) {
if ($lecturers)
$lecturers .= ", ";
$ue = get_entity($tg);
$lecturers .= $ue->name;
}
$m .= $lecturers;
$m .= "
";
}
if ($vars['entity']->task) {
/*translation:Task*/
$m .= "";
$m .= autop($vars['entity']->task);
$m .= "
";
}
if ($vars['entity']->competencies) {
/*translation:Competencies*/
$m .= "";
$competencies = $vars['entity']->competencies;
if (is_string($competencies)) {
$competencies = array($competencies);
}
$competencies = array_map('strtolower', $competencies);
$competenciess = "";
foreach ($competencies as $tg) {
if ($competenciess)
$competenciess .= ", ";
$competenciess .= get_competency($tg);
}
$m .= $competenciess;
$m .= "
";
}
$sub_tasks = getSubTaskEntities($vars['entity']->getGUID());
if ($vars['entity']->hassubtasks) {
/*translation:Subtasks*/
$m .= "";
$m .= '
';
foreach ($sub_tasks as $sub_task) {
$color = " box_past";
if ($sub_task->deadline > time()) {
if ($sub_task->deadline > (time() + (1 * 24 * 60 * 60)) ) {
$color = " box_future";
} else {
$color = " box_soon";
}
}
$m .= "
";
}
$m .= "
";
$m .= '';
}
echo $m;
echo "";
if (canReflect($vars['entity']->target)) {
$reflectbuttonview = "";
/*translation:Answers*/
$reflectbuttonview .= "
";
$answer_entities = get_entities_from_relationship("hasAnswers", $vars['entity']->getGUID(), false, "object", "blog", 0, "", 9999, 0, false, 0);
if ($vars['entity']->canEdit() && $answer_entities) {
foreach ($answer_entities as $answer) {
$reflectbuttonview .= "
getUrl() . "\">" . $answer->title;
$reflectbuttonview .= "";
}
}
$reflectbuttonview .= "
";
$my_answer = get_entities_from_relationship("hasAnswers", $vars['entity']->getGUID(), false, "object", "blog", $_SESSION['guid'], "", 9999, 0, false, 0);
if ($my_answer) {
/*translation:Read reflection*/
$reflectbuttonview .= elgg_view('input/submit', array('internalname' => 'readreflectbutton', 'value' => elgg_echo('task_manager:read_reflection')));
/*translation:Edit reflection*/
$reflectbuttonview .= elgg_view('input/submit', array('internalname' => 'rereflectbutton', 'value' => elgg_echo('task_manager:change_reflection')));
$reflectbuttonview .= elgg_view('input/hidden', array('internalname' => 'answer_guid', 'value' => $my_answer[0]->getGUID()));
} else {
/*translation:Reflect*/
$reflectbuttonview .= elgg_view('input/submit', array('internalname' => 'reflectbutton', 'value' => elgg_echo('task_manager:reflect')));
$reflectbuttonview .= elgg_view('input/hidden', array('internalname' => 'entity_guid', 'value' => $vars['entity']->getGUID()));
}
echo elgg_view("input/form", array("action" => "{$CONFIG->wwwroot}action/task_manager/goreflect", "body" => $reflectbuttonview));
}
if ($vars['entity']->canEdit()) {
$editbuttonview = elgg_view('input/submit', array('internalname' => 'editbutton', 'value' => elgg_echo('edit')));
$editbuttonview .= elgg_view('input/hidden', array('internalname' => 'entity_guid', 'value' => $vars['entity']->getGUID()));
echo elgg_view("input/form", array("action" => "{$CONFIG->wwwroot}action/task_manager/goedit", "body" => $editbuttonview));
$delbuttonview = "
";
$delbuttonview .= elgg_view('input/hidden', array('internalname' => 'task', 'value' => $vars['entity']->getGUID()));
echo elgg_view('input/form', array('action' => "{$CONFIG->wwwroot}action/task_manager/delete_task", 'body' => $delbuttonview, 'internalname' => 'delform'));
}
echo "
";
}
?>