'');
$extractParams = array(
'label');
/* verifica se todos os parâmetros obrigatórios foram passados */
foreach ($defaultValues as $key => $value)
if (!isset($params[$key]))
$params[$key] = $value;
/* atribui valores default para os parâmetros não passados */
foreach ($extractParams as $extract)
$$extract = $params[$extract];
$base_url = $GLOBALS['phpgw_info']['server']['webserver_url'];
$user_activities = $GLOBALS['workflow']['wf_user_activities']['data'];
$pid = $GLOBALS['workflow']['wf_process_id'];
$select_tag = "";
$output = '
' . $label . ' | ';
$output .= $select_tag . " |
";
$output .= <<
function redir_link() {
elem = document.getElementById("redir_menu");
activity = elem.options[elem.options.selectedIndex].value;
switch (activity){
case '0' :
break;
case 'ce' :
location.href = "$base_url/workflow/index.php?start_tab=0";
break;
case 'pr' :
location.href = "$base_url/workflow/index.php?start_tab=1";
break;
case 'ac' :
location.href = "$base_url/workflow/index.php?start_tab=2";
break;
case 'ap' :
location.href = "$base_url/workflow/index.php?start_tab=3";
break;
case 'og' :
location.href = "$base_url/workflow/index.php?start_tab=4";
break;
case 'ad' :
location.href = "$base_url/index.php?menuaction=workflow.ui_adminprocesses.form";
break;
case 'mo' :
location.href = "$base_url/index.php?menuaction=workflow.ui_monitors.form";
break;
default :
location.href = "$base_url/index.php?menuaction=workflow.run_activity.go&activity_id=" + activity;
}
}
EOF;
return $output;
}
?>