Merge branch '180'

This commit is contained in:
孙广明
2022-01-04 22:41:23 +08:00
84 changed files with 627 additions and 253 deletions
+9 -12
View File
@@ -175,7 +175,7 @@ class execution extends control
setcookie('executionTaskOrder', $orderBy, 0, $this->config->webRoot, '', false, true);
/* Append id for secend sort. */
$sort = $this->loadModel('common')->appendOrder($orderBy);
$sort = common::appendOrder($orderBy);
/* Header and position. */
$this->view->title = $execution->name . $this->lang->colon . $this->lang->execution->task;
@@ -268,7 +268,7 @@ class execution extends control
/* Get tasks and group them. */
if(empty($groupBy))$groupBy = 'story';
if(($groupBy == 'story') and ($execution->type == 'ops'))$groupBy = 'status';
$sort = $this->loadModel('common')->appendOrder($groupBy);
$sort = common::appendOrder($groupBy);
$tasks = $this->loadModel('task')->getExecutionTasks($executionID, $productID = 0, $status = 'all', $modules = 0, $sort);
$groupBy = str_replace('`', '', $groupBy);
$taskLang = $this->lang->task;
@@ -730,7 +730,7 @@ class execution extends control
setcookie('executionStoryOrder', $orderBy, 0, $this->config->webRoot, '', false, true);
/* Append id for secend sort. */
$sort = $this->loadModel('common')->appendOrder($orderBy);
$sort = common::appendOrder($orderBy);
$queryID = ($type == 'bysearch') ? $param : 0;
$execution = $this->commonAction($executionID);
@@ -885,7 +885,7 @@ class execution extends control
$this->app->loadClass('pager', $static = true);
if($this->app->getViewType() == 'xhtml') $recPerPage = 10;
$pager = new pager($recTotal, $recPerPage, $pageID);
$sort = $this->loadModel('common')->appendOrder($orderBy);
$sort = common::appendOrder($orderBy);
$bugs = $this->bug->getExecutionBugs($executionID, $productID, $build, $type, $param, $sort, '', $pager);
$bugs = $this->bug->checkDelayedBugs($bugs);
$users = $this->user->getPairs('noletter');
@@ -1972,13 +1972,10 @@ class execution extends control
foreach($plans as $plan) $allPlans += $plan;
}
$userList = array();
$avatarPairs = $this->dao->select('account, avatar')->from(TABLE_USER)->where('deleted')->eq(0)->fetchPairs();
foreach($avatarPairs as $account => $avatar)
{
if(!$avatar) continue;
$userList[$account]['avatar'] = $avatar;
}
$userList = $this->dao->select('account, realname name, avatar')->from(TABLE_USER)->where('deleted')->eq(0)->fetchAll('account');
$userList['closed']['account'] = 'Closed';
$userList['closed']['name'] = 'Closed';
$userList['closed']['avatar'] = '';
$this->view->title = $this->lang->execution->kanban;
$this->view->position[] = html::a($this->createLink('execution', 'browse', "executionID=$executionID"), $execution->name);
@@ -2743,7 +2740,7 @@ class execution extends control
/* Append id for secend sort. */
$orderBy = $direction == 'next' ? 'date_desc' : 'date_asc';
$sort = $this->loadModel('common')->appendOrder($orderBy);
$sort = common::appendOrder($orderBy);
/* Set the menu. If the executionID = 0, use the indexMenu instead. */
$this->execution->setMenu($executionID);
+1 -1
View File
@@ -39,7 +39,7 @@ function renderUserAvatar(user, objectType, objectID, size)
if(objectType == 'story' && !priv.canAssignStory) return $noPrivAvatar;
if(objectType == 'bug' && !priv.canAssignBug) return $noPrivAvatar;
return $('<a class="avatar has-text ' + avatarSizeClass + ' avatar-circle iframe" href="' + link + '"/>').avatar({user: user});
return $('<a class="avatar has-text ' + avatarSizeClass + ' avatar-circle iframe" title="' + user.name + '" href="' + link + '"/>').avatar({user: user});
}
/**
+3 -3
View File
@@ -329,7 +329,7 @@ class executionModel extends model
->join('whitelist', ',')
->add('type', $type)
->stripTags($this->config->execution->editor->create['id'], $this->config->allowedTags)
->remove('products, workDays, delta, branch, uid, plans, teams, teamMembers')
->remove('products, workDays, delta, branch, uid, plans, teams, teamMembers, contactListMenu')
->get();
/* Check the workload format and total. */
@@ -487,7 +487,7 @@ class executionModel extends model
->setDefault('team', $this->post->name)
->join('whitelist', ',')
->stripTags($this->config->execution->editor->edit['id'], $this->config->allowedTags)
->remove('products, branch, uid, plans, syncStories')
->remove('products, branch, uid, plans, syncStories, contactListMenu')
->get();
if($this->config->systemMode == 'new' and (empty($execution->project) or $execution->project == $oldExecution->project)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end);
@@ -1324,7 +1324,7 @@ class executionModel extends model
$module = 'execution';
$method = 'testcase';
}
if($module == 'testtask' and ($method == 'view' || $method == 'create' || $method == 'edit'))
if($module == 'testtask' and ($method == 'view' || $method == 'create' || $method == 'edit' || $method == 'linkcase'))
{
$module = 'execution';
$method = 'testtask';
+6 -3
View File
@@ -227,9 +227,12 @@
</tr>
<tr class="hidden" id="whitelistBox">
<th><?php echo $lang->whitelist;?></th>
<td><?php echo html::select('whitelist[]', $users, $whitelist, 'class="form-control chosen" multiple');?></td>
<td></td>
<td></td>
<td colspan='2'>
<div class='input-group'>
<?php echo html::select('whitelist[]', $users, $whitelist, 'class="form-control chosen" multiple');?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName='whitelist'");?>
</div>
</td>
</tr>
<tr>
<td colspan='4' class='text-center form-actions'>
+6 -2
View File
@@ -191,8 +191,12 @@
</tr>
<tr class="<?php if($execution->acl == 'open') echo 'hidden';?>" id="whitelistBox">
<th><?php echo $lang->whitelist;?></th>
<td><?php echo html::select('whitelist[]', $users, $execution->whitelist, 'class="form-control chosen" multiple');?></td>
<td></td>
<td>
<div class='input-group'>
<?php echo html::select('whitelist[]', $users, $execution->whitelist, 'class="form-control chosen" multiple');?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName='whitelist'");?>
</div>
</td>
</tr>
<tr><td colspan='3' class='text-center form-actions'><?php echo html::submitButton() . ' ' . html::backButton();?></td></tr>
</table>