Merge branch 'sprint/221_tianshujie_25732' into 'master'
* Fix bug #25732. See merge request easycorp/zentaopms!4798
This commit is contained in:
@@ -1687,17 +1687,30 @@ class block extends control
|
||||
*/
|
||||
public function printExecutionBlock()
|
||||
{
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) return;
|
||||
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 0;
|
||||
$status = isset($this->params->type) ? $this->params->type : 'all';
|
||||
$pager = pager::init(0, $count, 1);
|
||||
|
||||
$this->app->loadLang('execution');
|
||||
$this->app->loadClass('pager', true);
|
||||
$pager = pager::init(0, $count, 1);
|
||||
|
||||
$projectPairs = array();
|
||||
if($this->config->systemMode == 'new') $projectPairs = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('type')->eq('project')->fetchPairs('id', 'name');
|
||||
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
|
||||
$this->view->executionStats = $this->loadModel('project')->getStats($projectID, $status, 0, 0, 30, 'id_asc', $pager);
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
|
||||
$executions = $this->loadModel('project')->getStats($projectID, $status, 0, 0, 30, 'id_asc', $pager);
|
||||
|
||||
foreach($executions as $index => $execution)
|
||||
{
|
||||
if(empty($execution->children)) continue;
|
||||
|
||||
foreach($execution->children as $child) $executions[] = $child;
|
||||
unset($executions[$index]);
|
||||
}
|
||||
|
||||
$this->view->executionStats = $executions;
|
||||
$this->view->projectPairs = $projectPairs;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,11 +41,9 @@
|
||||
<?php $id = 0; ?>
|
||||
<?php foreach($executionStats as $execution):?>
|
||||
<?php
|
||||
if(!empty($execution->children)) continue;
|
||||
|
||||
$appid = isset($_GET['entry']) ? "class='app-btn text-center' data-id='{$this->get->entry}'" : "class='text-center'";
|
||||
$viewLink = $this->createLink('execution', 'task', 'executionID=' . $execution->id);
|
||||
if($config->systemMode == 'new') $execution->name = zget($projectPairs, $execution->project, '') . ' / ' . $execution->name;
|
||||
if($config->systemMode == 'new' and isset($projectPairs[$execution->project])) $execution->name = zget($projectPairs, $execution->project, '') . ' / ' . $execution->name;
|
||||
?>
|
||||
<tr <?php echo $appid?>>
|
||||
<td class='c-name text-left' title='<?php echo $execution->name;?>'><nobr><?php echo html::a($viewLink, $execution->name, '', "title='$execution->name'");?></nobr></td>
|
||||
|
||||
@@ -609,7 +609,7 @@ class custom extends control
|
||||
if($this->config->edition != 'max') $this->loadModel('setting')->setItem('system.custom.hourPoint', $this->post->hourPoint);
|
||||
|
||||
$this->app->loadLang('common');
|
||||
$locate = $this->config->systemMode == 'new' ? 'parent' : 'top';
|
||||
$locate = $this->config->systemMode == 'new' ? inlink('flow') : 'top';
|
||||
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
|
||||
}
|
||||
|
||||
@@ -155,3 +155,4 @@
|
||||
.region .kanban-board .kanban-header-parent-col > .kanban-header-col > .title {max-width: 100% !important;}
|
||||
.region .kanban-board .kanban-header-sub-cols .kanban-header-col > .title > span {max-width: calc(100% - 165px) !important;}
|
||||
.region .kanban-board .kanban-header-sub-cols .kanban-header-col.left > .title > span {max-width: calc(100% - 120px) !important;}
|
||||
.executionName .delayed {margin-right: 10px;}
|
||||
|
||||
Reference in New Issue
Block a user