recoding to use as plugin with CL
Dieser Commit ist enthalten in:
Ursprung
244621b05f
Commit
e8b0c80921
22 geänderte Dateien mit 2187 neuen und 2341 gelöschten Zeilen
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Project:
|
||||
* Contenido Content Management System
|
||||
|
|
@ -25,30 +26,26 @@
|
|||
* }}
|
||||
*
|
||||
*/
|
||||
|
||||
if(!defined('CON_FRAMEWORK')) {
|
||||
die('Illegal call');
|
||||
if (!defined('CON_FRAMEWORK')) {
|
||||
die('Illegal call');
|
||||
}
|
||||
|
||||
|
||||
$iIdMarked = (int) $_GET['idworkflow'];
|
||||
|
||||
plugin_include('workflow', 'classes/class.workflow.php');
|
||||
|
||||
$workflows = new Workflows;
|
||||
$sScript = '';
|
||||
if ($action == "workflow_delete")
|
||||
{
|
||||
$workflows->delete($idworkflow);
|
||||
if ($action == "workflow_delete") {
|
||||
$workflows->delete($idworkflow);
|
||||
$sScript = '<script type="text/javascript">
|
||||
var right_top = top.content.frames["right"].frames["right_top"];
|
||||
var right_bottom = top.content.frames["right"].frames["right_bottom"];
|
||||
|
||||
if (right_top) {
|
||||
right_top.location.href = "'.$sess->url('main.php?area=workflow&frame=3').'";
|
||||
right_top.location.href = "' . $sess->url('main.php?area=workflow&frame=3') . '";
|
||||
}
|
||||
if (right_bottom) {
|
||||
right_bottom.location.href = "'.$sess->url('main.php?area=workflow&frame=4').'";
|
||||
right_bottom.location.href = "' . $sess->url('main.php?area=workflow&frame=4') . '";
|
||||
}
|
||||
</script>';
|
||||
}
|
||||
|
|
@ -56,31 +53,29 @@ if ($action == "workflow_delete")
|
|||
$ui = new UI_Menu;
|
||||
$workflows->select("idclient = '$client' AND idlang = '$lang'");
|
||||
|
||||
while ($workflow = $workflows->next())
|
||||
{
|
||||
$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);
|
||||
while ($workflow = $workflows->next()) {
|
||||
$wfid = $workflow->getField("idworkflow");
|
||||
$wfname = $workflow->getField("name");
|
||||
$wfdescription = $workflow->getField("description");
|
||||
|
||||
$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" ');
|
||||
}
|
||||
|
||||
/* 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", "cl-workflow");
|
||||
$delDescr = sprintf(i18n("Do you really want to delete the following workflow:<br><br>%s<br>", "cl-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);
|
||||
|
||||
|
|
@ -91,7 +86,7 @@ $delScript = '
|
|||
function foo(){return true;}
|
||||
|
||||
/* Session-ID */
|
||||
var sid = "'.$sess->id.'";
|
||||
var sid = "' . $sess->id . '";
|
||||
|
||||
/* Create messageBox
|
||||
instance */
|
||||
|
|
@ -110,20 +105,18 @@ $delScript = '
|
|||
|
||||
}
|
||||
</script>';
|
||||
|
||||
|
||||
$sInitRowMark = "<script type=\"text/javascript\">
|
||||
if (document.getElementById('marked')) {
|
||||
row.markedRow = document.getElementById('marked');
|
||||
}
|
||||
</script>";
|
||||
|
||||
$msgboxInclude = ' <script type="text/javascript" src="scripts/messageBox.js.php?contenido='.$sess->id.'"></script>';
|
||||
$msgboxInclude = ' <script type="text/javascript" src="scripts/messageBox.js.php?contenido=' . $sess->id . '"></script>';
|
||||
$page = new UI_Page;
|
||||
$page->addScript('include', $msgboxInclude);
|
||||
$page->addScript('del',$delScript);
|
||||
$page->addScript('del', $delScript);
|
||||
$page->addScript('refresh', $sScript);
|
||||
$page->setMargin(0);
|
||||
$page->setContent($content.$sInitRowMark);
|
||||
$page->render();
|
||||
|
||||
?>
|
||||
$page->setContent($content . $sInitRowMark);
|
||||
$page->render();
|
||||
Laden …
Tabelle hinzufügen
Einen Link hinzufügen
In neuem Issue referenzieren