* custom show deleted user.
This commit is contained in:
+10
-9
@@ -147,7 +147,7 @@ class bug extends control
|
||||
$this->view->param = $param;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->memberPairs = $this->user->getPairs('noletter');
|
||||
$this->view->memberPairs = $this->user->getPairs('noletter|nodeleted');
|
||||
$this->view->branch = $branch;
|
||||
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
|
||||
$this->view->setShowModule = true;
|
||||
@@ -205,7 +205,7 @@ class bug extends control
|
||||
*/
|
||||
public function create($productID, $branch = '', $extras = '')
|
||||
{
|
||||
$this->view->users = $this->user->getPairs('devfirst|noclosed');
|
||||
$this->view->users = $this->user->getPairs('devfirst|noclosed|nodeleted');
|
||||
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
|
||||
$this->app->loadLang('release');
|
||||
|
||||
@@ -423,7 +423,7 @@ class bug extends control
|
||||
$this->view->productID = $productID;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->builds = $builds;
|
||||
$this->view->users = $this->user->getPairs('devfirst');
|
||||
$this->view->users = $this->user->getPairs('devfirst|nodeleted');
|
||||
$this->view->projects = $this->product->getProjectPairs($productID, $branch ? "0,$branch" : 0, $params = 'nodeleted');
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $branch);
|
||||
@@ -576,7 +576,7 @@ class bug extends control
|
||||
$this->view->stories = $bug->project ? $this->story->getProjectStoryPairs($bug->project) : $this->story->getProductStoryPairs($bug->product, $bug->branch);
|
||||
$this->view->branches = $this->session->currentProductType == 'normal' ? array() : $this->loadModel('branch')->getPairs($bug->product);
|
||||
$this->view->tasks = $this->task->getProjectTaskPairs($bug->project);
|
||||
$this->view->users = $this->user->getPairs('', "$bug->assignedTo,$bug->resolvedBy,$bug->closedBy,$bug->openedBy");
|
||||
$this->view->users = $this->user->getPairs('nodeleted', "$bug->assignedTo,$bug->resolvedBy,$bug->closedBy,$bug->openedBy");
|
||||
$this->view->openedBuilds = $openedBuilds;
|
||||
$this->view->resolvedBuilds = array('' => '') + $openedBuilds + $oldResolvedBuild;
|
||||
$this->view->actions = $this->action->getList('bug', $bugID);
|
||||
@@ -685,7 +685,7 @@ class bug extends control
|
||||
$appendUsers[$bug->assignedTo] = $bug->assignedTo;
|
||||
$appendUsers[$bug->resolvedBy] = $bug->resolvedBy;
|
||||
}
|
||||
$users = $this->user->getPairs('devfirst', $appendUsers);
|
||||
$users = $this->user->getPairs('devfirst|nodeleted', $appendUsers);
|
||||
$users = array('' => '', 'ditto' => $this->lang->bug->ditto) + $users;
|
||||
|
||||
/* Assign. */
|
||||
@@ -738,7 +738,7 @@ class bug extends control
|
||||
$this->view->title = $this->products[$bug->product] . $this->lang->colon . $this->lang->bug->assignedTo;
|
||||
$this->view->position[] = $this->lang->bug->assignedTo;
|
||||
|
||||
$this->view->users = $this->user->getPairs('', $bug->assignedTo);
|
||||
$this->view->users = $this->user->getPairs('nodeleted', $bug->assignedTo);
|
||||
$this->view->bug = $bug;
|
||||
$this->view->bugID = $bugID;
|
||||
$this->view->actions = $this->action->getList('bug', $bugID);
|
||||
@@ -828,7 +828,7 @@ class bug extends control
|
||||
$this->view->position[] = $this->lang->bug->confirmBug;
|
||||
|
||||
$this->view->bug = $bug;
|
||||
$this->view->users = $this->user->getPairs('', $bug->assignedTo);
|
||||
$this->view->users = $this->user->getPairs('nodeleted', $bug->assignedTo);
|
||||
$this->view->actions = $this->action->getList('bug', $bugID);
|
||||
$this->display();
|
||||
}
|
||||
@@ -960,7 +960,7 @@ class bug extends control
|
||||
$this->view->position[] = $this->lang->bug->activate;
|
||||
|
||||
$this->view->bug = $bug;
|
||||
$this->view->users = $this->user->getPairs('', $bug->resolvedBy);
|
||||
$this->view->users = $this->user->getPairs('nodeleted', $bug->resolvedBy);
|
||||
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $bug->branch, 'noempty');
|
||||
$this->view->actions = $this->action->getList('bug', $bugID);
|
||||
|
||||
@@ -1283,6 +1283,7 @@ class bug extends control
|
||||
* AJAX: get team members of the latest project of a product as assignedTo list.
|
||||
*
|
||||
* @param int $productID
|
||||
* x
|
||||
* @param string $selectedUser
|
||||
* @access public
|
||||
* @return string
|
||||
@@ -1296,7 +1297,7 @@ class bug extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$projectMembers = $this->loadModel('user')->getPairs('devfirst|noclosed');
|
||||
$projectMembers = $this->loadModel('user')->getPairs('devfirst|noclosed|nodeleted');
|
||||
}
|
||||
|
||||
die(html::select('assignedTo', $projectMembers, $selectedUser, 'class="form-control"'));
|
||||
|
||||
@@ -455,7 +455,7 @@ class bugModel extends model
|
||||
*/
|
||||
public function getModuleOwner($moduleID, $productID)
|
||||
{
|
||||
$users = $this->loadModel('user')->getPairs();
|
||||
$users = $this->loadModel('user')->getPairs('nodeleted');
|
||||
|
||||
if($moduleID)
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@ class build extends control
|
||||
$this->view->products = $products;
|
||||
$this->view->lastBuild = $this->build->getLast($projectID);
|
||||
$this->view->productGroups = $productGroups;
|
||||
$this->view->users = $this->user->getPairs();
|
||||
$this->view->users = $this->user->getPairs('nodeleted');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ class company extends control
|
||||
$this->view->projects = $projects;
|
||||
|
||||
/* Get users.*/
|
||||
$users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
|
||||
$users[''] = $this->lang->company->user;
|
||||
$this->view->users = $users;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ class custom extends control
|
||||
if(($module == 'story' or $module == 'testcase') and $field == 'review')
|
||||
{
|
||||
$this->app->loadConfig($module);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
|
||||
$this->view->needReview = zget($this->config->$module, 'needReview', 1);
|
||||
$this->view->forceReview = zget($this->config->$module, 'forceReview', '');
|
||||
}
|
||||
@@ -72,6 +72,11 @@ class custom extends control
|
||||
$this->view->blockPairs = $this->block->getClosedBlockPairs($closedBlock);
|
||||
$this->view->closedBlock = $closedBlock;
|
||||
}
|
||||
if($module == 'user' and $field == 'deleted')
|
||||
{
|
||||
$this->loadModel('user');
|
||||
$this->view->showDeleted = isset($this->config->user->showDeleted) ? $this->config->user->showDeleted : '0';
|
||||
}
|
||||
|
||||
if(strtolower($_SERVER['REQUEST_METHOD']) == "post")
|
||||
{
|
||||
@@ -93,6 +98,11 @@ class custom extends control
|
||||
$data = fixer::input('post')->join('closed', ',')->get();
|
||||
$this->loadModel('setting')->setItem('system.block.closed', zget($data, 'closed', ''));
|
||||
}
|
||||
elseif($module == 'user' and $field == 'deleted')
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
$this->loadModel('setting')->setItem('system.user.showDeleted', $data->showDeleted);
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang = $_POST['lang'];
|
||||
|
||||
@@ -67,8 +67,9 @@ $lang->custom->todo->fields['typeList'] = 'Type';
|
||||
$lang->custom->todo->fields['statusList'] = 'Status';
|
||||
|
||||
$lang->custom->user = new stdClass();
|
||||
$lang->custom->user->fields['roleList'] = 'Role';
|
||||
$lang->custom->user->fields['statusList'] = 'Status';
|
||||
$lang->custom->user->fields['roleList'] = 'Role';
|
||||
$lang->custom->user->fields['statusList'] = 'Status';
|
||||
$lang->custom->user->fields['deleted'] = 'Show deleted user';
|
||||
|
||||
$lang->custom->block->fields['closed'] = 'Closed Block';
|
||||
|
||||
@@ -94,6 +95,9 @@ $lang->custom->forceReview = 'Review Required';
|
||||
$lang->custom->reviewList[1] = 'On';
|
||||
$lang->custom->reviewList[0] = 'Off';
|
||||
|
||||
$lang->custom->deletedList[1] = 'Show';
|
||||
$lang->custom->deletedList[0] = 'Not Show';
|
||||
|
||||
$lang->custom->workingHours = 'Man-Hour/Day';
|
||||
$lang->custom->weekend = 'Weekend';
|
||||
$lang->custom->weekendList[2] = '2-Day Off';
|
||||
|
||||
@@ -69,6 +69,7 @@ $lang->custom->todo->fields['statusList'] = '状态';
|
||||
$lang->custom->user = new stdClass();
|
||||
$lang->custom->user->fields['roleList'] = '职位';
|
||||
$lang->custom->user->fields['statusList'] = '状态';
|
||||
$lang->custom->user->fields['deleted'] = '列出已删除用户';
|
||||
|
||||
$lang->custom->block->fields['closed'] = '关闭的区块';
|
||||
|
||||
@@ -94,6 +95,9 @@ $lang->custom->forceReview = '强制评审';
|
||||
$lang->custom->reviewList[1] = '开启';
|
||||
$lang->custom->reviewList[0] = '关闭';
|
||||
|
||||
$lang->custom->deletedList[1] = '列出';
|
||||
$lang->custom->deletedList[0] = '不列出';
|
||||
|
||||
$lang->custom->workingHours = '每天可用工时';
|
||||
$lang->custom->weekend = '休息日';
|
||||
$lang->custom->weekendList[2] = '双休';
|
||||
|
||||
@@ -122,6 +122,17 @@ EOT;
|
||||
<td><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php elseif($module == 'user' and $field == 'deleted'):?>
|
||||
<table class='table table-form mw-600px'>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->custom->user->fields['deleted'];?></th>
|
||||
<td><?php echo html::radio('showDeleted', $lang->custom->deletedList, $showDeleted);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php else:?>
|
||||
<table class='table table-form active-disabled table-condensed mw-600px'>
|
||||
<tr class='text-center'>
|
||||
|
||||
@@ -91,7 +91,7 @@ class dept extends control
|
||||
}
|
||||
|
||||
$dept = $this->dept->getById($deptID);
|
||||
$users = $this->loadModel('user')->getPairs('noletter|noclosed');
|
||||
$users = $this->loadModel('user')->getPairs('noletter|noclosed|nodeleted');
|
||||
|
||||
$this->view->optionMenu = $this->dept->getOptionMenu();
|
||||
|
||||
|
||||
@@ -423,7 +423,7 @@ class deptModel extends model
|
||||
public function getDataStructure($rootDeptID = 0)
|
||||
{
|
||||
$tree = array_values($this->getSons($rootDeptID));
|
||||
$users = $this->loadModel('user')->getPairs('noletter|noclosed');
|
||||
$users = $this->loadModel('user')->getPairs('noletter|noclosed|nodeleted');
|
||||
if(count($tree))
|
||||
{
|
||||
foreach ($tree as $node)
|
||||
|
||||
@@ -70,8 +70,8 @@ class docModel extends model
|
||||
$selectHtml .= "<div id='libMenu'>";
|
||||
$selectHtml .= "<div id='libMenuHeading'><input id='searchLib' type='search' placeholder='{$this->lang->doc->searchDoc}' class='form-control'></div>";
|
||||
$selectHtml .= "<div id='libMenuGroups' class='clearfix'>";
|
||||
if($this->config->global->flow != 'onlyTask') $selectHtml .= "<div class='lib-menu-group' id='libMenuProductGroup'><div class='lib-menu-list-heading' data-type='product'>{$this->lang->doc->libTypeList['product']}<i class='icon icon-remove'></i></div><div class='lib-menu-list clearfix'></div></div>";
|
||||
if($this->config->global->flow != 'onlyStory' and $this->config->global->flow != 'onlyTest') $selectHtml .= "<div class='lib-menu-group' id='libMenuProjectGroup'><div class='lib-menu-list-heading' data-type='project'>{$this->lang->doc->libTypeList['project']}<i class='icon icon-remove'></i></div><div class='lib-menu-project-done'>{$this->lang->project->statusList['done']}<i class='icon icon-remove'></i></div><div class='lib-menu-list clearfix'></div></div>";
|
||||
if($this->config->global->flow != 'onlyTask' and isset($this->lang->doc->libTypeList['product'])) $selectHtml .= "<div class='lib-menu-group' id='libMenuProductGroup'><div class='lib-menu-list-heading' data-type='product'>{$this->lang->doc->libTypeList['product']}<i class='icon icon-remove'></i></div><div class='lib-menu-list clearfix'></div></div>";
|
||||
if($this->config->global->flow != 'onlyStory' and $this->config->global->flow != 'onlyTest' and isset($this->lang->doc->libTypeList['project'])) $selectHtml .= "<div class='lib-menu-group' id='libMenuProjectGroup'><div class='lib-menu-list-heading' data-type='project'>{$this->lang->doc->libTypeList['project']}<i class='icon icon-remove'></i></div><div class='lib-menu-project-done'>{$this->lang->project->statusList['done']}<i class='icon icon-remove'></i></div><div class='lib-menu-list clearfix'></div></div>";
|
||||
$selectHtml .= "<div class='lib-menu-group' id='libMenuCustomGroup'><div class='lib-menu-list-heading' data-type='custom'>{$this->lang->doc->libTypeList['custom']}<i class='icon icon-remove'></i></div><div class='lib-menu-list clearfix'></div></div>";
|
||||
$selectHtml .= "</div></div></div>";
|
||||
common::setMenuVars($this->lang->doc->menu, 'list', $selectHtml);
|
||||
|
||||
@@ -288,7 +288,7 @@ class mailModel extends model
|
||||
}
|
||||
|
||||
/* Remove deleted users. */
|
||||
$users = $this->loadModel('user')->getPairs();
|
||||
$users = $this->loadModel('user')->getPairs('nodeleted');
|
||||
foreach($toList as $key => $to) if(!isset($users[trim($to)])) unset($toList[$key]);
|
||||
foreach($ccList as $key => $cc) if(!isset($users[trim($cc)])) unset($ccList[$key]);
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ class my extends control
|
||||
$this->view->position[] = $this->lang->my->bug;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->memberPairs = $this->user->getPairs('noletter');
|
||||
$this->view->memberPairs = $this->user->getPairs('noletter|nodeleted');
|
||||
$this->view->tabID = 'bug';
|
||||
$this->view->type = $type;
|
||||
$this->view->recTotal = $recTotal;
|
||||
@@ -411,7 +411,7 @@ class my extends control
|
||||
$this->view->mode = $mode;
|
||||
$this->view->lists = $lists;
|
||||
$this->view->listID = $listID;
|
||||
$this->view->users = $this->user->getPairs('noletter|noempty|noclosed');
|
||||
$this->view->users = $this->user->getPairs('noletter|noempty|noclosed|noclosed');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<?php if($canBatchEdit or $canBatchRun):?><input type='checkbox' name='caseIDList[]' value='<?php echo $caseID;?>'/><?php endif;?>
|
||||
<?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version"), sprintf('%03d', $caseID));?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version"), $case->title, null, "style='color: $case->color'");?></td>
|
||||
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
|
||||
<td><?php echo $users[$case->openedBy];?></td>
|
||||
|
||||
+11
-11
@@ -189,7 +189,7 @@ class product extends control
|
||||
$this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', 'createStoryLink'), '', $branch);
|
||||
$this->view->parentModules = $this->tree->getParents($moduleID);
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->user->getPairs('noletter|pofirst');
|
||||
$this->view->users = $this->user->getPairs('noletter|pofirst|nodeleted');
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch);
|
||||
@@ -228,9 +228,9 @@ class product extends control
|
||||
$this->view->title = $this->lang->product->create;
|
||||
$this->view->position[] = $this->view->title;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->poUsers = $this->loadModel('user')->getPairs('pofirst|noclosed');
|
||||
$this->view->qdUsers = $this->loadModel('user')->getPairs('qdfirst|noclosed');
|
||||
$this->view->rdUsers = $this->loadModel('user')->getPairs('devfirst|noclosed');
|
||||
$this->view->poUsers = $this->loadModel('user')->getPairs('nodeleted|pofirst|noclosed');
|
||||
$this->view->qdUsers = $this->loadModel('user')->getPairs('nodeleted|qdfirst|noclosed');
|
||||
$this->view->rdUsers = $this->loadModel('user')->getPairs('nodeleted|devfirst|noclosed');
|
||||
|
||||
unset($this->lang->product->typeList['']);
|
||||
$this->display();
|
||||
@@ -272,9 +272,9 @@ class product extends control
|
||||
$this->view->position[] = $this->lang->product->edit;
|
||||
$this->view->product = $product;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->poUsers = $this->loadModel('user')->getPairs('pofirst', $product->PO);
|
||||
$this->view->qdUsers = $this->loadModel('user')->getPairs('qdfirst', $product->QD);
|
||||
$this->view->rdUsers = $this->loadModel('user')->getPairs('devfirst', $product->RD);
|
||||
$this->view->poUsers = $this->loadModel('user')->getPairs('nodeleted|pofirst', $product->PO);
|
||||
$this->view->qdUsers = $this->loadModel('user')->getPairs('nodeleted|qdfirst', $product->QD);
|
||||
$this->view->rdUsers = $this->loadModel('user')->getPairs('nodeleted|devfirst', $product->RD);
|
||||
|
||||
unset($this->lang->product->typeList['']);
|
||||
$this->display();
|
||||
@@ -327,9 +327,9 @@ class product extends control
|
||||
$this->view->position[] = $this->lang->product->batchEdit;
|
||||
$this->view->productIDList = $productIDList;
|
||||
$this->view->products = $products;
|
||||
$this->view->poUsers = $this->loadModel('user')->getPairs('pofirst', $appendPoUsers);
|
||||
$this->view->qdUsers = $this->loadModel('user')->getPairs('qdfirst', $appendQdUsers);
|
||||
$this->view->rdUsers = $this->loadModel('user')->getPairs('devfirst', $appendRdUsers);
|
||||
$this->view->poUsers = $this->loadModel('user')->getPairs('nodeleted|pofirst', $appendPoUsers);
|
||||
$this->view->qdUsers = $this->loadModel('user')->getPairs('nodeleted|qdfirst', $appendQdUsers);
|
||||
$this->view->rdUsers = $this->loadModel('user')->getPairs('nodeleted|devfirst', $appendRdUsers);
|
||||
|
||||
unset($this->lang->product->typeList['']);
|
||||
$this->display();
|
||||
@@ -491,7 +491,7 @@ class product extends control
|
||||
/* Assign. */
|
||||
$this->view->productID = $productID;
|
||||
$this->view->type = $type;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|nodeleted');
|
||||
$this->view->account = $account;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
|
||||
+10
-10
@@ -967,10 +967,10 @@ class project extends control
|
||||
$this->view->position = $position;
|
||||
$this->view->projects = $projects;
|
||||
$this->view->project = $project;
|
||||
$this->view->poUsers = $this->loadModel('user')->getPairs('noclosed,pofirst', $project->PO);
|
||||
$this->view->pmUsers = $this->user->getPairs('noclosed,pmfirst', $project->PM);
|
||||
$this->view->qdUsers = $this->user->getPairs('noclosed,qdfirst', $project->QD);
|
||||
$this->view->rdUsers = $this->user->getPairs('noclosed,devfirst', $project->RD);
|
||||
$this->view->poUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pofirst', $project->PO);
|
||||
$this->view->pmUsers = $this->user->getPairs('noclosed|nodeleted|pmfirst', $project->PM);
|
||||
$this->view->qdUsers = $this->user->getPairs('noclosed|nodeleted|qdfirst', $project->QD);
|
||||
$this->view->rdUsers = $this->user->getPairs('noclosed|nodeleted|devfirst', $project->RD);
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->allProducts = $allProducts;
|
||||
$this->view->linkedProducts = $linkedProducts;
|
||||
@@ -1027,10 +1027,10 @@ class project extends control
|
||||
$this->view->position[] = $this->lang->project->batchEdit;
|
||||
$this->view->projectIDList = $projectIDList;
|
||||
$this->view->projects = $projects;
|
||||
$this->view->pmUsers = $this->loadModel('user')->getPairs('noclosed,pmfirst', $appendPmUsers);
|
||||
$this->view->poUsers = $this->user->getPairs('noclosed,pofirst', $appendPoUsers);
|
||||
$this->view->qdUsers = $this->user->getPairs('noclosed,qdfirst', $appendQdUsers);
|
||||
$this->view->rdUsers = $this->user->getPairs('noclosed,devfirst', $appendRdUsers);
|
||||
$this->view->pmUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst', $appendPmUsers);
|
||||
$this->view->poUsers = $this->user->getPairs('noclosed|nodeleted|pofirst', $appendPoUsers);
|
||||
$this->view->qdUsers = $this->user->getPairs('noclosed|nodeleted|qdfirst', $appendQdUsers);
|
||||
$this->view->rdUsers = $this->user->getPairs('noclosed|nodeleted|devfirst', $appendRdUsers);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1546,7 +1546,7 @@ class project extends control
|
||||
$this->loadModel('dept');
|
||||
|
||||
$project = $this->project->getById($projectID);
|
||||
$users = $this->user->getPairs('noclosed,devfirst');
|
||||
$users = $this->user->getPairs('noclosed|nodeleted|devfirst');
|
||||
$roles = $this->user->getUserRoles(array_keys($users));
|
||||
$deptUsers = $dept === '' ? array() : $this->dept->getDeptUserPairs($dept);
|
||||
$currentMembers = $this->project->getTeamMembers($projectID);
|
||||
@@ -1825,7 +1825,7 @@ class project extends control
|
||||
/* Assign. */
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->type = $type;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|nodeleted');
|
||||
$this->view->account = $account;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
|
||||
@@ -1399,7 +1399,7 @@ class projectModel extends model
|
||||
$users = $this->dao->select('t1.account, t2.realname')->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->where('t1.project')->eq((int)$projectID)
|
||||
->beginIF($params == 'nodeleted')
|
||||
->beginIF($params == 'nodeleted' or empty($this->config->user->showDeleted))
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->fi()
|
||||
->fetchPairs();
|
||||
@@ -1623,6 +1623,12 @@ class projectModel extends model
|
||||
$endTime = strtotime($end);
|
||||
$preValue = 0;
|
||||
$todayTag = 0;
|
||||
|
||||
foreach($sets as $date => $set)
|
||||
{
|
||||
if($begin > $date) unset($sets[$date]);
|
||||
}
|
||||
|
||||
for($i = 0; $i < $period; $i++)
|
||||
{
|
||||
$currentTime = strtotime($current);
|
||||
|
||||
@@ -82,7 +82,7 @@ class report extends control
|
||||
$this->view->begin = $begin;
|
||||
$this->view->end = $end;
|
||||
$this->view->bugs = $this->report->getBugs($begin, $end, $product, $project);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed');
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed|nodeleted');
|
||||
$this->view->projects = array('' => '') + $this->loadModel('project')->getPairs();
|
||||
$this->view->products = array('' => '') + $this->loadModel('product')->getPairs();
|
||||
$this->view->project = $project;
|
||||
@@ -103,7 +103,7 @@ class report extends control
|
||||
$this->view->position[] = $this->lang->report->bugAssign;
|
||||
$this->view->submenu = 'test';
|
||||
$this->view->assigns = $this->report->getBugAssign();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed');
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed|nodeleted');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ class report extends control
|
||||
$this->view->position[] = $this->lang->report->workload;
|
||||
|
||||
$this->view->workload = $this->report->getWorkload($dept);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed');
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed|nodeleted');
|
||||
$this->view->depts = $this->loadModel('dept')->getOptionMenu();
|
||||
$this->view->begin = $begin;
|
||||
$this->view->end = date('Y-m-d', strtotime($end) - 24 * 3600);
|
||||
|
||||
@@ -191,7 +191,7 @@ class sso extends control
|
||||
die(js::locate(helper::safe64Decode($referer), 'parent'));
|
||||
}
|
||||
$this->view->title = $this->lang->sso->bind;
|
||||
$this->view->users = $this->user->getPairs('noclosed');
|
||||
$this->view->users = $this->user->getPairs('noclosed|nodeleted');
|
||||
$this->view->data = $ssoData;
|
||||
$this->display();
|
||||
}
|
||||
@@ -205,7 +205,7 @@ class sso extends control
|
||||
public function getUserPairs()
|
||||
{
|
||||
if(!$this->sso->checkKey()) return false;
|
||||
$users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
|
||||
die(json_encode($users));
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ class story extends control
|
||||
if(!isset($products[$product->id])) $products[$product->id] = $product->name;
|
||||
}
|
||||
|
||||
$users = $this->user->getPairs('pdfirst|noclosed');
|
||||
$users = $this->user->getPairs('pdfirst|noclosed|nodeleted');
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch);
|
||||
|
||||
/* Set menu. */
|
||||
@@ -358,7 +358,7 @@ class story extends control
|
||||
$this->view->title = $this->lang->story->edit . "STORY" . $this->lang->colon . $this->view->story->title;
|
||||
$this->view->position[] = $this->lang->story->edit;
|
||||
$this->view->story = $story;
|
||||
$this->view->users = $this->user->getPairs('pofirst', "$story->assignedTo,$story->openedBy,$story->closedBy");
|
||||
$this->view->users = $this->user->getPairs('pofirst|nodeleted', "$story->assignedTo,$story->openedBy,$story->closedBy");
|
||||
$this->view->product = $product;
|
||||
$this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($story->product);
|
||||
$this->display();
|
||||
@@ -471,7 +471,7 @@ class story extends control
|
||||
}
|
||||
|
||||
/* Set ditto option for users. */
|
||||
$users = $this->loadModel('user')->getPairs();
|
||||
$users = $this->loadModel('user')->getPairs('nodeleted');
|
||||
$users = array('' => '', 'ditto' => $this->lang->story->ditto) + $users;
|
||||
|
||||
/* Set Custom*/
|
||||
@@ -536,7 +536,7 @@ class story extends control
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $this->lang->story->change . "STORY" . $this->lang->colon . $this->view->story->title;
|
||||
$this->view->users = $this->user->getPairs('pofirst', $this->view->story->assignedTo);
|
||||
$this->view->users = $this->user->getPairs('pofirst|nodeleted', $this->view->story->assignedTo);
|
||||
$this->view->position[] = $this->lang->story->change;
|
||||
$this->view->needReview = ($this->app->user->account == $this->view->product->PO || $this->config->story->needReview == 0) ? "checked='checked'" : "";
|
||||
$this->display();
|
||||
@@ -566,7 +566,7 @@ class story extends control
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $this->lang->story->activate . "STORY" . $this->lang->colon . $this->view->story->title;
|
||||
$this->view->users = $this->user->getPairs('pofirst', $this->view->story->closedBy);
|
||||
$this->view->users = $this->user->getPairs('pofirst|nodeleted', $this->view->story->closedBy);
|
||||
$this->view->position[] = $this->lang->story->activate;
|
||||
$this->display();
|
||||
}
|
||||
@@ -693,7 +693,7 @@ class story extends control
|
||||
$this->view->product = $product;
|
||||
$this->view->story = $story;
|
||||
$this->view->actions = $this->action->getList('story', $storyID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('', "$story->lastEditedBy,$story->openedBy");
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', "$story->lastEditedBy,$story->openedBy");
|
||||
|
||||
/* Get the affcected things. */
|
||||
$this->story->getAffectedScope($this->view->story);
|
||||
|
||||
@@ -138,7 +138,7 @@ class task extends control
|
||||
}
|
||||
}
|
||||
|
||||
$users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
|
||||
$moduleIdList = $this->tree->getAllChildID($moduleID);
|
||||
$stories = $this->story->getProjectStoryPairs($projectID, 0, 0, $moduleIdList);
|
||||
$members = $this->project->getTeamMemberPairs($projectID, 'nodeleted');
|
||||
@@ -295,7 +295,7 @@ class task extends control
|
||||
$this->view->position[] = $this->lang->task->common;
|
||||
$this->view->position[] = $this->lang->task->edit;
|
||||
$this->view->stories = $this->story->getProjectStoryPairs($this->view->project->id);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('', "{$this->view->task->openedBy},{$this->view->task->canceledBy},{$this->view->task->closedBy}");
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', "{$this->view->task->openedBy},{$this->view->task->canceledBy},{$this->view->task->closedBy}");
|
||||
$this->view->modules = $this->tree->getTaskOptionMenu($this->view->task->project);
|
||||
$this->display();
|
||||
}
|
||||
@@ -352,7 +352,7 @@ class task extends control
|
||||
/* Set modules and members. */
|
||||
$modules = $this->tree->getTaskOptionMenu($projectID);
|
||||
$modules = array('ditto' => $this->lang->task->ditto) + $modules;
|
||||
$members = $this->project->getTeamMemberPairs($projectID);
|
||||
$members = $this->project->getTeamMemberPairs($projectID, 'nodeleted');
|
||||
$members = array('' => '', 'ditto' => $this->lang->task->ditto) + $members;
|
||||
$members['closed'] = 'Closed';
|
||||
|
||||
|
||||
@@ -339,7 +339,7 @@ class testcase extends control
|
||||
$this->view->precondition = $precondition;
|
||||
$this->view->keywords = $keywords;
|
||||
$this->view->steps = $steps;
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed');
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted');
|
||||
$this->view->branch = $branch;
|
||||
$this->view->branches = $this->session->currentProductType != 'normal' ? $this->loadModel('branch')->getPairs($productID) : array();
|
||||
|
||||
@@ -756,7 +756,7 @@ class testcase extends control
|
||||
die(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed');
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted');
|
||||
$this->view->case = $this->testcase->getById($caseID);
|
||||
$this->view->actions = $this->loadModel('action')->getList('case', $caseID);
|
||||
$this->display();
|
||||
|
||||
@@ -91,7 +91,7 @@ class testreport extends control
|
||||
$this->view->objectType = $objectType;
|
||||
$this->view->extra = $extra;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed');
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted');
|
||||
$this->view->tasks = $tasks;
|
||||
$this->view->projects = $projects;
|
||||
$this->display();
|
||||
@@ -197,7 +197,7 @@ class testreport extends control
|
||||
$this->view->storySummary = $this->product->summary($stories);
|
||||
|
||||
$this->view->builds = $builds;
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed');
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted');
|
||||
|
||||
$this->view->cases = $cases;
|
||||
$this->view->caseSummary = $this->testreport->getResultSummary($tasks, $cases);
|
||||
@@ -307,7 +307,7 @@ class testreport extends control
|
||||
$this->view->storySummary = $this->product->summary($stories);
|
||||
|
||||
$this->view->builds = $builds;
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed');
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted');
|
||||
|
||||
$this->view->cases = $cases;
|
||||
$this->view->caseSummary = $this->testreport->getResultSummary($tasks, $cases);
|
||||
@@ -373,7 +373,7 @@ class testreport extends control
|
||||
$this->view->bugs = $report->bugs ? $this->bug->getByList($report->bugs) : array();
|
||||
$this->view->builds = $builds;
|
||||
$this->view->cases = $cases;
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed');
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted');
|
||||
$this->view->actions = $this->loadModel('action')->getList('testreport', $reportID);
|
||||
|
||||
$this->view->storySummary = $this->product->summary($stories);
|
||||
|
||||
@@ -216,7 +216,7 @@ class testreportModel extends model
|
||||
$bugInfo['bugCreateByCaseRate'] = empty($byCaseNum) ? 0 : round($byCaseNum / count($newBugs) * 100, 2);
|
||||
|
||||
$this->app->loadLang('bug');
|
||||
$users = $this->loadModel('user')->getPairs('noclosed|noletter');
|
||||
$users = $this->loadModel('user')->getPairs('noclosed|noletter|nodeleted');
|
||||
$data = array();
|
||||
foreach($severityGroups as $severity => $count)
|
||||
{
|
||||
|
||||
@@ -157,7 +157,7 @@ class testtask extends control
|
||||
$this->view->productID = $productID;
|
||||
$this->view->builds = $builds;
|
||||
$this->view->build = $build;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|qdfirst');
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|qdfirst|nodeleted');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -286,8 +286,8 @@ class testtask extends control
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->task = $task;
|
||||
$this->view->runs = $runs;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed,qafirst');
|
||||
$this->view->assignedTos = $this->loadModel('user')->getPairs('noclosed,qafirst');
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|qafirst');
|
||||
$this->view->assignedTos = $this->loadModel('user')->getPairs('noclosed|nodeleted|qafirst');
|
||||
$this->view->moduleTree = $this->loadModel('tree')->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createTestTaskLink'), $extra = $taskID);
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->param = $param;
|
||||
@@ -438,7 +438,7 @@ class testtask extends control
|
||||
$this->view->task = $task;
|
||||
$this->view->projects = $this->product->getProjectPairs($productID);
|
||||
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = '');
|
||||
$this->view->users = $this->loadModel('user')->getPairs('', $task->owner);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', $task->owner);
|
||||
$this->view->contactLists = $this->user->getContactLists($this->app->user->account, 'withnote');
|
||||
|
||||
$this->display();
|
||||
@@ -565,7 +565,7 @@ class testtask extends control
|
||||
$this->view->position[] = $this->lang->testtask->common;
|
||||
$this->view->position[] = $this->lang->close;
|
||||
$this->view->actions = $actions;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|qdfirst');
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted|qdfirst');
|
||||
$this->view->contactLists = $this->user->getContactLists($this->app->user->account, 'withnote');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ class tree extends control
|
||||
$this->view->module = $module;
|
||||
$this->view->type = $type;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed', $module->owner);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted', $module->owner);
|
||||
|
||||
$showProduct = strpos('story|bug|case', $type) !== false ? true : false;
|
||||
$this->view->showProduct = $showProduct;
|
||||
|
||||
@@ -1752,7 +1752,7 @@ class upgradeModel extends model
|
||||
*/
|
||||
public function checkSafeFile()
|
||||
{
|
||||
if($this->app->getModuleName() == 'upgrade' and $this->app->getMethodName() == 'ajaxupdatefile') return true;
|
||||
if($this->app->getModuleName() == 'upgrade' and $this->app->getMethodName() == 'ajaxupdatefile') return false;
|
||||
$statusFile = $this->app->getAppRoot() . 'www' . DIRECTORY_SEPARATOR . 'ok.txt';
|
||||
return (!file_exists($statusFile) or (time() - filemtime($statusFile)) > 3600) ? $statusFile : false;
|
||||
}
|
||||
|
||||
@@ -16,3 +16,5 @@ $config->user->custom->batchEditFields = 'dept,join,email,commiter';
|
||||
$config->user->failTimes = 6;
|
||||
$config->user->lockMinutes = 10;
|
||||
$config->user->batchCreate = 10;
|
||||
|
||||
$config->user->showDeleted = 0;
|
||||
|
||||
+11
-11
@@ -78,7 +78,7 @@ class user extends control
|
||||
|
||||
/* set menus. */
|
||||
$this->lang->set('menugroup.user', 'company');
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed'), $account);
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted'), $account);
|
||||
|
||||
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->todo;
|
||||
$this->view->position[] = $this->lang->user->todo;
|
||||
@@ -117,7 +117,7 @@ class user extends control
|
||||
|
||||
/* Set menu. */
|
||||
$this->lang->set('menugroup.user', 'company');
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed'), $account);
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted'), $account);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->story;
|
||||
@@ -153,7 +153,7 @@ class user extends control
|
||||
|
||||
/* Set the menu. */
|
||||
$this->lang->set('menugroup.user', 'company');
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed'), $account);
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted'), $account);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->task;
|
||||
@@ -191,7 +191,7 @@ class user extends control
|
||||
|
||||
/* Set menu. */
|
||||
$this->lang->set('menugroup.user', 'company');
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed'), $account);
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted'), $account);
|
||||
|
||||
/* Load the lang of bug module. */
|
||||
$this->app->loadLang('bug');
|
||||
@@ -228,7 +228,7 @@ class user extends control
|
||||
|
||||
/* Set menu. */
|
||||
$this->lang->set('menugroup.user', 'company');
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed'), $account);
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted'), $account);
|
||||
|
||||
/* Save session. */
|
||||
$this->session->set('testtaskList', $this->app->getURI(true));
|
||||
@@ -278,7 +278,7 @@ class user extends control
|
||||
|
||||
/* Set menu. */
|
||||
$this->lang->set('menugroup.user', 'company');
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed'), $account);
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted'), $account);
|
||||
|
||||
$cases = array();
|
||||
if($type == 'case2Him')
|
||||
@@ -320,7 +320,7 @@ class user extends control
|
||||
/* Set the menus. */
|
||||
$this->loadModel('project');
|
||||
$this->lang->set('menugroup.user', 'company');
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclose'), $account);
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclose|nodeleted'), $account);
|
||||
|
||||
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->project;
|
||||
$this->view->position[] = $this->lang->user->project;
|
||||
@@ -344,7 +344,7 @@ class user extends control
|
||||
if(empty($account)) $account = $this->app->user->account;
|
||||
|
||||
/* Set menu. */
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclose'), $account);
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclose|nodeleted'), $account);
|
||||
|
||||
$user = $this->user->getById($account);
|
||||
|
||||
@@ -763,7 +763,7 @@ class user extends control
|
||||
{
|
||||
if(!empty($this->config->global->showDemoUsers))
|
||||
{
|
||||
$demoUsers = $this->user->getPairs('noletter,noempty,noclosed');
|
||||
$demoUsers = $this->user->getPairs('noletter|noempty|noclosed|nodeleted');
|
||||
$this->view->demoUsers = $demoUsers;
|
||||
}
|
||||
|
||||
@@ -873,7 +873,7 @@ class user extends control
|
||||
{
|
||||
/* set menus. */
|
||||
$this->lang->set('menugroup.user', 'company');
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed'), $account);
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted'), $account);
|
||||
|
||||
/* Save session. */
|
||||
$uri = $this->app->getURI(true);
|
||||
@@ -933,7 +933,7 @@ class user extends control
|
||||
*/
|
||||
public function ajaxGetContactUsers($contactListID)
|
||||
{
|
||||
$users = $this->user->getPairs('devfirst');
|
||||
$users = $this->user->getPairs('devfirst|nodeleted');
|
||||
if(!$contactListID) return print(html::select('mailto[]', $users, '', "class='form-control' multiple data-placeholder='{$this->lang->chooseUsersToMail}'"));
|
||||
$list = $this->user->getContactListByID($contactListID);
|
||||
return print(html::select('mailto[]', $users, $list->userList, "class='form-control' multiple data-placeholder='{$this->lang->chooseUsersToMail}'"));
|
||||
|
||||
@@ -64,7 +64,7 @@ class userModel extends model
|
||||
/**
|
||||
* Get the account=>realname pairs.
|
||||
*
|
||||
* @param string $params noletter|noempty|noclosed|withguest|pofirst|devfirst|qafirst|pmfirst|realname, can be sets of theme
|
||||
* @param string $params noletter|noempty|nodeleted|noclosed|withguest|pofirst|devfirst|qafirst|pmfirst|realname, can be sets of theme
|
||||
* @param string $usersToAppended account1,account2
|
||||
* @access public
|
||||
* @return array
|
||||
@@ -88,7 +88,8 @@ class userModel extends model
|
||||
|
||||
/* Get raw records. */
|
||||
$users = $this->dao->select($fields)->from(TABLE_USER)
|
||||
->where('deleted')->eq(0)
|
||||
->where('1')
|
||||
->beginIF(strpos($params, 'nodeleted') !== false or empty($this->config->user->showDeleted))->andWhere('deleted')->eq('0')->fi()
|
||||
->orderBy($orderBy)
|
||||
->fetchAll('account');
|
||||
if($usersToAppended) $users += $this->dao->select($fields)->from(TABLE_USER)->where('account')->in($usersToAppended)->fetchAll('account');
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<?php $caseID = $type == 'case2Him' ? $case->case : $case->id?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version"), sprintf('%03d', $caseID));?></td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version"), $case->title);?></td>
|
||||
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
|
||||
<td><?php echo $users[$case->openedBy];?></td>
|
||||
|
||||
Vendored
+59
-3
@@ -49,9 +49,65 @@ $.extend(
|
||||
/* The response.result is success. */
|
||||
if(response.result == 'success')
|
||||
{
|
||||
if(typeof(callback) == 'function') return callback(response);
|
||||
if(response.message) alert(response.message);
|
||||
if(response.locate) return location.href = response.locate;
|
||||
if(response.message && response.message.length)
|
||||
{
|
||||
submitButton = $(formID).find(':submit');
|
||||
var placement = response.placement ? response.placement : 'right';
|
||||
submitButton.popover({trigger:'manual', content:response.message, placement:placement}).popover('show');
|
||||
submitButton.next('.popover').addClass('popover-success');
|
||||
function distroy(){submitButton.popover('destroy')}
|
||||
setTimeout(distroy,2000);
|
||||
}
|
||||
|
||||
if($.isFunction(callback)) return callback(response);
|
||||
|
||||
if($('#responser').length && response.message && response.message.length)
|
||||
{
|
||||
$('#responser').html(response.message).addClass('red f-12px').show().delay(3000).fadeOut(100);
|
||||
}
|
||||
|
||||
if(response.closeModal) setTimeout($.zui.closeModal, 1200);
|
||||
|
||||
if(response.callback)
|
||||
{
|
||||
var rcall = window[response.callback];
|
||||
if($.isFunction(rcall))
|
||||
{
|
||||
if(rcall() === false) return;
|
||||
}
|
||||
}
|
||||
|
||||
if(response.locate)
|
||||
{
|
||||
if(response.locate == 'loadInModal')
|
||||
{
|
||||
var modal = $('.modal');
|
||||
setTimeout(function()
|
||||
{
|
||||
modal.load(modal.attr('ref'), function(){$(this).find('.modal-dialog').css('width', $(this).data('width')); $.zui.ajustModalPosition()})
|
||||
}, 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
var reloadUrl = response.locate == 'reload' ? location.href : response.locate;
|
||||
setTimeout(function(){location.href = reloadUrl;}, 1200);
|
||||
}
|
||||
}
|
||||
|
||||
if(response.ajaxReload)
|
||||
{
|
||||
var $target = $(response.ajaxReload);
|
||||
if($target.length === 1)
|
||||
{
|
||||
$target.load(document.location.href + ' ' + response.ajaxReload, function()
|
||||
{
|
||||
$target.dataTable();
|
||||
$target.find('[data-toggle="modal"]').modalTrigger();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user