$wfid = $workflow->getField("idworkflow");
    $wfname = $workflow->getField("name");
    $wfdescription = $workflow->getField("description");
    /* Create the link to show/edit the workflow */
    $link = new Link();
    $link->setMultiLink("workflow", "", "workflow_common", "workflow_show");
    $link->setAlt($wfdescription);
    $link->setCustom("idworkflow", $wfid);
    $delTitle = i18n("Delete workflow", "workflow");
    $delDescr = sprintf(i18n("Do you really want to delete the following workflow:<br><br>%s<br>", "workflow"), $wfname);
    $delete = '<a title="' . $delTitle . '" href="javascript://" onclick="box.confirm(\'' . $delTitle . '\', \'' . $delDescr . '\', \'deleteWorkflow(\\\'' . $wfid . '\\\')\')"><img src="' . $cfg['path']['images'] . 'delete.gif" border="0" title="' . $delTitle . '" alt="' . $delTitle . '"></a>';
    $ui->setTitle($wfid, $wfname);
    $ui->setLink($wfid, $link);
    $ui->setActions($wfid, 'delete', $delete);
    if ($wfid == $iIdMarked) {
        $ui->setExtra($wfid, 'id="marked" ');
    }
}
$content = $ui->render(false);
$delScript = '
    <script type="text/javascript">

        
        function foo(){return true;}

        /* Session-ID */
        var sid = "' . $sess->id . '";

        /* Create messageBox
           instance */
        box = new messageBox("", "", "", 0, 0);
function getWorkflowList()
{
    global $idworkflow, $cfg;
    $ui = new UI_Menu();
    $workflowitems = new WorkflowItems();
    $workflowitems->select("idworkflow = '{$idworkflow}'", "", "position ASC");
    while ($workflowitem = $workflowitems->next()) {
        $pos = $workflowitem->get("position");
        $name = $workflowitem->get("name");
        $id = $workflowitem->get("idworkflowitem");
        $edititem = new Link();
        $edititem->setCLink("workflow_steps", 4, "workflow_step_edit");
        $edititem->setCustom("idworkflowitem", $id);
        $edititem->setCustom("idworkflow", $idworkflow);
        $moveup = new Link();
        $moveup->setCLink("workflow_steps", 4, "workflow_step_up");
        $moveup->setCustom("idworkflowitem", $id);
        $moveup->setCustom("idworkflow", $idworkflow);
        $moveup->setCustom("position", $pos);
        $moveup->setAlt(i18n("Move step up", "workflow"));
        $moveup->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/no_verschieben.gif" . '">');
        $movedown = new Link();
        $movedown->setCLink("workflow_steps", 4, "workflow_step_down");
        $movedown->setCustom("idworkflowitem", $id);
        $movedown->setCustom("idworkflow", $idworkflow);
        $movedown->setCustom("position", $pos);
        $movedown->setAlt(i18n("Move step down", "workflow"));
        $movedown->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/nu_verschieben.gif" . '">');
        $deletestep = new Link();
        $deletestep->setCLink("workflow_steps", 4, "workflow_step_delete");
        $deletestep->setCustom("idworkflowitem", $id);
        $deletestep->setCustom("idworkflow", $idworkflow);
        $deletestep->setCustom("position", $pos);
        $deletestep->setAlt(i18n("Delete step", "workflow"));
        $deletestep->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/workflow_step_delete.gif" . '">');
        $ui->setTitle($id, "{$pos}. {$name}");
        $ui->setLink($id, $edititem);
        if ($pos > 1) {
            $ui->setActions($id, "moveup", $moveup->render());
        } else {
            $ui->setActions($id, "moveup", '<img style="padding-left: 2px" src="images/spacer.gif" width="15" height="1">');
        }
        if ($pos < $workflowitems->count()) {
            $ui->setActions($id, "movedown", $movedown->render());
        } else {
            $ui->setActions($id, "movedown", '<img style="padding-left: 2px" src="images/spacer.gif" width="15" height="1">');
        }
        $ui->setActions($id, "delete", $deletestep->render());
        if ($_GET['idworkflowitem'] == $id) {
            $ui->setExtra($id, 'id="marked" ');
        }
    }
    $content = $ui->render(false);
    return $content;
}