* rebuild theme
This commit is contained in:
@@ -53,7 +53,7 @@ class buildsEntry extends entry
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
if(!$project) return $this->send404();
|
||||
|
||||
$fields = 'execution,product,name,builder,date,scmPath,filePath,desc';
|
||||
$fields = 'execution,product,name,builder,date,scmPath,filePath,desc,branch';
|
||||
$this->batchSetPost($fields);
|
||||
|
||||
$control = $this->loadController('build', 'create');
|
||||
|
||||
+13
-7
@@ -97,6 +97,7 @@ $filter->mail->batchdelete = new stdclass();
|
||||
$filter->misc->checkupdate = new stdclass();
|
||||
$filter->file->download = new stdclass();
|
||||
$filter->product->browse = new stdclass();
|
||||
$filter->product->all = new stdclass();
|
||||
$filter->product->default = new stdclass();
|
||||
$filter->product->index = new stdclass();
|
||||
$filter->product->export = new stdclass();
|
||||
@@ -108,6 +109,7 @@ $filter->program->default = new stdclass();
|
||||
$filter->program->pgmproject = new stdclass();
|
||||
$filter->program->prjbrowse = new stdclass();
|
||||
$filter->program->project = new stdclass();
|
||||
$filter->program->product = new stdclass();
|
||||
$filter->program->browse = new stdclass();
|
||||
$filter->program->export = new stdclass();
|
||||
$filter->program->pgmbrowse = new stdclass();
|
||||
@@ -236,6 +238,7 @@ $filter->product->browse->cookie['productStoryOrder'] = 'reg::orderBy';
|
||||
$filter->product->browse->cookie['storyModule'] = 'int';
|
||||
$filter->product->browse->cookie['storyBranch'] = 'int';
|
||||
$filter->product->browse->cookie['treeBranch'] = 'reg::word';
|
||||
$filter->product->all->cookie['showProductBatchEdit'] = 'int';
|
||||
$filter->product->default->cookie['lastProduct'] = 'int';
|
||||
$filter->product->default->cookie['preProductID'] = 'int';
|
||||
$filter->product->index->cookie['preBranch'] = 'reg::word';
|
||||
@@ -247,19 +250,22 @@ $filter->product->dynamic->cookie['preBranch'] = 'reg::word';
|
||||
|
||||
$filter->branch->default->cookie['preBranch'] = 'reg::word';
|
||||
|
||||
$filter->program->default->cookie['lastPGM'] = 'int';
|
||||
$filter->program->default->cookie['lastPRJ'] = 'int';
|
||||
$filter->program->prjbrowse->cookie['programType'] = 'code';
|
||||
$filter->program->project->cookie['involved'] = 'code';
|
||||
$filter->program->browse->cookie['showClosed'] = 'code';
|
||||
$filter->program->export->cookie['checkedItem'] = 'reg::checked';
|
||||
$filter->program->ajaxgetdropmenu->cookie['showClosed'] = 'code';
|
||||
$filter->program->default->cookie['lastPGM'] = 'int';
|
||||
$filter->program->default->cookie['lastPRJ'] = 'int';
|
||||
$filter->program->prjbrowse->cookie['programType'] = 'code';
|
||||
$filter->program->project->cookie['involved'] = 'code';
|
||||
$filter->program->project->cookie['showProjectBatchEdit'] = 'int';
|
||||
$filter->program->product->cookie['showProductBatchEdit'] = 'int';
|
||||
$filter->program->browse->cookie['showClosed'] = 'code';
|
||||
$filter->program->export->cookie['checkedItem'] = 'reg::checked';
|
||||
$filter->program->ajaxgetdropmenu->cookie['showClosed'] = 'code';
|
||||
|
||||
$filter->project->default->cookie['lastProject'] = 'int';
|
||||
$filter->project->default->cookie['lastPRJ'] = 'int';
|
||||
$filter->project->default->cookie['projectMode'] = 'code';
|
||||
$filter->project->default->cookie['kanbanview'] = 'code';
|
||||
$filter->project->browse->cookie['involved'] = 'code';
|
||||
$filter->project->browse->cookie['showProjectBatchEdit'] = 'int';
|
||||
$filter->project->export->cookie['involved'] = 'code';
|
||||
$filter->project->browse->cookie['projectType'] = 'code';
|
||||
$filter->project->story->cookie['storyModuleParam'] = 'int';
|
||||
|
||||
@@ -34,6 +34,13 @@
|
||||
35025 需求导入模板增加由谁评审字段
|
||||
旗舰版:
|
||||
35042 旗舰版周报3个工作项列表能显示总数
|
||||
修复的Bug
|
||||
27875 工时记录页面日期控件展开后显示遮挡
|
||||
27778 创建项目和编辑项目的所属项目集字段显示不一致
|
||||
27690 创建项目页面提示信息窗口建议向右展开
|
||||
27632 复制bug时希望可以同步反馈者和通知邮箱两个字段的信息
|
||||
27561 提需求页面所属产品右侧边框线缺失
|
||||
27547 编辑项目集预算,点击保存,提示有未提交表单
|
||||
|
||||
2022-09-08 17.6.1
|
||||
完成的需求
|
||||
|
||||
@@ -18,6 +18,7 @@ body {margin-bottom: 25px;}
|
||||
#mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text:after {border-bottom: unset;}
|
||||
.body-modal #mainMenu>.btn-toolbar {width: auto;}
|
||||
.assignedTo{border-radius: 4px !important;}
|
||||
#productStoryForm table tbody tr td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 0 4px 0 0;}
|
||||
</style>
|
||||
<?php js::set('browseType', $browseType);?>
|
||||
<?php js::set('productID', $productID);?>
|
||||
|
||||
@@ -374,10 +374,10 @@ class actionModel extends model
|
||||
elseif($actionName == 'linked2execution' or $actionName == 'linked2kanban')
|
||||
{
|
||||
$execution = $this->dao->select('name,type')->from(TABLE_PROJECT)->where('id')->eq($action->extra)->fetch();
|
||||
$name = $execution->name;
|
||||
$method = $execution->type == 'kanban' ? 'kanban' : 'view';
|
||||
if($name)
|
||||
if(!empty($execution))
|
||||
{
|
||||
$name = $execution->name;
|
||||
$method = $execution->type == 'kanban' ? 'kanban' : 'view';
|
||||
$action->extra = (!common::hasPriv('execution', $method) or ($method == 'kanban' and isonlybody())) ? $name : html::a(helper::createLink('execution', $method, "executionID=$action->execution"), $name);
|
||||
}
|
||||
}
|
||||
@@ -1060,6 +1060,9 @@ class actionModel extends model
|
||||
|
||||
$programCondition = empty($this->app->user->view->programs) ? '0' : $this->app->user->view->programs;
|
||||
|
||||
$efforts = $this->dao->select('id')->from(TABLE_EFFORT)->where($condition)->fetchPairs();
|
||||
$efforts = !empty($efforts) ? implode(',', $efforts) : 0;
|
||||
|
||||
/* Get actions. */
|
||||
$actions = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->where('objectType')->notIN($this->config->action->ignoreObjectType4Dynamic)
|
||||
@@ -1087,6 +1090,7 @@ class actionModel extends model
|
||||
/* Filter out client login/logout actions. */
|
||||
->andWhere('action')->notin('disconnectxuanxuan,reconnectxuanxuan,loginxuanxuan,logoutxuanxuan')
|
||||
->andWhere("IF((objectType = 'program'), (objectID in ($programCondition)), '1=1')")
|
||||
->andWhere("IF((objectType = 'effort'), (objectID in ($efforts)), '1=1')")
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
|
||||
@@ -17,7 +17,7 @@ foreach($products as $product)
|
||||
}
|
||||
$productsPinYin = common::convert2Pinyin($productNames);
|
||||
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, 0);
|
||||
$productsHtml = count($products) > 1 ? html::a($linkHtml, $this->lang->bug->allProduct, '', "class='text-important' title='{$this->lang->bug->allProduct}' data-key='" . zget($productsPinYin, $this->lang->bug->allProduct, '') . "' data-app='{$this->app->tab}'") : '';
|
||||
$productsHtml = count($products) > 1 ? html::a($linkHtml, $this->lang->bug->allProduct, '', "class='text-primary' title='{$this->lang->bug->allProduct}' data-key='" . zget($productsPinYin, $this->lang->bug->allProduct, '') . "' data-app='{$this->app->tab}'") : '';
|
||||
|
||||
foreach($products as $product)
|
||||
{
|
||||
@@ -26,7 +26,7 @@ foreach($products as $product)
|
||||
$productName .= $product->line ? zget($lines, $product->line, '') . '/' . $product->name : $product->name;
|
||||
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
|
||||
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id);
|
||||
$productsHtml .= html::a($linkHtml, $productName, '', "class='text-important $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='{$this->app->tab}'");
|
||||
$productsHtml .= html::a($linkHtml, $productName, '', "class='text-primary $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='{$this->app->tab}'");
|
||||
}
|
||||
?>
|
||||
<div class="table-row">
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#stories .action {display: none;}
|
||||
#bugs .action {display: none;}
|
||||
tbody tr td:first-child input {display: none;}
|
||||
.page-title .dropdown-menu {top: 40px; left: 70px;}
|
||||
</style>
|
||||
<?php endif;?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
@@ -28,8 +29,8 @@ tbody tr td:first-child input {display: none;}
|
||||
<?php common::printBack($browseLink, 'btn btn-secondary');?>
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='text' title='<?php echo $build->name;?>'>
|
||||
<?php echo html::a('javascript:void(0)', "<span class='label label-id'>{$build->id}</span> " . $build->name . " <span class='caret'></span>", '', "data-toggle='dropdown' class='btn btn-link btn-active-text'");?>
|
||||
<span title='<?php echo $build->name;?>'>
|
||||
<?php echo html::a('javascript:void(0)', "<span class='label label-id'>{$build->id}</span> " . $build->name . " <span class='caret'></span>", '', "data-toggle='dropdown' class='text btn btn-link btn-active-text'");?>
|
||||
<?php
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
foreach($buildPairs as $id => $name)
|
||||
|
||||
@@ -25,7 +25,7 @@ foreach($products as $product)
|
||||
$linkHtml = sprintf($link, $product->id);
|
||||
if($product->status == 'normal' and $product->PO == $this->app->user->account)
|
||||
{
|
||||
$myProductsHtml .= html::a($linkHtml, $productName, '', "class='text-important $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$tab'");
|
||||
$myProductsHtml .= html::a($linkHtml, $productName, '', "class='text-primary $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$tab'");
|
||||
}
|
||||
else if($product->status == 'normal' and !($product->PO == $this->app->user->account))
|
||||
{
|
||||
|
||||
@@ -2498,7 +2498,7 @@ class execution extends control
|
||||
$kanbanGroup = $this->kanban->getExecutionKanban($executionID, $browseType, $groupBy, '', $orderBy);
|
||||
if(empty($kanbanGroup))
|
||||
{
|
||||
$this->kanban->createExecutionLane($executionID, $browseType, $groupBy);
|
||||
$this->kanban->createExecutionLane($executionID, $browseType);
|
||||
$kanbanGroup = $this->kanban->getExecutionKanban($executionID, $browseType, $groupBy, '', $orderBy);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,3 +20,4 @@ th.c-pri{width:50px;}
|
||||
.switchBtn {background-color: #fff !important;}
|
||||
.switchBtn > i {padding-left: 7px;}
|
||||
#main>.container {padding: 0 20px 20px 23px;}
|
||||
#executionStoryForm table tbody tr td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 0 4px 0 0;}
|
||||
|
||||
@@ -706,7 +706,7 @@ class executionModel extends model
|
||||
/* Check unique code for edited executions. */
|
||||
if($projectModel == 'scrum' and isset($executionCode) and empty($executionCode))
|
||||
{
|
||||
dao::$errors['code'][] = 'execution#' . $executionID . sprintf($this->lang->error->notempty, $this->lang->project->code);
|
||||
dao::$errors['code'][] = 'execution#' . $executionID . sprintf($this->lang->error->notempty, $this->lang->execution->execCode);
|
||||
return false;
|
||||
}
|
||||
elseif(!empty($executionCode))
|
||||
@@ -714,7 +714,7 @@ class executionModel extends model
|
||||
/* Check unique code for edited executions. */
|
||||
if(isset($codeList[$executionCode]))
|
||||
{
|
||||
dao::$errors['code'][] = 'execution#' . $executionID . sprintf($this->lang->error->unique, $this->lang->project->code, $executionCode);
|
||||
dao::$errors['code'][] = 'execution#' . $executionID . sprintf($this->lang->error->unique, $this->lang->execution->execCode, $executionCode);
|
||||
return false;
|
||||
}
|
||||
$codeList[$executionCode] = $executionCode;
|
||||
|
||||
@@ -185,3 +185,4 @@
|
||||
.region.active.notAll {margin-top: -5px;}
|
||||
.region.active.notAll .region-header {display: none;}
|
||||
.region.active.notAll .kanban, .region.active.notAll .kanban .kanban-header {background-color: #efefef;}
|
||||
.kanban-card a[disabled] {color: #313c52;}
|
||||
|
||||
@@ -1457,7 +1457,7 @@ $(function()
|
||||
resetRegionHeight($(this).hasClass('icon-angle-top') ? 'open' : 'close');
|
||||
});
|
||||
|
||||
$('.region-header').on('click', '.action', hideKanbanAction);
|
||||
$('#regionTabs, .region-header').on('click', '.action', hideKanbanAction);
|
||||
$('#TRAction').on('click', '.btn', hideKanbanAction);
|
||||
|
||||
/* Hide action box when user click document */
|
||||
|
||||
+15
-65
@@ -1554,7 +1554,7 @@ class kanbanModel extends model
|
||||
|
||||
$teamPairs = array();
|
||||
foreach($taskTeams[$taskID] as $account => $team) $teamPairs[$account] = $team->realname;
|
||||
$task->team = $teamPairs;
|
||||
$task->teamMember = $teamPairs;
|
||||
}
|
||||
|
||||
/* Get objects cards menus. */
|
||||
@@ -1610,6 +1610,7 @@ class kanbanModel extends model
|
||||
$laneData['order'] = $lane->order;
|
||||
$laneData['type'] = $browseType;
|
||||
$laneData['defaultCardType'] = $browseType;
|
||||
if(empty($laneID) and !in_array($groupBy, array('module', 'story', 'pri', 'severity'))) $laneID = '';
|
||||
|
||||
if($browseType == 'task' and $groupBy == 'story')
|
||||
{
|
||||
@@ -1675,8 +1676,9 @@ class kanbanModel extends model
|
||||
if($groupBy == 'assignedTo')
|
||||
{
|
||||
$laneID = (string)$laneID;
|
||||
if(empty($object->team) and $object->$groupBy !== $laneID) continue;
|
||||
if(!empty($object->team) and !in_array($laneID, array_keys($object->team), true)) continue;
|
||||
if(empty($object->$groupBy)) $object->$groupBy = '';
|
||||
if(empty($object->teamMember) and (string)$object->$groupBy !== $laneID) continue;
|
||||
if(!empty($object->teamMember) and !in_array($laneID, array_keys($object->teamMember), true)) continue;
|
||||
|
||||
if($object->$groupBy !== $laneID) $cardData['assignedTo'] = $laneID;
|
||||
}
|
||||
@@ -1745,9 +1747,9 @@ class kanbanModel extends model
|
||||
{
|
||||
if(!isset($groupByList[$item->$groupBy])) $groupByList[$item->$groupBy] = $item->$groupBy;
|
||||
|
||||
if($groupBy == 'assignedTo' and !empty($item->team))
|
||||
if($groupBy == 'assignedTo' and !empty($item->teamMember))
|
||||
{
|
||||
foreach($item->team as $account => $name)
|
||||
foreach($item->teamMember as $account => $name)
|
||||
{
|
||||
if(!isset($groupByList[$account])) $groupByList[$account] = $account;
|
||||
}
|
||||
@@ -1796,6 +1798,7 @@ class kanbanModel extends model
|
||||
|
||||
if(in_array($groupBy, array('module', 'story', 'pri', 'severity'))) $objectPairs[0] = $this->lang->$browseType->$groupBy . ': ' . $this->lang->kanban->noGroup;
|
||||
if(in_array($groupBy, array('assignedTo', 'source'))) $objectPairs[] = $this->lang->$browseType->$groupBy . ': ' . $this->lang->kanban->noGroup;
|
||||
if($browseType == 'bug' and $groupBy == 'type') $objectPairs[0] = $this->lang->$browseType->$groupBy . ': ' . $this->lang->kanban->noGroup;
|
||||
|
||||
$laneColor = 0;
|
||||
$order = 1;
|
||||
@@ -2420,72 +2423,19 @@ class kanbanModel extends model
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $type all|story|bug|task
|
||||
* @param string $groupBy default
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createExecutionLane($executionID, $type = 'all', $groupBy = 'default')
|
||||
public function createExecutionLane($executionID, $type = 'all')
|
||||
{
|
||||
if($groupBy == 'default' or $type == 'all')
|
||||
foreach($this->config->kanban->default as $type => $lane)
|
||||
{
|
||||
foreach($this->config->kanban->default as $type => $lane)
|
||||
{
|
||||
$lane->type = $type;
|
||||
$lane->execution = $executionID;
|
||||
$this->dao->insert(TABLE_KANBANLANE)->data($lane)->exec();
|
||||
$lane->type = $type;
|
||||
$lane->execution = $executionID;
|
||||
$this->dao->insert(TABLE_KANBANLANE)->data($lane)->exec();
|
||||
|
||||
$laneID = $this->dao->lastInsertId();
|
||||
$this->createExecutionColumns($laneID, $type, $executionID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->loadModel($type);
|
||||
$groupList = $this->getObjectGroup($executionID, $type, $groupBy);
|
||||
|
||||
$objectPairs = array();
|
||||
if($groupBy == 'module') $objectPairs = $this->dao->select('id,name')->from(TABLE_MODULE)->where('type')->in('story,bug,task')->andWhere('deleted')->eq('0')->fetchPairs();
|
||||
if($groupBy == 'story') $objectPairs = $this->dao->select('id,title')->from(TABLE_STORY)->where('deleted')->eq(0)->fetchPairs();
|
||||
if($groupBy == 'assignedTo') $objectPairs = $this->loadModel('user')->getPairs('noletter');
|
||||
|
||||
$laneName = '';
|
||||
$laneOrder = 5;
|
||||
$colorIndex = 0;
|
||||
foreach($groupList as $groupKey)
|
||||
{
|
||||
if($groupKey)
|
||||
{
|
||||
if(strpos('module,story,assignedTo', $groupBy) !== false)
|
||||
{
|
||||
$laneName = zget($objectPairs, $groupKey);
|
||||
}
|
||||
else
|
||||
{
|
||||
$laneName = zget($this->lang->$type->{$groupBy . 'List'}, $groupKey);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$laneName = $this->lang->kanban->noGroup;
|
||||
}
|
||||
|
||||
$lane = new stdClass();
|
||||
$lane->execution = $executionID;
|
||||
$lane->type = $type;
|
||||
$lane->groupby = $groupBy;
|
||||
$lane->extra = $groupKey;
|
||||
$lane->name = $laneName;
|
||||
$lane->color = $this->config->kanban->laneColorList[$colorIndex];
|
||||
$lane->order = $laneOrder;
|
||||
|
||||
$laneOrder += 5;
|
||||
$colorIndex += 1;
|
||||
if($colorIndex == count($this->config->kanban->laneColorList) + 1) $colorIndex = 0;
|
||||
$this->dao->insert(TABLE_KANBANLANE)->data($lane)->exec();
|
||||
|
||||
$laneID = $this->dao->lastInsertId();
|
||||
$this->createExecutionColumns($laneID, $type, $executionID, $groupBy, $groupKey);
|
||||
}
|
||||
$laneID = $this->dao->lastInsertId();
|
||||
$this->createExecutionColumns($laneID, $type, $executionID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,3 +8,4 @@
|
||||
.dropdown-list > li > a:focus {color: #1a4f85; text-decoration: none; background-color: #ddd;}
|
||||
|
||||
.btn-toolbar .nav-title {float: left; display: inline-block; padding: 6px 12px; margin-bottom: 0; font-size: 13px; font-weight: bolder; line-height: 18px; text-align: center; white-space: nowrap; vertical-align: middle;}
|
||||
#myStoryForm table tbody tr td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 0 4px 0 0;}
|
||||
|
||||
@@ -10,3 +10,4 @@
|
||||
.table td.c-hours {padding-right: 12px;}
|
||||
.main-table tbody > tr.table-children > td:first-child::before {width: 3px;}
|
||||
@-moz-document url-prefix() {.main-table tbody > tr.table-children > td:first-child::before {width: 4px;};}
|
||||
.c-actions-6 {width: 185px;}
|
||||
|
||||
@@ -51,12 +51,7 @@
|
||||
<tr>
|
||||
<td class='c-id'><?php printf('%03d', $project->id);?></td>
|
||||
<td class='c-name text-left' title='<?php echo $project->name?>'>
|
||||
<?php
|
||||
if($project->model === 'waterfall') echo "<span class='project-type-label label label-outline label-warning'>{$lang->project->waterfall}</span> ";
|
||||
if($project->model === 'scrum') echo "<span class='project-type-label label label-outline label-info'>{$lang->project->scrum}</span> ";
|
||||
if($project->model === 'kanban') echo "<span class='project-type-label label label-outline label-info'>{$lang->project->kanban}</span> ";
|
||||
echo html::a($this->createLink('project', 'index', "projectID=$project->id", '', '', $project->id), $project->name, '', "data-group='project'");
|
||||
?>
|
||||
<?php echo html::a($this->createLink('project', 'index', "projectID=$project->id", '', '', $project->id), $project->name, '', "data-group='project' title='{$project->name} ({$this->lang->project->{$project->model}})'");?>
|
||||
</td>
|
||||
<?php if($status == 'openedbyme'):?>
|
||||
<td class='c-status'><span class="status-project status-<?php echo $project->status?>"><?php echo zget($lang->project->statusList, $project->status, '');?></span></td>
|
||||
|
||||
@@ -114,8 +114,21 @@
|
||||
echo common::buildIconButton('story', 'review', "$vars&from=product&storyType=requirement", $story, 'list', 'search', '', 'iframe', true);
|
||||
}
|
||||
echo common::buildIconButton('story', 'recall', "$vars&from=list&storyType=requirement", $story, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
|
||||
echo common::buildIconButton('story', 'close', "$vars&from=&storyType=requirement", $story, 'list', '', '', 'iframe', true);
|
||||
echo common::buildIconButton('story', 'edit', "$vars&from=default&storyType=requirement", $story, 'list', '', '', 'iframe', true, "data-width='95%'");
|
||||
|
||||
$storyType = 'storyType=requirement';
|
||||
$canChange = common::hasPriv('story', 'change', '', $storyType);
|
||||
$canSubmitReview = (strpos('draft,changing', $story->status) !== false and common::hasPriv('story', 'submitReview', '', $storyType));
|
||||
$canReview = (strpos('draft,changing', $story->status) === false and common::hasPriv('story', 'review', '', $storyType));
|
||||
$canRecall = common::hasPriv('story', 'recall', '', $storyType);
|
||||
$canEdit = common::hasPriv('story', 'edit', '', $storyType);
|
||||
$canClose = common::hasPriv('story', 'close', '', $storyType);
|
||||
if(($canChange or $canSubmitReview or $canReview or $canRecall or $canEdit) and $canClose)
|
||||
{
|
||||
echo "<div class='dividing-line'></div>";
|
||||
}
|
||||
|
||||
echo common::buildIconButton('story', 'close', "$vars&from=&storyType=requirement", $story, 'list', '', '', 'iframe', true);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
@@ -163,8 +176,19 @@
|
||||
}
|
||||
|
||||
common::printIcon('story', 'recall', "$vars&from=list&storyType=story", $child, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
|
||||
common::printIcon('story', 'close', "$vars&from=&storyType=story", $child, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('story', 'edit', "$vars&from=default&storyType=story", $child, 'list');
|
||||
$storyType = 'storyType=story';
|
||||
$canChange = common::hasPriv('story', 'change', '', $storyType);
|
||||
$canSubmitReview = (strpos('draft,changing', $child->status) !== false and common::hasPriv('story', 'submitReview', '', $storyType));
|
||||
$canReview = (strpos('draft,draft', $child->status) === false and common::hasPriv('story', 'review', '', $storyType));
|
||||
$canRecall = common::hasPriv('story', 'recall', '', $storyType);
|
||||
$canEdit = common::hasPriv('story', 'edit', '', $storyType);
|
||||
$canClose = common::hasPriv('story', 'close', '', $storyType);
|
||||
if(($canChange or $canSubmitReview or $canReview or $canRecall or $canEdit) and $canClose)
|
||||
{
|
||||
echo "<div class='dividing-line'></div>";
|
||||
}
|
||||
common::printIcon('story', 'close', "$vars&from=&storyType=story", $child, 'list', '', '', 'iframe', true);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -50,6 +50,11 @@
|
||||
$canBatchReview = common::hasPriv('story', 'batchReview');
|
||||
$canBatchAssignTo = common::hasPriv('story', 'batchAssignTo');
|
||||
$canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchReview or $canBatchAssignTo);
|
||||
$canChange = common::hasPriv('story', 'change');
|
||||
$canRecall = common::hasPriv('story', 'recall');
|
||||
$canEdit = common::hasPriv('story', 'edit');
|
||||
$canCreateCase = common::hasPriv('testcase', 'create');
|
||||
$canClose = common::hasPriv('story', 'close');
|
||||
?>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -116,9 +121,21 @@
|
||||
}
|
||||
|
||||
echo common::buildIconButton('story', 'recall', $vars, $story, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
|
||||
echo common::buildIconButton('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
|
||||
echo common::buildIconButton('story', 'edit', $vars, $story, 'list', '', '', 'iframe', true, "data-width='95%'");
|
||||
echo common::buildIconButton('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'");
|
||||
|
||||
$canSubmitReview = (strpos('draft,changing', $story->status) !== false and common::hasPriv('story', 'submitReview'));
|
||||
$canReview = (strpos('draft,changing', $story->status) === false and common::hasPriv('story', 'review'));
|
||||
|
||||
if(($canChange or $canSubmitReview or $canReview or $canRecall or $canEdit) and ($canCreateCase or $canClose))
|
||||
{
|
||||
echo "<div class='dividing-line'></div>";
|
||||
}
|
||||
|
||||
echo common::buildIconButton('testcase', 'create', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'");
|
||||
|
||||
if($canCreateCase and $canClose) echo "<div class='dividing-line'></div>";
|
||||
|
||||
echo common::buildIconButton('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
@@ -165,9 +182,21 @@
|
||||
common::printIcon('story', 'review', $vars, $child, 'list', 'search', '', 'iframe', true);
|
||||
}
|
||||
common::printIcon('story', 'recall', $vars, $child, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
|
||||
common::printIcon('story', 'close', $vars, $child, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('story', 'edit', $vars, $child, 'list', '', '', 'iframe', true, "data-width='95%'");
|
||||
common::printIcon('story', 'createCase', "productID=$child->product&branch=$child->branch&module=0&from=¶m=0&$vars", $child, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'");
|
||||
|
||||
$canSubmitReview = (strpos('draft,changing', $child->status) !== false and common::hasPriv('story', 'submitReview'));
|
||||
$canReview = (strpos('draft,changing', $child->status) === false and common::hasPriv('story', 'review'));
|
||||
|
||||
if(($canChange or $canSubmitReview or $canReview or $canRecall or $canEdit) and ($canCreateCase or $canClose))
|
||||
{
|
||||
echo "<div class='dividing-line'></div>";
|
||||
}
|
||||
|
||||
common::printIcon('testcase', 'create', "productID=$child->product&branch=$child->branch&module=0&from=¶m=0&$vars", $child, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'");
|
||||
|
||||
if($canCreateCase and $canClose) echo "<div class='dividing-line'></div>";
|
||||
|
||||
common::printIcon('story', 'close', $vars, $child, 'list', '', '', 'iframe', true);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -1289,6 +1289,7 @@ class product extends control
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->showBatchEdit = $this->cookie->showProductBatchEdit;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -38,15 +38,13 @@
|
||||
#sidebar>.cell {width: 100%;}
|
||||
|
||||
th.c-name {width: 400px;}
|
||||
th.c-requirement {width: 290px;}
|
||||
th.c-story {width: 290px;}
|
||||
th.c-bug {width: 200px;}
|
||||
th.c-bug {width: 150px;}
|
||||
th.c-plan {width: 45px;}
|
||||
th.c-release {width: 50px;}
|
||||
th.c-actions {width: 50px;}
|
||||
[lang='en'] .en-wrap-text {white-space: normal; height: 24px; line-height: 1; font-size: 12px;}
|
||||
|
||||
|
||||
#productListForm thead>tr>th,
|
||||
#productListForm tbody>tr>td {text-align: center; text-overflow: unset!important}
|
||||
#productListForm thead>tr>th {padding: 0; line-height: 24px;}
|
||||
@@ -86,6 +84,7 @@ th.c-actions {width: 50px;}
|
||||
[lang^='zh-'] th.c-story {width: 220px;}
|
||||
}
|
||||
|
||||
#productTableList .c-name > span.table-nest-icon {width: 0; visibility: hidden;}
|
||||
#productTableList > tr.row-line.is-nest-child > td.text-left.table-nest-title > span.table-nest-icon.icon:before{content: '\e6f2'; background-color: white; display: inline;}
|
||||
#productTableList > tr.row-line.no-nest > td.text-left.table-nest-title > span.table-nest-icon.icon:before{content: '\e6f2'; background-color: white; display: inline;}
|
||||
.statistic {margin-left: 10px; color: #838a9d; float: left; position: relative; line-height: 28px;}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
$("#" + browseType + "Tab").addClass('btn-active-text');
|
||||
$(function()
|
||||
{
|
||||
$('#productListForm .c-checkbox, #productListForm .check-all').hide();
|
||||
|
||||
$('input[name^="showEdit"]').click(function()
|
||||
{
|
||||
$('#productListForm .c-checkbox, #productListForm .check-all').hide();
|
||||
var showEdit = $(this).is(':checked') ? 1 : 0;
|
||||
if(showEdit) $('#productListForm .c-checkbox, #productListForm .check-all').show();
|
||||
$.cookie('showProductBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot});
|
||||
setCheckbox();
|
||||
});
|
||||
setCheckbox();
|
||||
|
||||
/* Init table sort. */
|
||||
$('#productTableList').addClass('sortable').sortable(
|
||||
@@ -45,6 +43,23 @@ $(function()
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Set batch edit checkbox.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setCheckbox()
|
||||
{
|
||||
$('#productListForm .c-checkbox, #productListForm .check-all').hide();
|
||||
$('.c-name').css('border-left', 'none');
|
||||
if($.cookie('showProductBatchEdit') == 1)
|
||||
{
|
||||
$('#productListForm .c-checkbox, #productListForm .check-all').show();
|
||||
$('.c-name').css('border-left', '1px solid #ddd');
|
||||
}
|
||||
}
|
||||
|
||||
/* Update parent checkbox */
|
||||
function updatePrarentCheckbox($parent)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<?php $recTotalLabel = $browseType == $key ? " <span class='label label-light label-badge'>{$recTotal}</span>" : '';?>
|
||||
<?php echo html::a(inlink("all", "browseType=$key&orderBy=$orderBy"), "<span class='text'>{$label}</span>" . $recTotalLabel, '', "class='btn btn-link' id='{$key}Tab'");?>
|
||||
<?php endforeach;?>
|
||||
<?php if($canBatchEdit) echo html::checkbox('showEdit', array('1' => $lang->product->edit));?>
|
||||
<?php if($canBatchEdit) echo html::checkbox('showEdit', array('1' => $lang->product->edit), $showBatchEdit);?>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->product->searchStory;?></a>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
@@ -52,11 +52,8 @@
|
||||
<a class='table-nest-toggle table-nest-toggle-global' data-expand-text='<?php echo $lang->expand; ?>' data-collapse-text='<?php echo $lang->collapse; ?>'></a>
|
||||
<?php common::printOrderLink('name', $orderBy, $vars, $lang->product->name);?>
|
||||
</th>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<th class='c-requirement' colspan="5"><?php echo $lang->story->requirement;?></th>
|
||||
<?php endif;?>
|
||||
<th class="c-story" colspan="5"><?php echo $lang->story->story;?></th>
|
||||
<th class="c-bug" colspan="3"><?php echo $lang->bug->common;?></th>
|
||||
<th class="c-bug" colspan="2"><?php echo $lang->bug->common;?></th>
|
||||
<th class="c-plan" rowspan="2"><?php echo $lang->product->plan;?></th>
|
||||
<th class="c-release" rowspan="2"><?php echo $lang->product->release;?></th>
|
||||
<?php
|
||||
@@ -66,20 +63,12 @@
|
||||
<th class='c-actions' rowspan="2"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
<tr class="text-center">
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->story->draft;?></th>
|
||||
<th><?php echo $lang->story->activate;?></th>
|
||||
<th><?php echo $lang->story->change;?></th>
|
||||
<th><?php echo $lang->story->statusList['reviewing'];?></th>
|
||||
<th><div class='en-wrap-text'><?php echo $lang->story->completeRate;?></div></th>
|
||||
<?php endif;?>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->story->draft;?></th>
|
||||
<th><?php echo $lang->story->activate;?></th>
|
||||
<th><?php echo $lang->story->change;?></th>
|
||||
<th><?php echo $lang->story->statusList['reviewing'];?></th>
|
||||
<th><div class='en-wrap-text'><?php echo $lang->story->completeRate;?></div></th>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->bug->activate;?></th>
|
||||
<th><?php echo $lang->close;?></th>
|
||||
<th><?php echo $lang->bug->fixedRate;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -114,20 +103,12 @@
|
||||
<span class="table-nest-icon icon table-nest-toggle"></span>
|
||||
<?php echo $program['programName']?>
|
||||
</td>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<td><?php echo $program['draftRequirements'];?></td>
|
||||
<td><?php echo $program['activeRequirements'];?></td>
|
||||
<td><?php echo $program['changingRequirements'];?></td>
|
||||
<td><?php echo $program['reviewingRequirements'];?></td>
|
||||
<td><?php echo $program['totalRequirements'] == 0 ? 0 : round($program['closedRequirements'] / $program['totalRequirements'], 3) * 100;?>%</td>
|
||||
<?php endif;?>
|
||||
<td><?php echo $program['draftStories'];?></td>
|
||||
<td><?php echo $program['activeStories'];?></td>
|
||||
<td><?php echo $program['changingStories'];?></td>
|
||||
<td><?php echo $program['reviewingStories'];?></td>
|
||||
<td><?php echo $program['totalStories'] == 0 ? 0 : round($program['closedStories'] / $program['totalStories'], 3) * 100;?>%</td>
|
||||
<td><?php echo $program['unResolvedBugs'];?></td>
|
||||
<td><?php echo $program['closedBugs'];?></td>
|
||||
<td><?php echo ($program['unResolvedBugs'] + $program['fixedBugs']) == 0 ? 0 : round($program['fixedBugs'] / ($program['unResolvedBugs'] + $program['fixedBugs']), 3) * 100;?>%</td>
|
||||
<td><?php echo $program['plans'];?></td>
|
||||
<td><?php echo $program['releases'];?></td>
|
||||
@@ -161,20 +142,12 @@
|
||||
<span class="table-nest-icon icon table-nest-toggle"></span>
|
||||
<?php echo $line['lineName']?>
|
||||
</td>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<td><?php echo isset($line['draftRequirements']) ? $line['draftRequirements'] : 0;?></td>
|
||||
<td><?php echo isset($line['activeRequirements']) ? $line['activeRequirements'] : 0;?></td>
|
||||
<td><?php echo isset($line['changingRequirements']) ? $line['changingRequirements'] : 0;?></td>
|
||||
<td><?php echo isset($line['reviewingRequirements']) ? $line['reviewingRequirements'] : 0;?></td>
|
||||
<td><?php echo (isset($line['totalRequirements']) and $line['totalRequirements'] != 0) ? round($line['closedRequirements'] / $line['totalRequirements'], 3) * 100 : 0;?>%</td>
|
||||
<?php endif;?>
|
||||
<td><?php echo isset($line['draftStories']) ? $line['draftStories'] : 0;?></td>
|
||||
<td><?php echo isset($line['activeStories']) ? $line['activeStories'] : 0;?></td>
|
||||
<td><?php echo isset($line['changingStories']) ? $line['changingStories'] : 0;?></td>
|
||||
<td><?php echo isset($line['reviewingStories']) ? $line['reviewingStories'] : 0;?></td>
|
||||
<td><?php echo (isset($line['totalStories']) and $line['totalStories'] != 0) ? round($line['closedStories'] / $line['totalStories'], 3) * 100 : 0;?>%</td>
|
||||
<td><?php echo isset($line['unResolvedBugs']) ? $line['unResolvedBugs'] : 0;?></td>
|
||||
<td><?php echo isset($line['closedBugs']) ? $line['closedBugs'] : 0;?></td>
|
||||
<td><?php echo (isset($line['fixedBugs']) and ($line['unResolvedBugs'] + $line['fixedBugs'] != 0)) ? round($line['fixedBugs'] / ($line['unResolvedBugs'] + $line['fixedBugs']), 3) * 100 : 0;?>%</td>
|
||||
<td><?php echo isset($line['plans']) ? $line['plans'] : 0;?></td>
|
||||
<td><?php echo isset($line['releases']) ? $line['releases'] : 0;?></td>
|
||||
@@ -218,24 +191,15 @@
|
||||
<?php endif;?>
|
||||
<td class="c-name text-left sort-handler table-nest-title" title='<?php echo $product->name?>'>
|
||||
<?php
|
||||
$productLink = html::a($this->createLink('product', 'browse', 'productID=' . $product->id), $product->name);
|
||||
echo "<span class='table-nest-icon icon icon-product'></span>" . $productLink;
|
||||
echo html::a($this->createLink('product', 'browse', 'productID=' . $product->id), $product->name);
|
||||
?>
|
||||
</td>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<td><?php echo $product->requirements['draft'];?></td>
|
||||
<td><?php echo $product->requirements['active'];?></td>
|
||||
<td><?php echo $product->requirements['changing'];?></td>
|
||||
<td><?php echo $product->requirements['reviewing'];?></td>
|
||||
<td><?php echo $totalRequirements == 0 ? 0 : round($product->requirements['closed'] / $totalRequirements, 3) * 100;?>%</td>
|
||||
<?php endif;?>
|
||||
<td><?php echo $product->stories['draft'];?></td>
|
||||
<td><?php echo $product->stories['active'];?></td>
|
||||
<td><?php echo $product->stories['changing'];?></td>
|
||||
<td><?php echo $product->stories['reviewing'];?></td>
|
||||
<td><?php echo $totalStories == 0 ? 0 : round($product->stories['closed'] / $totalStories, 3) * 100;?>%</td>
|
||||
<td><?php echo $product->unResolved;?></td>
|
||||
<td><?php echo $product->closedBugs;?></td>
|
||||
<td><?php echo ($product->unResolved + $product->fixedBugs) == 0 ? 0 : round($product->fixedBugs / ($product->unResolved + $product->fixedBugs), 3) * 100;?>%</td>
|
||||
<td><?php echo $product->plans;?></td>
|
||||
<td><?php echo $product->releases;?></td>
|
||||
|
||||
@@ -43,7 +43,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
.btn-group button.dropdown-toggle.btn-secondary, .btn-group button.dropdown-toggle.btn-primary {padding:6px;}
|
||||
|
||||
#productStoryForm table tbody tr td.c-actions {overflow: visible;}
|
||||
#productStoryForm table tbody tr td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #E4E4E4; margin: 0 4px 0 0;}
|
||||
#productStoryForm table tbody tr td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 0 4px 0 0;}
|
||||
</style>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<?php if(!$isProjectStory):?>
|
||||
@@ -347,11 +347,11 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
{
|
||||
if($value->id == 'title' || $value->id == 'id' || $value->id == 'pri' || $value->id == 'status')
|
||||
{
|
||||
$this->story->printCell($value, $story, $users, $branchOption, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table');
|
||||
$this->story->printCell($value, $story, $users, $branchOption, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table', $storyType);
|
||||
}
|
||||
}?>
|
||||
<?php else:?>
|
||||
<?php foreach($setting as $key => $value) $this->story->printCell($value, $story, $users, $branchOption, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table');?>
|
||||
<?php foreach($setting as $key => $value) $this->story->printCell($value, $story, $users, $branchOption, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table', $storyType);?>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php if(!empty($story->children)):?>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<ul class='dropdown-menu' style='max-height:240px; max-width: 300px; overflow-y:auto'>
|
||||
<?php foreach($lang->productplan->orderList as $order => $label):?>
|
||||
<?php $active = $orderBy == $order ? 'active' : '';?>
|
||||
<li class='<?php echo $active;?>'><?php echo html::a(inlink('browse', "productID=$productID&branch=$branchID&browseType=$browseType&orderBy=$order"), $label);?></li>
|
||||
<li class='<?php echo $active;?>'><?php echo html::a(inlink('browse', "productID=$productID&branch=$branchID&browseType=$browseType&queryID=$queryID&orderBy=$order"), $label);?></li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
+16
-14
@@ -163,14 +163,15 @@ class program extends control
|
||||
$this->view->program = $program;
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->program->product;
|
||||
$this->view->position[] = $this->lang->program->product;
|
||||
$this->view->programID = $programID;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->products = $this->loadModel('product')->getStats($orderBy, $pager, $browseType, '', 'story', $programID);
|
||||
$this->view->title = $this->lang->program->product;
|
||||
$this->view->position[] = $this->lang->program->product;
|
||||
$this->view->programID = $programID;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->products = $this->loadModel('product')->getStats($orderBy, $pager, $browseType, '', 'story', $programID);
|
||||
$this->view->showBatchEdit = $this->cookie->showProductBatchEdit;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -479,12 +480,13 @@ class program extends control
|
||||
$this->view->title = $this->lang->program->project;
|
||||
$this->view->position[] = $this->lang->program->project;
|
||||
|
||||
$this->view->projectStats = $projectStats;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->programID = $programID;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->projectStats = $projectStats;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->programID = $programID;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->showBatchEdit = $this->cookie->showProjectBatchEdit;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -3,3 +3,4 @@
|
||||
tbody.sortable > tr > td > span.sort-handler {color: #999;}
|
||||
.icon-move {color: #16a8f8;}
|
||||
.table.has-sort-head thead>tr>th>a:after, .table.has-sort-head thead>tr>th>a:before {top: -4px;}
|
||||
.statistic {margin-left: 10px; color: #838a9d; float: left; position: relative; line-height: 28px;}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
$(function()
|
||||
{
|
||||
$('input[name^="showEdit"]').click(function()
|
||||
{
|
||||
$.cookie('showProductBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot});
|
||||
setCheckbox();
|
||||
});
|
||||
setCheckbox();
|
||||
|
||||
$(":checkbox[name^='productIDList']").on('click', function()
|
||||
{
|
||||
updateStatistic()
|
||||
});
|
||||
|
||||
$(".check-all").on('click', function()
|
||||
{
|
||||
if($(":checkbox[name^='productIDList']:not(:checked)").length == 0)
|
||||
{
|
||||
$(":checkbox[name^='productIDList']").prop('checked', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$(":checkbox[name^='productIDList']").prop('checked', true);
|
||||
}
|
||||
updateStatistic()
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Set batch edit checkbox.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setCheckbox()
|
||||
{
|
||||
$('#productListForm .checkbox-primary, #productListForm .check-all').hide();
|
||||
$('#productListForm .product-id').addClass('hidden');
|
||||
if($.cookie('showProductBatchEdit') == 1)
|
||||
{
|
||||
$('#productListForm .checkbox-primary, #productListForm .check-all').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#productListForm .product-id').removeClass('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a statistics prompt statement after the Edit button.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function addStatistic()
|
||||
{
|
||||
var checkedLength = $(":checkbox[name^='productIDList']:checked").length;
|
||||
if(checkedLength > 0)
|
||||
{
|
||||
var summary = checkedProducts.replace('%s', checkedLength);
|
||||
if(cilentLang == "en" && checkedLength < 2) summary = summary.replace('products', 'product');
|
||||
|
||||
var statistic = "<div id='productsSummary' class='statistic'>" + summary + "</div>";
|
||||
$('#productsCount').hide();
|
||||
$('#productsSummary').remove();
|
||||
$('#editBtn').after(statistic);
|
||||
$('.table-actions').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.table-actions').hide();
|
||||
$('#productsCount').show();
|
||||
$('#productsSummary').addClass('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Anti shake operation for jquery.
|
||||
*
|
||||
* @param fn $fn
|
||||
* @param delay $delay
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function debounce(fn, delay)
|
||||
{
|
||||
var timer = null;
|
||||
return function()
|
||||
{
|
||||
if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(fn, delay)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update statistics.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function updateStatistic()
|
||||
{
|
||||
debounce(addStatistic(), 200)
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
$(function()
|
||||
{
|
||||
$('input[name^="showEdit"]').click(function()
|
||||
{
|
||||
$.cookie('showProjectBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot});
|
||||
setCheckbox();
|
||||
});
|
||||
setCheckbox();
|
||||
});
|
||||
|
||||
/**
|
||||
* Set batch edit checkbox.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setCheckbox()
|
||||
{
|
||||
$('#projectsForm .checkbox-primary').hide();
|
||||
if($.cookie('showProjectBatchEdit') == 1) $('#projectsForm .checkbox-primary').show();
|
||||
}
|
||||
@@ -53,6 +53,7 @@
|
||||
<?php
|
||||
$icon = '';
|
||||
if($program->type == 'program') $icon = ' icon-program';
|
||||
if($program->type == 'project') $icon = ' icon-common icon-' . $program->model;
|
||||
$class = $program->type == 'program' ? ' table-nest-toggle' : '';
|
||||
?>
|
||||
<span class="table-nest-icon icon <?php echo $class . $icon;?>"></span>
|
||||
@@ -118,9 +119,8 @@
|
||||
#programTableList .icon-scrum:before {content: '\e9a2';}
|
||||
#programTableList .icon-waterfall:before {content: '\e9a4';}
|
||||
#programTableList .icon-kanban:before {content: '\e983';}
|
||||
/* #programTableList .has-nest-child > .c-name > a {color: #0b0f18!important;}
|
||||
#programTableList .is-nest-child > .c-name > a {color: #2463c7!important;} */
|
||||
#programTableList .c-name .label-danger {position: absolute; right: 10px; padding: 2px 4px;}
|
||||
#programTableList > tr[data-type="program"] > .c-name > a {color: #0b0f18 !important;}
|
||||
#programTableList > tr[data-type="program"] > .c-name:hover > a {color: #313c52 !important;}
|
||||
</style>
|
||||
<?php js::set('originOrders', $originOrders);?>
|
||||
<script>
|
||||
|
||||
@@ -11,14 +11,18 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/sortable.html.php';?>
|
||||
<?php js::set('checkedProducts', $lang->product->checkedProducts);?>
|
||||
<?php js::set('cilentLang', $this->app->getClientLang());?>
|
||||
<?php $canBatchEdit = common::hasPriv('product', 'batchEdit');?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<?php if(!isonlybody()):?>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<div class="btn-toolBar pull-left">
|
||||
<?php foreach($lang->product->featureBar['all'] as $key => $label):?>
|
||||
<?php $active = $key == $browseType ? 'btn-active-text' : '';?>
|
||||
<?php if($key == $browseType) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
<?php echo html::a(inlink("product", "programID=$programID&browseType=$key&orderBy=$orderBy"), "<span class='text'>{$label}</span>", '', "class='btn btn-link $active'");?>
|
||||
<?php endforeach;?>
|
||||
<?php if($canBatchEdit) echo html::checkbox('showEdit', array('1' => $lang->product->edit), $showBatchEdit);?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('product', 'create', "programID=$programID", '<i class="icon icon-plus"></i> ' . $lang->product->create, '', 'class="btn btn-primary"');?>
|
||||
@@ -34,7 +38,6 @@
|
||||
<div class="main-col">
|
||||
<form class="main-table table-product" data-ride="table" id="productListForm" method="post" action='<?php echo $this->createLink('product', 'batchEdit', "programID=$programID");?>'>
|
||||
<?php $canOrder = common::hasPriv('product', 'updateOrder');?>
|
||||
<?php $canBatchEdit = common::hasPriv('product', 'batchEdit');?>
|
||||
<table id="productList" class="table has-sort-head table-bordered table-fixed">
|
||||
<?php $vars = "programID=$programID&browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<thead>
|
||||
@@ -48,28 +51,18 @@
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th rowspan="2"><?php common::printOrderLink('name', $orderBy, $vars, $lang->product->name);?></th>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<th class="w-300px" colspan="4"><?php echo $lang->story->requirement;?></th>
|
||||
<?php endif;?>
|
||||
<th class="w-300px" colspan="4"><?php echo $lang->story->story;?></th>
|
||||
<th class="w-200px" colspan="3"><?php echo $lang->bug->common;?></th>
|
||||
<th class="w-150px" colspan="2"><?php echo $lang->bug->common;?></th>
|
||||
<th class="w-80px" rowspan="2"><?php echo $lang->product->plan;?></th>
|
||||
<th class="w-80px" rowspan="2"><?php echo $lang->product->release;?></th>
|
||||
<th class='c-actions w-70px' rowspan="2"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
<tr class="text-center">
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->story->draft;?></th>
|
||||
<th><?php echo $lang->story->activate;?></th>
|
||||
<th><?php echo $lang->story->change;?></th>
|
||||
<th><?php echo $lang->story->completeRate;?></th>
|
||||
<?php endif;?>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->story->draft;?></th>
|
||||
<th><?php echo $lang->story->activate;?></th>
|
||||
<th><?php echo $lang->story->change;?></th>
|
||||
<th><?php echo $lang->story->completeRate;?></th>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->bug->activate;?></th>
|
||||
<th><?php echo $lang->close;?></th>
|
||||
<th><?php echo $lang->bug->fixedRate;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -82,24 +75,16 @@
|
||||
<tr class="text-center" data-id='<?php echo $product->id ?>' data-order='<?php echo $product->code;?>'>
|
||||
<td class='c-id text-left'>
|
||||
<?php if($canBatchEdit):?>
|
||||
<?php echo html::checkbox('productIDList', array($product->id => sprintf('%03d', $product->id)));?>
|
||||
<?php else:?>
|
||||
<?php printf('%03d', $product->id);?>
|
||||
<?php echo html::checkbox('productIDList', array($product->id => sprintf('%03d', $product->id)), '', 'class="id-checkbox ' . (!$showBatchEdit ? 'hidden"' : '"'));?>
|
||||
<?php endif;?>
|
||||
<span class="product-id <?php if($canBatchEdit && $showBatchEdit) echo 'hidden';?>"><?php printf('%03d', $product->id);?></span>
|
||||
</td>
|
||||
<td class="c-name" title='<?php echo $product->name?>'><?php echo html::a($this->createLink('product', 'browse', 'product=' . $product->id), $product->name);?></td>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<td><?php echo $product->requirements['draft'];?></td>
|
||||
<td><?php echo $product->requirements['active'];?></td>
|
||||
<td><?php echo $product->requirements['changing'];?></td>
|
||||
<td><?php echo $totalRequirements == 0 ? 0 : round($product->requirements['closed'] / $totalRequirements, 3) * 100;?>%</td>
|
||||
<?php endif;?>
|
||||
<td><?php echo $product->stories['draft'];?></td>
|
||||
<td><?php echo $product->stories['active'];?></td>
|
||||
<td><?php echo $product->stories['changing'];?></td>
|
||||
<td><?php echo $totalStories == 0 ? 0 : round($product->stories['closed'] / $totalStories, 3) * 100;?>%</td>
|
||||
<td><?php echo $product->unResolved;?></td>
|
||||
<td><?php echo $product->closedBugs;?></td>
|
||||
<td><?php echo ($product->unResolved + $product->fixedBugs) == 0 ? 0 : round($product->fixedBugs / ($product->unResolved + $product->fixedBugs), 3) * 100;?>%</td>
|
||||
<td><?php echo $product->plans;?></td>
|
||||
<td><?php echo $product->releases;?></td>
|
||||
@@ -118,8 +103,15 @@
|
||||
<?php if($canBatchEdit):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php echo html::submitButton($lang->edit, '', 'btn');?>
|
||||
<?php
|
||||
$actionLink = $this->createLink('product', 'batchEdit');
|
||||
echo html::commonButton($lang->edit, "id='editBtn' data-form-action='$actionLink'");
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
$summary = sprintf($lang->product->pageSummary, count($products));
|
||||
echo "<div id='productsCount' class='statistic'>$summary</div>";
|
||||
?>
|
||||
<?php endif;?>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<?php
|
||||
js::set('programID', $programID);
|
||||
js::set('browseType', $browseType);
|
||||
$canBatchEdit = common::hasPriv('project', 'batchEdit');
|
||||
?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolBar pull-left">
|
||||
@@ -24,6 +25,7 @@ js::set('browseType', $browseType);
|
||||
<?php if($browseType == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
<?php echo html::a(inlink('project', "programID=$programID&browseType=$key"), $label, '', "class='btn btn-link $active'");?>
|
||||
<?php endforeach;?>
|
||||
<?php if($canBatchEdit) echo html::checkbox('showEdit', array('1' => $lang->project->edit), $showBatchEdit);?>
|
||||
<?php echo html::checkbox('involved ', array('1' => $lang->project->mine), '', $this->cookie->involved ? 'checked=checked' : '');?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
@@ -46,7 +48,6 @@ js::set('browseType', $browseType);
|
||||
$setting = $this->datatable->getSetting('program');
|
||||
?>
|
||||
<table class='table has-sort-head'>
|
||||
<?php $canBatchEdit = common::hasPriv('project', 'batchEdit');?>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
|
||||
+16
-15
@@ -378,6 +378,7 @@ class project extends control
|
||||
$this->view->recTotal = $recTotal;
|
||||
$this->view->recPerPage = $recPerPage;
|
||||
$this->view->pageID = $pageID;
|
||||
$this->view->showBatchEdit = $this->cookie->showProjectBatchEdit;
|
||||
$this->view->allProjectsNum = $this->loadModel('program')->getProjectStats($programID, 'all');
|
||||
|
||||
$this->display();
|
||||
@@ -1124,7 +1125,6 @@ class project extends control
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$sort = common::appendOrder($orderBy);
|
||||
$bugs = $this->bug->getProjectBugs($projectID, $productID, $branchID, $build, $type, $param, $sort, '', $pager);
|
||||
|
||||
/* team member pairs. */
|
||||
$memberPairs = array();
|
||||
@@ -1153,20 +1153,6 @@ class project extends control
|
||||
}
|
||||
}
|
||||
|
||||
/* Process the openedBuild and resolvedBuild fields. */
|
||||
$bugs = $this->bug->processBuildForBugs($bugs);
|
||||
|
||||
/* Get story and task id list. */
|
||||
$storyIdList = $taskIdList = array();
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
if($bug->story) $storyIdList[$bug->story] = $bug->story;
|
||||
if($bug->task) $taskIdList[$bug->task] = $bug->task;
|
||||
if($bug->toTask) $taskIdList[$bug->toTask] = $bug->toTask;
|
||||
}
|
||||
$storyList = $storyIdList ? $this->loadModel('story')->getByList($storyIdList) : array();
|
||||
$taskList = $taskIdList ? $this->loadModel('task')->getByList($taskIdList) : array();
|
||||
|
||||
$moduleID = $type != 'bysearch' ? $param : 0;
|
||||
$modules = $this->tree->getAllModulePairs('bug');
|
||||
|
||||
@@ -1187,6 +1173,21 @@ class project extends control
|
||||
}
|
||||
$tree = $moduleID ? $this->tree->getByID($moduleID) : '';
|
||||
|
||||
/* Process the openedBuild and resolvedBuild fields. */
|
||||
$bugs = $this->bug->getProjectBugs($projectID, $productID, $branchID, $build, $type, $param, $sort, '', $pager);
|
||||
$bugs = $this->bug->processBuildForBugs($bugs);
|
||||
|
||||
/* Get story and task id list. */
|
||||
$storyIdList = $taskIdList = array();
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
if($bug->story) $storyIdList[$bug->story] = $bug->story;
|
||||
if($bug->task) $taskIdList[$bug->task] = $bug->task;
|
||||
if($bug->toTask) $taskIdList[$bug->toTask] = $bug->toTask;
|
||||
}
|
||||
$storyList = $storyIdList ? $this->loadModel('story')->getByList($storyIdList) : array();
|
||||
$taskList = $taskIdList ? $this->loadModel('task')->getByList($taskIdList) : array();
|
||||
|
||||
$showModule = !empty($this->config->datatable->projectBug->showModule) ? $this->config->datatable->projectBug->showModule : '';
|
||||
|
||||
/* Assign. */
|
||||
|
||||
@@ -1,30 +1,41 @@
|
||||
$(function()
|
||||
{
|
||||
$('#projectForm .checkbox-primary').hide();
|
||||
$('input[name^="involved"]').click(function()
|
||||
{
|
||||
var involved = $(this).is(':checked') ? 1 : 0;
|
||||
$.cookie('involved', involved, {expires:config.cookieLife, path:config.webRoot});
|
||||
$.cookie('involved', involved, {expires: config.cookieLife, path: config.webRoot});
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
$('[id="switchButton"]').click(function()
|
||||
{
|
||||
var projectType = $(this).attr('data-type');
|
||||
$.cookie('projectType', projectType, {expires:config.cookieLife, path:config.webRoot});
|
||||
$.cookie('projectType', projectType, {expires: config.cookieLife, path: config.webRoot});
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
$('input[name^="showEdit"]').click(function()
|
||||
{
|
||||
$('#projectForm .checkbox-primary').hide();
|
||||
var showEdit = $(this).is(':checked') ? 1 : 0;
|
||||
if(showEdit) $('#projectForm .checkbox-primary').show();
|
||||
$.cookie('showProjectBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot});
|
||||
setCheckbox();
|
||||
});
|
||||
setCheckbox();
|
||||
|
||||
if(!useDatatable) resetNameWidth();
|
||||
});
|
||||
|
||||
/**
|
||||
* Set batch edit checkbox.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setCheckbox()
|
||||
{
|
||||
$('#projectForm .checkbox-primary').hide();
|
||||
if($.cookie('showProjectBatchEdit') == 1) $('#projectForm .checkbox-primary').show();
|
||||
}
|
||||
|
||||
function resetNameWidth()
|
||||
{
|
||||
$name = $('#projectForm thead th.c-name');
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<?php if($browseType == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
<?php echo html::a(inlink('browse', "programID=$programID&browseType=$key"), $label, '', "class='btn btn-link $active'");?>
|
||||
<?php endforeach;?>
|
||||
<?php if($canBatchEdit) echo html::checkbox('showEdit', array('1' => $lang->project->edit));?>
|
||||
<?php if($canBatchEdit) echo html::checkbox('showEdit', array('1' => $lang->project->edit), $showBatchEdit);?>
|
||||
<?php if($browseType != 'bysearch') echo html::checkbox('involved', array('1' => $lang->project->mine), '', $this->cookie->involved ? 'checked=checked' : '');?>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->search->common;?></a>
|
||||
</div>
|
||||
|
||||
@@ -81,7 +81,7 @@ class release extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "releaseID=$releaseID")));
|
||||
}
|
||||
|
||||
$builds = $this->loadModel('build')->getBuildPairs($productID, $branch, 'notrunk|withbranch', 0, 'execution', false);
|
||||
$builds = $this->loadModel('build')->getBuildPairs($productID, $branch, 'notrunk|withbranch', 0, 'execution', '', false);
|
||||
$releasedBuilds = $this->release->getReleasedBuilds($productID, $branch);
|
||||
foreach($releasedBuilds as $build) unset($builds[$build]);
|
||||
unset($builds['trunk']);
|
||||
@@ -140,7 +140,7 @@ class release extends control
|
||||
$this->commonAction($release->product, $release->branch);
|
||||
$build = $this->build->getById($release->build);
|
||||
|
||||
$builds = $this->loadModel('build')->getBuildPairs($release->product, $release->branch, 'notrunk|withbranch', 0, 'execution', $release->build, false);
|
||||
$builds = $this->loadModel('build')->getBuildPairs($release->product, $release->branch, 'notrunk|withbranch', $release->project, 'project', $release->build, false);
|
||||
$releasedBuilds = $this->release->getReleasedBuilds($release->product, $release->branch);
|
||||
foreach($releasedBuilds as $releasedBuild)
|
||||
{
|
||||
|
||||
@@ -254,5 +254,5 @@ $config->story->datatable->fieldList['caseCount']['name'] = $lang->story->ca
|
||||
|
||||
$config->story->datatable->fieldList['actions']['title'] = 'actions';
|
||||
$config->story->datatable->fieldList['actions']['fixed'] = 'right';
|
||||
$config->story->datatable->fieldList['actions']['width'] = $app->tab == 'project' ? '220' : '200';
|
||||
$config->story->datatable->fieldList['actions']['width'] = $app->tab == 'project' ? '220' : '210';
|
||||
$config->story->datatable->fieldList['actions']['required'] = 'yes';
|
||||
|
||||
+73
-32
@@ -4193,7 +4193,6 @@ class storyModel extends model
|
||||
if($action == 'close') return $story->status != 'closed';
|
||||
if($action == 'activate') return $story->status == 'closed';
|
||||
if($action == 'assignto') return $story->status != 'closed';
|
||||
if($action == 'createcase') return $story->type != 'requirement';
|
||||
if($action == 'batchcreate' and $story->parent > 0) return false;
|
||||
if($action == 'batchcreate' and $story->type == 'requirement' and $story->status != 'closed') return strpos('draft,reviewing,changing', $story->status) === false;
|
||||
if($action == 'batchcreate' and $config->vision == 'lite' and ($story->status == 'active' and ($story->stage == 'wait' or $story->stage == 'projected'))) return true;
|
||||
@@ -4207,10 +4206,12 @@ class storyModel extends model
|
||||
*
|
||||
* @param object $story
|
||||
* @param string $type
|
||||
* @param object $execution
|
||||
* @param string $storyType story|requirement
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function buildOperateMenu($story, $type = 'view', $execution = '')
|
||||
public function buildOperateMenu($story, $type = 'view', $execution = '', $storyType = 'story')
|
||||
{
|
||||
$menu = '';
|
||||
$params = "storyID=$story->id";
|
||||
@@ -4255,30 +4256,38 @@ class storyModel extends model
|
||||
$isClick = $this->isClickable($story, 'recall');
|
||||
$title = $story->status == 'changing' ? $this->lang->story->recallChange : $this->lang->story->recall;
|
||||
$title = $isClick ? $title : $this->lang->story->recallTip['actived'];
|
||||
$storyPriv = array(common::hasPriv('story', 'change'), common::hasPriv('story', 'submitReview'), common::hasPriv('story', 'review'), common::hasPriv('story', 'close'));
|
||||
$storyPrivCount = array_sum($storyPriv);
|
||||
if($this->app->tab == 'product' and common::hasPriv('story', 'recall') && ($storyPrivCount > 1))
|
||||
$menu .= $this->buildMenu('story', 'recall', $params . "&from=list&confirm=no&storyType=$story->type", $story, $type, 'undo', 'hiddenwin', 'showinonlybody', false, '', $title);
|
||||
$menu .= $this->buildMenu('story', 'edit', $params . "&kanbanGroup=default&storyType=$story->type", $story, $type, '', '', 'showinonlybody');
|
||||
|
||||
$vars = "storyType={$story->type}";
|
||||
$canChange = common::hasPriv('story', 'change', '', $vars);
|
||||
$canRecall = common::hasPriv('story', 'recall', '', $vars);
|
||||
$canSubmitReview = (strpos('draft,changing', $story->status) !== false and common::hasPriv('story', 'submitReview', '', $vars));
|
||||
$canReview = (strpos('draft,changing', $story->status) === false and common::hasPriv('story', 'review', '', $vars));
|
||||
$canEdit = common::hasPriv('story', 'edit', '', $vars);
|
||||
$canBatchCreate = ($this->app->tab == 'product' and (common::hasPriv('story', 'batchCreate', '', 'storyType=story')));
|
||||
$canCreateCase = ($story->type == 'story' and common::hasPriv('testcase', 'create'));
|
||||
$canClose = common::hasPriv('story', 'close', '', $vars);
|
||||
$canUnlinkStory = ($this->app->tab == 'project' and common::hasPriv('projectstory', 'unlinkStory'));
|
||||
|
||||
if(in_array($this->app->tab, array('product', 'project')))
|
||||
{
|
||||
$menu .= "<div class='btn-group dropup' style='margin-left:-5px;'>";
|
||||
$menu .= "<button type='button' class='btn icon-caret-down dropdown-toggle' data-toggle='dropdown' title='{$this->lang->more}' style='width: 16px; padding-left: 0px;'></button>";
|
||||
$menu .= "<ul class='dropdown-menu pull-right text-center' role='menu' style='min-width:auto; padding: 5px;'>";
|
||||
$menu .= $this->buildMenu('story', 'recall', $params . "&from=list&confirm=no&storyType=$story->type", $story, $type, 'undo', 'hiddenwin', 'showinonlybody', false, '', $title);
|
||||
$menu .= "</ul>";
|
||||
$menu .= "</div>";
|
||||
} else {
|
||||
$menu .= $this->buildMenu('story', 'recall', $params . "&from=list&confirm=no&storyType=$story->type", $story, $type, 'undo', 'hiddenwin', 'showinonlybody', false, '', $title);
|
||||
if(($canChange or $canRecall or $canSubmitReview or $canReview or $canEdit) and ($canCreateCase or $canBatchCreate or $canClose or $canUnlinkStory))
|
||||
{
|
||||
$menu .= "<div class='dividing-line'></div>";
|
||||
}
|
||||
}
|
||||
|
||||
$menu .= $this->buildMenu('story', 'close', $params . "&from=&storyType=$story->type", $story, $type, '', '', 'iframe', true);
|
||||
if($this->app->tab == 'product' and (common::hasPriv('story', 'recall') or $storyPrivCount > 0) and (common::hasPriv('story', 'edit') or common::hasPriv('story', 'createCase') or common::hasPriv('story', 'batchCreate')))
|
||||
if($this->app->tab == 'product' and $storyType == 'requirement')
|
||||
{
|
||||
$menu .= "<div class='dividing-line'></div>";
|
||||
$menu .= $this->buildMenu('story', 'close', $params . "&from=&storyType=$story->type", $story, $type, '', '', 'iframe', true);
|
||||
if($canClose and ($canBatchCreate or $canCreateCase)) $menu .= "<div class='dividing-line'></div>";
|
||||
}
|
||||
|
||||
$menu .= $this->buildMenu('story', 'edit', $params . "&kanbanGroup=default&storyType=$story->type", $story, $type, '', '', 'showinonlybody');
|
||||
if($storyType == 'requirement') $menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params&executionID=0&plan=0&storyType=story", $story, $type, 'split', '', 'showinonlybody', '', '', $title);
|
||||
|
||||
$tab = $this->app->tab == 'project' ? 'project' : 'qa';
|
||||
if($story->type != 'requirement' and $this->config->vision != 'lite') $menu .= $this->buildMenu('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$params", $story, $type, 'sitemap', '', 'showinonlybody', false, "data-app='$tab'");
|
||||
if($story->type != 'requirement' and $this->config->vision != 'lite') $menu .= $this->buildMenu('testcase', 'create', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$params", $story, $type, 'sitemap', '', 'showinonlybody', false, "data-app='$tab'");
|
||||
|
||||
if($this->app->rawModule != 'projectstory' OR $this->config->vision == 'lite')
|
||||
{
|
||||
@@ -4296,9 +4305,24 @@ class storyModel extends model
|
||||
if($story->status == 'active' and $story->stage != 'wait') $title = sprintf($this->lang->story->subDivideTip['notWait'], zget($this->lang->story->stageList, $story->stage));
|
||||
}
|
||||
}
|
||||
$menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params&executionID=0&plan=0&storyType=story", $story, $type, 'split', '', 'showinonlybody', '', '', $title);
|
||||
|
||||
if($storyType == 'story') $menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params&executionID=0&plan=0&storyType=story", $story, $type, 'split', '', 'showinonlybody', '', '', $title);
|
||||
}
|
||||
|
||||
if($this->app->rawModule == 'projectstory' and $this->config->vision != 'lite')
|
||||
{
|
||||
if($canCreateCase and ($canClose or $canUnlinkStory)) $menu .= "<div class='dividing-line'></div>";
|
||||
|
||||
$menu .= $this->buildMenu('story', 'close', $params . "&from=&storyType=$story->type", $story, $type, '', '', 'iframe', true);
|
||||
$menu .= $this->buildMenu('projectstory', 'unlinkStory', "projectID={$this->session->project}&$params", $story, $type, 'unlink', 'hiddenwin', 'showinonlybody');
|
||||
}
|
||||
|
||||
if($this->app->tab == 'product' and $storyType == 'story')
|
||||
{
|
||||
if(($canBatchCreate or $canCreateCase) and $canClose) $menu .= "<div class='dividing-line'></div>";
|
||||
|
||||
$menu .= $this->buildMenu('story', 'close', $params . "&from=&storyType=$story->type", $story, $type, '', '', 'iframe', true);
|
||||
}
|
||||
if($this->app->rawModule == 'projectstory' and $this->config->vision != 'lite') $menu .= $this->buildMenu('projectstory', 'unlinkStory', "projectID={$this->session->project}&$params", $story, $type, 'unlink', 'hiddenwin', 'showinonlybody');
|
||||
|
||||
}
|
||||
else
|
||||
@@ -4374,13 +4398,22 @@ class storyModel extends model
|
||||
$story->reviewer = isset($story->reviewer) ? $story->reviewer : array();
|
||||
$story->notReview = isset($story->notReview) ? $story->notReview : array();
|
||||
|
||||
$canSubmitReview = (strpos('draft,changing', $story->status) !== false and common::hasPriv('story', 'submitReview'));
|
||||
$canReview = (strpos('draft,changing', $story->status) === false and common::hasPriv('story', 'review'));
|
||||
$canRecall = common::hasPriv('story', 'recall');
|
||||
$canCreateTask = common::hasPriv('task', 'create');
|
||||
$canBatchCreateTask = common::hasPriv('task', 'batchCreate');
|
||||
$canCreateCase = ($hasDBPriv and common::hasPriv('testcase', 'create'));
|
||||
$canEstimate = common::hasPriv('execution', 'storyEstimate', $execution);
|
||||
$canUnlinkStory = common::hasPriv('execution', 'unlinkStory', $execution);
|
||||
|
||||
if(strpos('draft,changing', $story->status) !== false)
|
||||
{
|
||||
if(common::hasPriv('story', 'submitReview')) $menu .= common::printIcon('story', 'submitReview', "storyID=$story->id&from=story", $story, 'list', 'confirm', '', 'iframe', true, "data-width='50%'");
|
||||
if($canSubmitReview) $menu .= common::printIcon('story', 'submitReview', "storyID=$story->id&from=story", $story, 'list', 'confirm', '', 'iframe', true, "data-width='50%'");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(common::hasPriv('story', 'review'))
|
||||
if($canReview)
|
||||
{
|
||||
$reviewDisabled = in_array($this->app->user->account, $story->notReview) and ($story->status == 'draft' or $story->status == 'changing') ? '' : 'disabled';
|
||||
$story->from = 'execution';
|
||||
@@ -4388,7 +4421,7 @@ class storyModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if(common::hasPriv('story', 'recall'))
|
||||
if($canRecall)
|
||||
{
|
||||
$recallDisabled = empty($story->reviewedBy) and strpos('draft,changing', $story->status) !== false and !empty($story->reviewer) ? '' : 'disabled';
|
||||
$title = $story->status == 'changing' ? $this->lang->story->recallChange : $this->lang->story->recall;
|
||||
@@ -4410,21 +4443,29 @@ class storyModel extends model
|
||||
$this->lang->task->batchCreate = $this->lang->execution->batchWBS;
|
||||
if($hasDBPriv) $menu .= common::printIcon('task', 'batchCreate', "executionID=$executionID&story={$story->id}", '', 'list', 'pluses', '', $toTaskDisabled);
|
||||
|
||||
if(($canSubmitReview or $canReview or $canRecall or $canCreateTask or $canBatchCreateTask) and ($canCreateCase or $canEstimate or $canUnlinkStory))
|
||||
{
|
||||
$menu .= "<div class='dividing-line'></div>";
|
||||
}
|
||||
|
||||
if($canEstimate)
|
||||
{
|
||||
$menu .= common::buildIconButton('execution', 'storyEstimate', "executionID=$executionID&storyID=$story->id", '', 'list', 'estimate', '', 'iframe', true, "data-width='470px'");
|
||||
}
|
||||
|
||||
$this->lang->testcase->batchCreate = $this->lang->testcase->create;
|
||||
if($hasDBPriv and common::hasPriv('testcase', 'create'))
|
||||
if($canCreateCase)
|
||||
{
|
||||
$menu .= html::a(helper::createLink('testcase', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&form=¶m=0&storyID=$story->id"), '<i class="icon-testcase-create icon-sitemap"></i>', '', "class='btn' title='{$this->lang->testcase->create}' data-app='qa'");
|
||||
$menu .= common::buildIconButton('testcase', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&form=¶m=0&storyID=$story->id", '', 'list', 'sitemap', '', '', '', "data-app='qa'");
|
||||
}
|
||||
|
||||
if($canBeChanged and common::hasPriv('execution', 'storyEstimate', $execution))
|
||||
if(($canEstimate or $canCreateCase) and $canUnlinkStory) $menu .= "<div class='dividing-line'></div>";
|
||||
|
||||
if($canUnlinkStory)
|
||||
{
|
||||
$menu .= common::printIcon('execution', 'storyEstimate', "executionID=$executionID&storyID=$story->id", '', 'list', 'estimate', '', 'iframe', true, "data-width='470px'");
|
||||
$menu .= common::buildIconButton('execution', 'unlinkStory', "executionID=$executionID&storyID=$story->id&confirm=no", '', 'list', 'unlink', 'hiddenwin');
|
||||
}
|
||||
|
||||
if($canBeChanged and common::hasPriv('execution', 'unlinkStory', $execution))
|
||||
{
|
||||
$menu .= common::printIcon('execution', 'unlinkStory', "executionID=$executionID&storyID=$story->id&confirm=no", '', 'list', 'unlink', 'hiddenwin');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4889,7 +4930,7 @@ class storyModel extends model
|
||||
$menuType = 'browse';
|
||||
$execution = '';
|
||||
}
|
||||
echo $this->buildOperateMenu($story, $menuType, $execution);
|
||||
echo $this->buildOperateMenu($story, $menuType, $execution, $storyType);
|
||||
break;
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
common::printIcon('story', 'close', "storyID=$child->id&from=&storyType=$child->type", $child, 'list', '', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('story', 'activate', "storyID=$child->id&storyType=$child->type", $child, 'list', '', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('story', 'edit', "storyID=$child->id&kanbanGroup=default&storyType=$child->type", $child, 'list');
|
||||
common::printIcon('story', 'createCase', "productID=$child->product&branch=$child->branch&module=0&from=¶m=0&story={$child->id}", $child, 'list', 'sitemap');
|
||||
common::printIcon('testcase', 'create', "productID=$child->product&branch=$child->branch&module=0&from=¶m=0&story={$child->id}", $child, 'list', 'sitemap');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
+21
-1
@@ -611,6 +611,26 @@ class task extends control
|
||||
if(!isset($this->view->members[$this->view->task->assignedTo])) $this->view->members[$this->view->task->assignedTo] = $this->view->task->assignedTo;
|
||||
if(isset($this->view->members['closed']) or $this->view->task->status == 'closed') $this->view->members['closed'] = 'Closed';
|
||||
|
||||
$executions = array();
|
||||
if(!empty($task->project))
|
||||
{
|
||||
$executionList = $this->execution->getPairs($task->project);
|
||||
$project = $this->loadModel('project')->getByID($task->project);
|
||||
|
||||
if(isset($project->model) and $project->model == 'waterfall')
|
||||
{
|
||||
foreach($executionList as $key=>$val)
|
||||
{
|
||||
$values = $project->name . '/' . $val;
|
||||
$executions[$key] = $values;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$executions = $executionList;
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->task->edit . 'TASK' . $this->lang->colon . $this->view->task->name;
|
||||
$this->view->position[] = $this->lang->task->common;
|
||||
$this->view->position[] = $this->lang->task->edit;
|
||||
@@ -619,7 +639,7 @@ class task extends control
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed', "{$this->view->task->openedBy},{$this->view->task->canceledBy},{$this->view->task->closedBy}");
|
||||
$this->view->showAllModule = isset($this->config->execution->task->allModule) ? $this->config->execution->task->allModule : '';
|
||||
$this->view->modules = $this->tree->getTaskOptionMenu($this->view->task->execution, 0, 0, $this->view->showAllModule ? 'allModule' : '');
|
||||
$this->view->executions = $this->config->systemMode == 'classic' ? $this->execution->getPairs() : $this->execution->getByProject($task->project, 'noclosed', 0, true, false, $task->execution);
|
||||
$this->view->executions = $this->config->systemMode == 'classic' ? $this->execution->getPairs() : $executions;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
.nav > li.divider {margin: 0 10px 0 5px; background-color: #000; opacity: 0.06; width: 1px ; height: 15px; padding: 0 !important;}
|
||||
.table-bordered td, .table-bordered th { border: 1px solid #EEEEEE; }
|
||||
.table-recorded thead { background: #F5F6F8}
|
||||
.table>thead>tr>th{ border-bottom: 1px solid #EEEEEE}
|
||||
.table>thead>tr>th{border-bottom: 1px solid #EEEEEE; font-weight: 400;}
|
||||
#linearefforts .nav li.active a{color: #0c64eb !important}
|
||||
.input-group-addon {background: #fff}
|
||||
.icon-calendar {color: rgb(22, 168, 248)}
|
||||
#recordForm .table>thead>tr>th{ border: none}
|
||||
#recordForm .table > thead > tr > th {border: none; font-weight: 400;}
|
||||
.main-header {border-bottom: none !important}
|
||||
.main-header ul.hours:before{content:"("}
|
||||
.main-header ul.hours:after{content:")"}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php if(!isonlybody()):?>
|
||||
<?php echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary' data-app={$this->app->tab}");?>
|
||||
<?php echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary'");?>
|
||||
<div class="divider"></div>
|
||||
<?php endif;?>
|
||||
<div class="page-title">
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -122,3 +122,12 @@ body.xxc-embed.m-productplan-view,body.xxc-embed.m-bug-browse,body.xxc-embed.m-p
|
||||
#mainMenu > .btn-toolbar .btn-link .label-light {color: #203362; background: #fff;}
|
||||
#mainMenu > .btn-toolBar .btn-active-text,
|
||||
#mainMenu > .btn-toolbar .btn-active-text {background: #E6EAF1;} */
|
||||
|
||||
#programTableList > tr:hover {background: #E6F0FF; opacity: 0.8;}
|
||||
#programTableList > tr[data-type="project"] > .c-name:hover > a {color: #1E6AEB !important;}
|
||||
#programTableList > tr[data-type="project"] > .c-name > a {color: #2463c7 !important;}
|
||||
#mainMenu > div.btn-toolbar.pull-right > a.btn.btn-link.iframe {color: #18A6FD;}
|
||||
|
||||
#projectForm .c-name .label-danger,
|
||||
#executionTableList .c-name .label-danger,
|
||||
#programTableList .c-name .label-danger {position: absolute; right: 10px; padding: 2px 4px;}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -26,7 +26,7 @@ $(function()
|
||||
const mainHeader = document.getElementById('mainHeader');
|
||||
if(!mainHeader) return;
|
||||
const style = window.getComputedStyle(mainHeader, null);
|
||||
const color = window.getComputedStyle(document.querySelector('#navbar .nav>li:not(.active)>a'), null).color;
|
||||
const color = window.getComputedStyle(document.querySelector('#navbar .nav>li:not(.active)>a, #userMenu .nav>li:not(.active)>a'), null).color;
|
||||
const clientHeaderStyle = {windowControlBtnColor: color, background: style.background, color: color};
|
||||
window.parent.appHeaderStyleUpdated = true;
|
||||
window.open('xxc://setAppHeaderStyle/zentao-integrated/' + encodeURIComponent(JSON.stringify(clientHeaderStyle)), '_blank');
|
||||
|
||||
@@ -150,7 +150,7 @@ class xuanxuanMessage extends messageModel
|
||||
|
||||
$content = json_encode($contentData);
|
||||
$avatarUrl = $server . $this->app->getWebRoot() . 'favicon.ico';
|
||||
if($target) $this->loadModel('im')->messageCreateNotify($target, $title, $subtitle = '', $content, $contentType = 'object', $url, $actions = array(), $sender = array('id' => 'zentao', 'realname' => $this->lang->message->sender, 'name' => $this->lang->message->sender, 'avatar' => $avatarUrl));
|
||||
if($target && ($objectType == 'bug' || $objectType == 'task' || $objectType == 'story')) $this->loadModel('im')->messageCreateNotify($target, $title, $subtitle = '', $content, $contentType = 'object', $url, $actions = array(), $sender = array('id' => 'zentao', 'realname' => $this->lang->message->sender, 'name' => $this->lang->message->sender, 'avatar' => $avatarUrl));
|
||||
|
||||
if($objectType == 'mr' and is_array($this->lang->message->mr->$actionType) and !empty($object->assignee))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user