* Finish task #53548.

This commit is contained in:
wangyuting2
2022-05-11 15:05:13 +08:00
parent 952d354b46
commit d4ed89e64a
11 changed files with 268 additions and 143 deletions
+32
View File
@@ -4033,4 +4033,36 @@ class executionModel extends model
}
$this->dao->update(TABLE_PROJECT)->set('path')->eq($path['path'])->set('grade')->eq($path['grade'])->where('id')->eq($execution->id)->exec();
}
/**
* Build execution action menu.
*
* @param object $execution
* @param string $type
* @access public
* @return string
*/
public function buildOperateMenu($execution, $type = 'view')
{
if($execution->deleted) return '';
$menu = '';
$params = "executionID=$execution->id";
$menu .= "<div class='divider'></div>";
$menu .= $this->buildMenu('execution', 'start', $params, $execution, $type, '', '', 'iframe', true);
$menu .= $this->buildMenu('execution', 'activate', $params, $execution, $type, '', '', 'iframe', true);
$menu .= $this->buildMenu('execution', 'putoff', $params, $execution, $type, '', '', 'iframe', true);
$menu .= $this->buildMenu('execution', 'suspend', $params, $execution, $type, '', '', 'iframe', true);
$menu .= $this->buildMenu('execution', 'close', $params, $execution, $type, '', '', 'iframe', true);
$menu .= "<div class='divider'></div>";
$menu .= $this->buildFlowMenu('execution', $execution, 'view', 'direct');
$menu .= "<div class='divider'></div>";
$menu .= $this->buildMenu('execution', 'edit', "execution=$execution->id", $execution);
$menu .= $this->buildMenu('execution', 'delete', "execution=$execution->id", $execution, 'button', 'trash', 'hiddenwin');
return $menu;
}
}
+3 -20
View File
@@ -146,26 +146,9 @@
</div>
<div class='main-actions'>
<div class="btn-toolbar">
<?php
$params = "execution=$execution->id";
$browseLink = $this->session->executionList ? $this->session->executionList : inlink('browse', "executionID=$execution->id");
common::printBack($browseLink);
if(!$execution->deleted)
{
echo "<div class='divider'></div>";
common::printIcon('execution', 'start', "executionID=$execution->id", $execution, 'button', '', '', 'iframe', true);
common::printIcon('execution', 'activate', "executionID=$execution->id", $execution, 'button', '', '', 'iframe', true);
common::printIcon('execution', 'putoff', "executionID=$execution->id", $execution, 'button', '', '', 'iframe', true);
common::printIcon('execution', 'suspend', "executionID=$execution->id", $execution, 'button', '', '', 'iframe', true);
common::printIcon('execution', 'close', "executionID=$execution->id", $execution, 'button', '', '', 'iframe', true);
echo $this->buildOperateMenu($execution, 'view');
echo "<div class='divider'></div>";
common::printIcon('execution', 'edit', $params, $execution);
common::printIcon('execution', 'delete', $params, $execution, 'button', 'trash', 'hiddenwin');
}
?>
<?php $browseLink = $this->session->executionList ? $this->session->executionList : inlink('browse', "executionID=$execution->id");?>
<?php common::printBack($browseLink);?>
<?php echo $this->buildOperateMenu($execution, 'view');?>
</div>
</div>
</div>