| ";
}
else {
$html .= " | ";
}
$html .= $obj->getDisplayName()." | ";
return $html;
}
function ach_render_obj_meta(&$obj) {
global $_CONF;
if($obj->isdone()) {
$col = "#71BE02";
$grey = "";
}
else {
$col = "#999999";
$grey = "grey/";
}
return "
getMetaImage()."?cacheid=".$_CONF['image_cdate']."' /> |
|
".$obj->getDisplayName()." |
";
}
function ach_render_obj_value(&$obj) {
$html = "";
if($obj->getName() != null) {
if($obj->isdone()) {
$col = "#71BE02";
}
else {
$col = "#999999";
}
$html .= "".$obj->getDisplayName()."";
}
$html .= ach_render_progressbar($obj->getProgress(),$obj->getValue(),250);
return $html;
}
function ach_render_progressbar($prog,$val,$width) {
$hero = false;
if($val == false) {
$hero = true;
$val = $prog;
}
$val = max(1,$val);
$left = floor($width*(100*($prog/$val))/100);
$left = max(1,$left);
$html = "
|
";
if($hero == false) {
if(($prog/$val) > 0.5) {
$html .= " ".nf($prog)." / ".nf($val)." ";
}
$html .= " |
";
if(($prog/$val) <= 0.5) {
$html .= " ".nf($prog)." / ".nf($val)." ";
}
}
else {
$html .= " ".nf($prog)." ";
}
$html .= " |
|
|
";
return $html;
}
function ach_render_summary_header() {
global $_USER;
return "".get_translation('ach_summary_header',$_USER->getLang())."";
}
function ach_render_summary_footer(&$summary) {
global $_USER;
$nodes = $summary->getSummary();
$html = "";
$sum_done = 0;
$sum_total = 0;
$i = 0;
foreach($nodes as $elem) {
if(($i%2) == 0) {
$html .= "";
}
$html .= "".$elem[0];
if($elem[3] == false) {
$html .= ach_render_progressbar($elem[1],$elem[2],150);
}
else {
$html .= ach_render_progressbar($elem[1],false,150);
}
$html .= "
| ";
$sum_done += $elem[1];
$sum_total += $elem[2];
if(($i%2) == 2) {
$html .= " ";
}
$i++;
}
if(($i%2) == 2) {
$html .= " |
";
}
$html = "