Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/244_wangzemei_71075

This commit is contained in:
曹延义
2022-09-29 09:18:42 +08:00
75 changed files with 810 additions and 362 deletions
+1 -1
View File
@@ -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
View File
@@ -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';
+7
View File
@@ -34,6 +34,13 @@
35025 需求导入模板增加由谁评审字段
旗舰版:
35042 旗舰版周报3个工作项列表能显示总数
修复的Bug
27875 工时记录页面日期控件展开后显示遮挡
27778 创建项目和编辑项目的所属项目集字段显示不一致
27690 创建项目页面提示信息窗口建议向右展开
27632 复制bug时希望可以同步反馈者和通知邮箱两个字段的信息
27561 提需求页面所属产品右侧边框线缺失
27547 编辑项目集预算,点击保存,提示有未提交表单
2022-09-08 17.6.1
完成的需求
+24 -4
View File
@@ -35,8 +35,15 @@
</div>
<?php else:?>
<form id='myTaskForm' class="main-table table-task skip-iframe-modal" method="post">
<?php $canBatchEdit = (common::hasPriv('task', 'batchEdit') and $type == 'assignedTo');?>
<?php $canBatchClose = (common::hasPriv('task', 'batchClose') and $type != 'closedBy');?>
<?php
$canBatchEdit = (common::hasPriv('task', 'batchEdit') and $type == 'assignedTo');
$canBatchClose = (common::hasPriv('task', 'batchClose') and $type != 'closedBy');
$canFinish = common::hasPriv('task', 'finish');
$canClose = common::hasPriv('task', 'close');
$canRecordEstimate = common::hasPriv('task', 'recordEstimate');
$canEdit = common::hasPriv('task', 'edit');
$canBatchCreate = common::hasPriv('task', 'batchCreate');
?>
<table class="table has-sort-head table-fixed" id='taskTable'>
<?php $vars = "mode=$mode&type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
@@ -134,10 +141,16 @@
}
else
{
$canStart = ($task->status != 'pause' and common::hasPriv('task', 'start'));
$canRestart = ($task->status == 'pause' and common::hasPriv('task', 'restart'));
if($task->status != 'pause') common::printIcon('task', 'start', "taskID=$task->id", $task, 'list', '', '', 'iframe', true, '', '', $task->project);
if($task->status == 'pause') common::printIcon('task', 'restart', "taskID=$task->id", $task, 'list', '', '', 'iframe', true, '', '', $task->project);
common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'iframe', true, '', '', $task->project);
common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'iframe', true, '', '', $task->project);
common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'iframe', true, '', '', $task->project);
if(($canStart or $canRestart or $canFinish or $canClose) and ($canRecordEstimate or $canEdit or $canBatchCreate))
{
echo "<div class='dividing-line'></div>";
}
common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', 'time', '', 'iframe', true, '', '', $task->project);
common::printIcon('task', 'edit', "taskID=$task->id", $task, 'list', '', '', 'iframe', true, "data-width='95%'", '', $task->project);
@@ -198,10 +211,17 @@
}
else
{
$canStart = ($child->status != 'pause' and common::hasPriv('task', 'start'));
$canRestart = ($child->status == 'pause' and common::hasPriv('task', 'restart'));
if($child->status != 'pause') common::printIcon('task', 'start', "taskID=$child->id", $child, 'list', '', '', 'iframe', true, '', '', $child->project);
if($child->status == 'pause') common::printIcon('task', 'restart', "taskID=$child->id", $child, 'list', '', '', 'iframe', true, '', '', $child->project);
common::printIcon('task', 'close', "taskID=$child->id", $child, 'list', '', '', 'iframe', true, '', '', $child->project);
common::printIcon('task', 'finish', "taskID=$child->id", $child, 'list', '', '', 'iframe', true, '', '', $child->project);
common::printIcon('task', 'close', "taskID=$child->id", $child, 'list', '', '', 'iframe', true, '', '', $child->project);
if(($canStart or $canRestart or $canFinish or $canClose) and ($canRecordEstimate or $canEdit or $canBatchCreate))
{
echo "<div class='dividing-line'></div>";
}
common::printIcon('task', 'recordEstimate', "taskID=$child->id", $child, 'list', 'time', '', 'iframe', true, '', '', $child->project);
common::printIcon('task', 'edit', "taskID=$child->id", $child, 'list', '', '', '', '', '', '', $child->project);
@@ -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);?>
+7 -3
View File
@@ -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();
+2 -2
View File
@@ -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">
+3 -2
View File
@@ -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)
+1 -1
View File
@@ -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))
{
+1 -1
View File
@@ -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);
}
+1
View File
@@ -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;}
+1
View File
@@ -11,3 +11,4 @@ td.delayed {background: #e84e0f !important; color: white;}
#taskList .c-progress{padding-right: 8px; text-align: right;}
#datatable-taskList .c-progress{padding-right: 8px; text-align: right;}
.c-finishedBy, .c-lastEditedBy {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
#executionTaskForm 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;}
+2 -2
View File
@@ -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;
+1
View File
@@ -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;}
+1 -1
View File
@@ -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
View File
@@ -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;
@@ -2432,72 +2435,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);
}
}
+12 -11
View File
@@ -809,17 +809,18 @@ EOF;
}
$PMList = $this->user->getListByAccounts($accounts, 'account');
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->project;
$this->view->position[] = $this->lang->my->project;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->projects = $projects;
$this->view->PMList = $PMList;
$this->view->pager = $pager;
$this->view->status = $status;
$this->view->recTotal = $recTotal;
$this->view->recPerPage = $recPerPage;
$this->view->pageID = $pageID;
$this->view->orderBy = $orderBy;
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->project;
$this->view->position[] = $this->lang->my->project;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->projects = $projects;
$this->view->PMList = $PMList;
$this->view->pager = $pager;
$this->view->status = $status;
$this->view->recTotal = $recTotal;
$this->view->recPerPage = $recPerPage;
$this->view->pageID = $pageID;
$this->view->orderBy = $orderBy;
$this->view->usersAvatar = $this->user->getAvatarPairs('');
$this->display();
}
+1
View File
@@ -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;}
+1
View File
@@ -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;}
+1
View File
@@ -36,3 +36,4 @@ html[lang="en"] .c-user-short {width: 88px;}
[lang^=fr] #taskTable .assigned-title {width: 130px !important;}
[lang^=fr] #taskTable .c-user-short {width: 75px;}
[lang^=fr] #taskTable .c-status {width: 71px;}
#myTaskForm 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;}
+8 -9
View File
@@ -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>
@@ -65,9 +60,13 @@
<td class='text-left'><?php echo $project->end == LONG_TIME ? $this->lang->project->longTime : $project->end;?></td>
<?php $projectBudget = in_array($this->app->getClientLang(), array('zh-cn','zh-tw')) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);?>
<td class='text-right c-budget'><?php echo $project->budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $lang->project->future;?></td>
<td>
<?php $userID = isset($PMList[$project->PM]) ? $PMList[$project->PM]->id : ''?>
<?php if(!empty($project->PM)) echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), zget($users, $project->PM), '', "data-toggle='modal' data-type='iframe' data-width='600'");?>
<td class='c-manager'>
<?php if(!empty($project->PM)):?>
<?php $userName = zget($users, $project->PM);?>
<?php echo html::smallAvatar(array('avatar' => $usersAvatar[$project->PM], 'account' => $project->PM, 'name' => $userName), "avatar-circle avatar-top avatar-{$project->PM}"); ?>
<?php $userID = isset($PMList[$project->PM]) ? $PMList[$project->PM]->id : '';?>
<?php echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), $userName, '', "title='{$userName}' data-toggle='modal' data-type='iframe' data-width='600'");?>
<?php endif;?>
</td>
<td class='c-actions'>
<?php if($project->status == 'wait' || $project->status == 'suspended') common::printIcon('project', 'start', "projectID=$project->id", $project, 'list', 'play', '', 'iframe', true);?>
+26 -2
View File
@@ -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);
}
}
?>
+33 -4
View File
@@ -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=&param=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=&param=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=&param=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=&param=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>
+26 -5
View File
@@ -44,8 +44,15 @@
</div>
<?php else:?>
<form id='myTaskForm' class="main-table table-task skip-iframe-modal" method="post">
<?php $canBatchEdit = (common::hasPriv('task', 'batchEdit') and $type == 'assignedTo');?>
<?php $canBatchClose = (common::hasPriv('task', 'batchClose') and $type != 'closedBy');?>
<?php
$canBatchEdit = (common::hasPriv('task', 'batchEdit') and $type == 'assignedTo');
$canBatchClose = (common::hasPriv('task', 'batchClose') and $type != 'closedBy');
$canFinish = common::hasPriv('task', 'finish');
$canClose = common::hasPriv('task', 'close');
$canRecordEstimate = common::hasPriv('task', 'recordEstimate');
$canEdit = common::hasPriv('task', 'edit');
$canBatchCreate = common::hasPriv('task', 'batchCreate');
?>
<div class="table-responsive">
<table class="table has-sort-head table-fixed" id='taskTable'>
<?php $vars = "mode=$mode&type=$type&param=myQueryID&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
@@ -151,11 +158,18 @@
}
else
{
$attr = isset($kanbanList[$task->execution]) ? "disabled" : '';
$attr = isset($kanbanList[$task->execution]) ? "disabled" : '';
$canStart = ($task->status != 'pause' and common::hasPriv('task', 'start'));
$canRestart = ($task->status == 'pause' and common::hasPriv('task', 'restart'));
if($task->status != 'pause') common::printIcon('task', 'start', "taskID=$task->id", $task, 'list', '', '', 'iframe', true);
if($task->status == 'pause') common::printIcon('task', 'restart', "taskID=$task->id", $task, 'list', '', '', 'iframe', true);
common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'iframe', true);
common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'iframe', true);
common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'iframe', true);
if(($canStart or $canRestart or $canFinish or $canClose) and ($canRecordEstimate or $canEdit or $canBatchCreate))
{
echo "<div class='dividing-line'></div>";
}
common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', 'time', '', 'iframe', true);
common::printIcon('task', 'edit', "taskID=$task->id", $task, 'list', '', '', 'iframe', true, "data-width='95%'");
@@ -221,10 +235,17 @@
}
else
{
$canStart = ($child->status != 'pause' and common::hasPriv('task', 'start'));
$canRestart = ($child->status == 'pause' and common::hasPriv('task', 'restart'));
if($child->status != 'pause') common::printIcon('task', 'start', "taskID=$child->id", $child, 'list', '', '', 'iframe', true);
if($child->status == 'pause') common::printIcon('task', 'restart', "taskID=$child->id", $child, 'list', '', '', 'iframe', true);
common::printIcon('task', 'close', "taskID=$child->id", $child, 'list', '', '', 'iframe', true);
common::printIcon('task', 'finish', "taskID=$child->id", $child, 'list', '', '', 'iframe', true);
common::printIcon('task', 'close', "taskID=$child->id", $child, 'list', '', '', 'iframe', true);
if(($canStart or $canRestart or $canFinish or $canClose) and ($canRecordEstimate or $canEdit or $canBatchCreate))
{
echo "<div class='dividing-line'></div>";
}
common::printIcon('task', 'recordEstimate', "taskID=$child->id", $child, 'list', 'time', '', 'iframe', true);
common::printIcon('task', 'edit', "taskID=$child->id", $child, 'list', '', '', 'iframe', true, "data-width='95%'");
+4
View File
@@ -1286,9 +1286,13 @@ class product extends control
$this->view->productStructure = $productStructure;
$this->view->productLines = $productLines;
$this->view->programLines = $programLines;
$this->view->users = $this->user->getPairs('noletter');
$this->view->userIdPairs = $this->user->getPairs('noletter|showid');
$this->view->usersAvatar = $this->user->getAvatarPairs('');
$this->view->orderBy = $orderBy;
$this->view->browseType = $browseType;
$this->view->pager = $pager;
$this->view->showBatchEdit = $this->cookie->showProductBatchEdit;
$this->display();
}
+5 -3
View File
@@ -38,15 +38,14 @@
#sidebar>.cell {width: 100%;}
th.c-name {width: 400px;}
th.c-requirement {width: 290px;}
th.c-PO {width: 100px;}
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,8 +85,11 @@ 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;}
.table-footer.fixed-footer .statistic {color: #fff;}
#productTableList .c-manager {padding-left: 14px;}
#productTableList .c-manager a {top: 7px; left: 22px;}
.checkbox-primary {margin-right: 10px;}
+20 -5
View File
@@ -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)
{
+2 -2
View File
@@ -37,8 +37,8 @@ $lang->product->addWhitelist = 'Add Whitelist';
$lang->product->unbindWhitelist = 'Remove Whitelist';
$lang->product->track = 'View Stories Matrix';
$lang->product->checkedProducts = '%s products selected';
$lang->product->pageProducts = 'Total products: %s.';
$lang->product->pageLines = 'Total product lines: %s, Total products: %s.';
$lang->product->pageSummary = 'Total products: %s.';
$lang->product->lineSummary = 'Total product lines: %s, Total products: %s.';
$lang->product->indexAction = "All {$lang->productCommon}";
$lang->product->closeAction = "Close {$lang->productCommon}";
+2 -2
View File
@@ -37,8 +37,8 @@ $lang->product->addWhitelist = 'Add Whitelist';
$lang->product->unbindWhitelist = 'Unbind Whitelist';
$lang->product->track = 'View Stories Matrix';
$lang->product->checkedProducts = '%s products selected';
$lang->product->pageProducts = 'Total products: %s.';
$lang->product->pageLines = 'Total product lines: %s, Total products: %s.';
$lang->product->pageSummary = 'Total products: %s.';
$lang->product->lineSummary = 'Total product lines: %s, Total products: %s.';
$lang->product->indexAction = "All {$lang->productCommon}";
$lang->product->closeAction = "Close {$lang->productCommon}";
+2 -2
View File
@@ -37,8 +37,8 @@ $lang->product->addWhitelist = 'Add Whitelist';
$lang->product->unbindWhitelist = 'Remove Whitelist';
$lang->product->track = 'Consulter Stories Matrice';
$lang->product->checkedProducts = '%s produits s électionnés';
$lang->product->pageProducts = 'Total products: %s.';
$lang->product->pageLines = 'Total product lines: %s, Total products: %s.';
$lang->product->pageSummary = 'Total products: %s.';
$lang->product->lineSummary = 'Total product lines: %s, Total products: %s.';
$lang->product->indexAction = "All {$lang->productCommon}";
$lang->product->closeAction = "Fermer {$lang->productCommon}";
+2 -2
View File
@@ -37,8 +37,8 @@ $lang->product->addWhitelist = '添加白名单';
$lang->product->unbindWhitelist = '移除白名单';
$lang->product->track = "查看需求矩阵";
$lang->product->checkedProducts = '已选择%s项产品';
$lang->product->pageProducts = '本页共%s个产品。';
$lang->product->pageLines = '本页共%s个产品线,%s个产品。';
$lang->product->pageSummary = '本页共%s个产品。';
$lang->product->lineSummary = '本页共%s个产品线,%s个产品。';
$lang->product->indexAction = "所有{$lang->productCommon}仪表盘";
$lang->product->closeAction = "关闭{$lang->productCommon}";
+8 -3
View File
@@ -1817,11 +1817,15 @@ class productModel extends model
{
$programKeys = array(0 => 0);
foreach($products as $product) $programKeys[] = $product->program;
$programs = $this->dao->select('id,name')->from(TABLE_PROGRAM)
$programs = $this->dao->select('id,name,PM')->from(TABLE_PROGRAM)
->where('id')->in(array_unique($programKeys))
->fetchPairs();
->fetchAll('id');
foreach($products as $product) $product->programName = isset($programs[$product->program]) ? $programs[$product->program] : '';
foreach($products as $product)
{
$product->programName = isset($programs[$product->program]) ? $programs[$product->program]->name : '';
$product->programPM = isset($programs[$product->program]) ? $programs[$product->program]->PM : '';
}
}
$stats = array();
@@ -2045,6 +2049,7 @@ class productModel extends model
/* Init vars. */
/* Program name. */
$productStructure[$product->program]['programName'] = $product->programName;
$productStructure[$product->program]['programPM'] = $product->programPM;
$productStructure[$product->program] = $this->statisticData('program', $productStructure, $product);
}
}
+35 -43
View File
@@ -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,11 @@
<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-PO' rowspan="2">
<?php common::printOrderLink('PO', $orderBy, $vars, $lang->product->manager);?>
</th>
<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 +66,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 +106,25 @@
<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 class='c-manager'>
<?php
if(!empty($program['programPM']))
{
$programPM = $program['programPM'];
$userName = zget($users, $programPM);
echo html::smallAvatar(array('avatar' => $usersAvatar[$programPM], 'account' => $programPM, 'name' => $userName), 'avatar-circle avatar-top avatar-' . zget($userIdPairs, $programPM));
$userID = isset($userIdPairs[$programPM]) ? $userIdPairs[$programPM] : '';
echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), $userName, '', "title='{$userName}' data-toggle='modal' data-type='iframe' data-width='600'");
}
?>
</td>
<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 +158,13 @@
<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></td>
<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>
@@ -187,8 +177,7 @@
<?php if(isset($line['products']) and is_array($line['products'])):?>
<?php foreach($line['products'] as $productID => $product):?>
<?php
$totalStories = $product->stories['active'] + $product->stories['closed'] + $product->stories['draft'] + $product->stories['changing'] + $product->stories['reviewing'];
$totalRequirements = $product->requirements['active'] + $product->requirements['closed'] + $product->requirements['draft'] + $product->requirements['changing'] + $product->requirements['reviewing'];
$totalStories = $product->stories['active'] + $product->stories['closed'] + $product->stories['draft'] + $product->stories['changing'] + $product->stories['reviewing'];
$trClass = '';
if($product->line)
@@ -218,24 +207,27 @@
<?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>
<td class='c-manager'>
<?php
if(!empty($product->PO))
{
$userName = zget($users, $product->PO);
echo html::smallAvatar(array('avatar' => $usersAvatar[$product->PO], 'account' => $product->PO, 'name' => $userName), 'avatar-circle avatar-' . zget($userIdPairs, $product->PO));
$userID = isset($userIdPairs[$product->PO]) ? $userIdPairs[$product->PO] : '';
echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), $userName, '', "title='{$userName}' data-toggle='modal' data-type='iframe' data-width='600'");
}
?>
</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>
@@ -253,8 +245,8 @@
<?php if(!empty($product) and $canBatchEdit):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<?php
$content = empty($productLines) ? sprintf($lang->product->pageProducts, count($productStats)) : sprintf($lang->product->pageLines, count($lineNames), count($productStats));
echo "<div id='productsCount' class='statistic'>$content</div>";
$summary = empty($productLines) ? sprintf($lang->product->pageSummary, count($productStats)) : sprintf($lang->product->lineSummary, count($lineNames), count($productStats));
echo "<div id='productsCount' class='statistic'>$summary</div>";
?>
<div class="table-actions btn-toolbar">
<?php
+3 -3
View File
@@ -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)):?>
+12 -8
View File
@@ -49,11 +49,13 @@
<?php else:?>
<th><?php echo $lang->execution->name;?></th>
<?php endif;?>
<?php if(strpos('all,undone', $status) !== false):?>
<th class='c-status'><?php echo $lang->project->status;?></th>
<?php endif;?>
<th class='c-user text-left'><?php echo $lang->project->PM;?></th>
<th class="c-budget text-center"><?php echo $lang->project->budget;?></th>
<th class='c-date'><?php echo $lang->project->begin;?></th>
<th class='c-date'><?php echo $lang->project->end;?></th>
<th class='c-status'><?php echo $lang->project->status;?></th>
<th class="c-budget text-center"><?php echo $lang->project->budget;?></th>
<th class="c-number text-right"><?php echo $lang->project->estimate;?></th>
<th class="c-number text-right"><?php echo $lang->project->consume;?></th>
<th class="c-progress"><?php echo $lang->project->progress;?></th>
@@ -79,20 +81,22 @@
}
?>
</td>
<?php if(strpos('all,undone', $status) !== false):?>
<?php $statusTitle = $this->processStatus('project', $project);?>
<td class='c-status' title='<?php echo $statusTitle;?>'>
<span class="status-project status-<?php echo $project->status?>"><?php echo $statusTitle;?></span>
</td>
<?php endif;?>
<td class='padding-right'>
<?php $userID = isset($PMList[$project->PM]) ? $PMList[$project->PM]->id : ''?>
<?php if(!empty($project->PM)) echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), zget($users, $project->PM), '', "data-toggle='modal' data-type='iframe' data-width='800'");?>
</td>
<td class='padding-right text-left'><?php echo $project->begin;?></td>
<td class='padding-right text-left'><?php echo $project->end;?></td>
<?php $status = $this->processStatus('project', $project);?>
<td class='c-status' title='<?php echo $status;?>'>
<span class="status-project status-<?php echo $project->status?>"><?php echo $status;?></span>
</td>
<?php $projectBudget = in_array($this->app->getClientLang(), array('zh-cn','zh-tw')) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);?>
<?php $budgetTitle = $project->budget != 0 ? zget($this->lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $this->lang->project->future;?>
<?php $textStyle = $project->budget != 0 ? 'text-right' : 'text-center';?>
<td title='<?php echo $budgetTitle;?>' class="text-ellipsis <?php echo $textStyle;?>"><?php echo $budgetTitle;?></td>
<td class='padding-right text-left'><?php echo $project->begin;?></td>
<td class='padding-right text-left'><?php echo $project->end;?></td>
<td class="text-right" title="<?php echo $project->hours->totalEstimate . ' ' . $lang->execution->workHour;?>"><?php echo $project->hours->totalEstimate . $lang->execution->workHourUnit;?></td>
<td class="text-right" title="<?php echo $project->hours->totalConsumed . ' ' . $lang->execution->workHour;?>"><?php echo $project->hours->totalConsumed . $lang->execution->workHourUnit;?></td>
<td>
+4
View File
@@ -35,3 +35,7 @@ td.c-branch {overflow: hidden; text-align: left !important; text-overflow: ellip
.panel-actions {position: relative; padding: 0 0; padding-top: 1px;}
.icon-list {padding-left: 7px;}
.icon-kanban {padding-left: 7px; font-size: 16px;}
#productplanList .c-actions {width: 265px;}
#productplanList .c-actions .btn+.btn {margin-left: -1px;}
#productplanList .c-actions .btn {display: block; float: left;}
#productplanList td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 6px 4px 0 0; float: left;}
+20
View File
@@ -1130,6 +1130,16 @@ class productplanModel extends model
{
$params = "planID=$plan->id";
$canStart = common::hasPriv('productplan', 'start');
$canFinish = common::hasPriv('productplan', 'finish');
$canClose = common::hasPriv('productplan', 'close');
$canCreateExec = common::hasPriv('execution', 'create');
$canLinkStory = common::hasPriv('productplan', 'linkStory');
$canLinkBug = common::hasPriv('productplan', 'linkBug');
$canEdit = common::hasPriv('productplan', 'edit');
$canCreateChild = common::hasPriv('productplan', 'create');
$canDelete = common::hasPriv('productplan', 'delete');
$menu = '';
$menu .= $this->buildMenu('productplan', 'start', $params, $plan, $type, 'play', 'hiddenwin', '', false, '', $this->lang->productplan->startAB);
$menu .= $this->buildMenu('productplan', 'finish', $params, $plan, $type, 'checked', 'hiddenwin', '', false, '', $this->lang->productplan->finishAB);
@@ -1174,6 +1184,11 @@ class productplanModel extends model
$menu .= "<button type='button' class='btn disabled'><i class='icon-plus' title='{$this->lang->productplan->createExecution}'></i></button>";
}
if(($canStart or $canFinsh or $canClose or $canCreateExec) and ($canLinkStory or $canLinkBug or $canEdit or $canCreateChild or $canDelete))
{
$menu .= "<div class='dividing-line'></div>";
}
if(common::hasPriv('productplan', 'linkStory', $plan) and $plan->parent >= 0)
{
$menu .= $this->buildMenu('productplan', 'view', "{$params}&type=story&orderBy=id_desc&link=true", $plan, $type, 'link', '', '', '', '', $this->lang->productplan->linkStory);
@@ -1197,6 +1212,11 @@ class productplanModel extends model
$menu .= $this->buildMenu('productplan', 'create', "product={$plan->product}&branch={$plan->branch}&parent={$plan->id}", $plan, $type, 'split', '', '', '', '', $this->lang->productplan->children);
if(($canLinkStory or $canLinkBug or $canEdit or $canCreateChild) and $canDelete)
{
$menu .= "<div class='dividing-line'></div>";
}
if($type == 'browse') $menu .= $this->buildMenu('productplan', 'delete', "{$params}&confirm=no", $plan, $type, 'trash', 'hiddenwin', '', '', $this->lang->productplan->delete);
if($type == 'view')
@@ -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>
@@ -9,11 +9,6 @@
* @link https://www.zentao.net
*/
?>
<style>
.c-actions {width: 250px;}
#productplanList .c-actions .btn+.btn {margin-left: -1px;}
#productplanList .c-actions .btn {display: block; float: left;}
</style>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php common::sortFeatureMenu();?>
+18 -14
View File
@@ -163,14 +163,17 @@ 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->userIdPairs = $this->user->getPairs('noletter|showid');
$this->view->usersAvatar = $this->user->getAvatarPairs('');
$this->view->showBatchEdit = $this->cookie->showProductBatchEdit;
$this->display();
}
@@ -479,12 +482,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();
}
+8
View File
@@ -3,3 +3,11 @@
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;}
.c-PO {width: 100px;}
.c-story {width: 300px;}
.c-bug {width: 150px;}
.c-plan, .c-release {width: 80px;}
.c-actions {width: 70px;}
#productList .c-manager {padding-left: 20px;}
#productList .c-manager a {top: 7px; left: 26px;}
.statistic {margin-left: 10px; color: #838a9d; float: left; position: relative; line-height: 28px;}
+2
View File
@@ -8,3 +8,5 @@
.has-suffix > a {max-width: calc(100% - 100px); padding-right: 5px; color: #0c60e1; display: inline-block; max-width: calc(100% - 50px);}
.c-budget {width:100px; text-align: right; padding-right:16px !important;}
.c-manager {white-space: nowrap; overflow: hidden;}
.c-manager a {top: 8px;}
+105
View File
@@ -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)
}
+21
View File
@@ -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();
}
+5 -5
View File
@@ -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>
@@ -72,10 +73,10 @@
<?php endif;?>
</td>
<td class='c-status'><span class="status-program status-<?php echo $program->status?>"><?php echo zget($lang->project->statusList, $program->status, '');?></span></td>
<td>
<td class="c-manager">
<?php if(!empty($program->PM)):?>
<?php $userName = zget($users, $program->PM);?>
<?php echo html::smallAvatar(array('avatar' => $usersAvatar[$program->PM], 'account' => $program->PM, 'name' => $userName), 'avatar-circle avatar-' . zget($userIdPairs, $program->PM)); ?>
<?php echo html::smallAvatar(array('avatar' => $usersAvatar[$program->PM], 'account' => $program->PM, 'name' => $userName), (($program->type == 'program' and $program->grade == 1 )? 'avatar-circle avatar-top avatar-' : 'avatar-circle avatar-') . zget($userIdPairs, $program->PM)); ?>
<?php $userID = isset($PMList[$program->PM]) ? $PMList[$program->PM]->id : '';?>
<?php echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), $userName, '', "title='{$userName}' data-toggle='modal' data-type='iframe' data-width='600'");?>
<?php endif;?>
@@ -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>
+33 -28
View File
@@ -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,19 @@
<?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-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>
<th class='c-PO' rowspan="2"><?php common::printOrderLink('PO', $orderBy, $vars, $lang->product->manager);?></th>
<th class='c-story' colspan="4"><?php echo $lang->story->story;?></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>
<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->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 +76,28 @@
<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 class='c-manager'>
<?php
if(!empty($product->PO))
{
$userName = zget($users, $product->PO);
echo html::smallAvatar(array('avatar' => $usersAvatar[$product->PO], 'account' => $product->PO, 'name' => $userName), 'avatar-circle avatar-' . zget($userIdPairs, $product->PO));
$userID = isset($userIdPairs[$product->PO]) ? $userIdPairs[$product->PO] : '';
echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), $userName, '', "title='{$userName}' data-toggle='modal' data-type='iframe' data-width='600'");
}
?>
</td>
<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 +116,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>
+3 -1
View File
@@ -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,13 +48,13 @@ js::set('browseType', $browseType);
$setting = $this->datatable->getSetting('program');
?>
<table class='table has-sort-head'>
<?php $canBatchEdit = common::hasPriv('project', 'batchEdit');?>
<thead>
<tr>
<?php
foreach($setting as $value)
{
if($value->id == 'projectStatus' and $browseType !== 'all') $value->show = false;
if($value->id == 'status' and strpos('all,unclosed', $browseType) === false) $value->show = false;
if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);
}
?>
+7 -7
View File
@@ -33,7 +33,7 @@ $config->project->sortFields->budget = 'budget';
global $lang;
$config->project->datatable = new stdclass();
$config->project->datatable->defaultField = array('id', 'name', 'PM', 'status', 'begin', 'end', 'budget', 'progress', 'actions');
$config->project->datatable->defaultField = array('id', 'name', 'status', 'PM', 'budget', 'begin', 'end', 'progress', 'actions');
$config->project->datatable->fieldList['id']['title'] = 'ID';
$config->project->datatable->fieldList['id']['fixed'] = 'left';
@@ -74,6 +74,12 @@ $config->project->datatable->fieldList['status']['required'] = 'no';
$config->project->datatable->fieldList['status']['sort'] = 'yes';
$config->project->datatable->fieldList['status']['pri'] = '2';
$config->project->datatable->fieldList['budget']['title'] = 'budget';
$config->project->datatable->fieldList['budget']['fixed'] = 'no';
$config->project->datatable->fieldList['budget']['width'] = '100';
$config->project->datatable->fieldList['budget']['required'] = 'yes';
$config->project->datatable->fieldList['budget']['pri'] = '3';
$config->project->datatable->fieldList['begin']['title'] = 'begin';
$config->project->datatable->fieldList['begin']['fixed'] = 'no';
$config->project->datatable->fieldList['begin']['width'] = '115';
@@ -86,12 +92,6 @@ $config->project->datatable->fieldList['end']['width'] = '100';
$config->project->datatable->fieldList['end']['required'] = 'no';
$config->project->datatable->fieldList['end']['pri'] = '3';
$config->project->datatable->fieldList['budget']['title'] = 'budget';
$config->project->datatable->fieldList['budget']['fixed'] = 'no';
$config->project->datatable->fieldList['budget']['width'] = '100';
$config->project->datatable->fieldList['budget']['required'] = 'yes';
$config->project->datatable->fieldList['budget']['pri'] = '3';
$config->project->datatable->fieldList['teamCount']['title'] = 'teamCount';
$config->project->datatable->fieldList['teamCount']['fixed'] = 'no';
$config->project->datatable->fieldList['teamCount']['width'] = '70';
+16 -15
View File
@@ -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. */
+17 -6
View File
@@ -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');
+12 -7
View File
@@ -1975,11 +1975,14 @@ class projectModel extends model
$class .= ' c-name';
$title = "title={$project->code}";
}
if($id == 'name')
elseif($id == 'name')
{
$class .= ' text-left';
$title = "title='{$project->name} ({$this->lang->project->{$project->model}})'";
$title = "title='{$project->name}" . ($this->config->vision == 'lite' ? "'" : "({$this->lang->project->{$project->model}})'");
}
elseif($id == 'PM')
{
$class .= ' c-manager';
}
if($id == 'end')
@@ -2029,10 +2032,12 @@ class projectModel extends model
echo $project->code;
break;
case 'PM':
$user = $this->loadModel('user')->getByID($project->PM, 'account');
$userID = !empty($user) ? $user->id : '';
$PMLink = helper::createLink('user', 'profile', "userID=$userID", '', true);
$userName = zget($users, $project->PM);
$user = $this->loadModel('user')->getByID($project->PM, 'account');
$userID = !empty($user) ? $user->id : '';
$userAvatar = !empty($user) ? $user->avatar : '';
$PMLink = helper::createLink('user', 'profile', "userID=$userID", '', true);
$userName = zget($users, $project->PM);
if($project->PM) echo html::smallAvatar(array('avatar' => $userAvatar, 'account' => $project->PM, 'name' => $userName), "avatar-circle avatar-{$project->PM}");
echo empty($project->PM) ? '' : html::a($PMLink, $userName, '', "title='{$userName}' data-toggle='modal' data-type='iframe' data-width='600'");
break;
case 'begin':
+2 -2
View File
@@ -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>
@@ -106,7 +106,7 @@
<?php
foreach($setting as $value)
{
if($value->id == 'status' and strpos(',all,bysearch,', ",$browseType,") === false) $value->show = false;
if($value->id == 'status' and strpos(',all,bysearch,undone,', ",$browseType,") === false) $value->show = false;
if($value->id == 'teamCount' and $browseType == 'all') $value->show = false;
if(commonModel::isTutorialMode() && ($value->id == 'PM' || $value->id == 'budget' || $value->id == 'teamCount')) $value->show = false;
if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);
+2 -2
View File
@@ -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)
{
+1 -1
View File
@@ -60,7 +60,7 @@
<?php foreach($products as $product):?>
<tr class="text-center">
<?php $count = isset($product->plans) ? count($product->plans) : 1;?>
<td class='text-left' title="<?php echo $product->name;?>" rowspan="<?php echo $count;?>"><?php echo "<p>" . html::a($this->createLink('product', 'view', "product=$product->id"), $product->name) . "</p>";?></td>
<td class='c-name text-left' title="<?php echo $product->name;?>" rowspan="<?php echo $count;?>"><?php echo "<p>" . html::a($this->createLink('product', 'view', "product=$product->id"), $product->name) . "</p>";?></td>
<td class='text-left' rowspan="<?php echo $count;?>"><?php echo "<p>" . zget($users, $product->PO) . '</p>';?></td>
<?php if(isset($product->plans)):?>
<?php $id = 1;?>
+1 -1
View File
@@ -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
View File
@@ -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=&param=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=&param=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=&param=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=&param=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>';
+1 -1
View File
@@ -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=&param=0&story={$child->id}", $child, 'list', 'sitemap');
common::printIcon('testcase', 'create', "productID=$child->product&branch=$child->branch&module=0&from=&param=0&story={$child->id}", $child, 'list', 'sitemap');
?>
</td>
</tr>
+28 -5
View File
@@ -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();
}
@@ -1112,10 +1132,11 @@ class task extends control
*
* @param int $taskID
* @param string $from
* @param string $orderBy
* @access public
* @return void
*/
public function recordEstimate($taskID, $from = '')
public function recordEstimate($taskID, $from = '', $orderBy = '')
{
$this->commonAction($taskID);
@@ -1174,12 +1195,14 @@ class task extends control
$this->session->set('estimateList', $uri, 'execution');
if(isonlybody()) $this->session->set('estimateList', $uri . (strpos($uri, '?') === false ? '?' : '&') . 'onlybody=yes', 'execution');
$task = $this->task->getById($taskID);
$orderBy = 'date,id';
if(!empty($task->team) and $task->mode == 'linear') $orderBy = 'order,date,id';
$task = $this->task->getById($taskID);
if(!empty($task->team) and $task->mode == 'linear' and !$orderBy) $orderBy = 'order_asc';
if(!$orderBy) $orderBy = 'date_asc';
$this->view->title = $this->lang->task->record;
$this->view->task = $task;
$this->view->from = $from;
$this->view->orderBy = $orderBy;
$this->view->efforts = $this->task->getTaskEstimate($taskID, '', '', $orderBy);
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->display();
+5 -2
View File
@@ -8,13 +8,16 @@
.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:""}
.body-modal .main-header>h2 { max-width: 70% !important; margin-right:0px;}
.table-record .form-date {border-right: none;}
.table.has-sort-head thead>tr>th>a:after, .table.has-sort-head thead>tr>th>a:before {top: -7px;}
.table.has-sort-head thead>tr>th>a:hover, .table.has-sort-head thead>tr>th>a:hover:after, .table.has-sort-head thead>tr>th>a:hover:before {color: #000;}
+19 -1
View File
@@ -1,5 +1,24 @@
$(function()
{
/* Set default tab. */
if($.cookie('recordEstimateType') == 'all')
{
$('#recordForm').addClass('hidden');
$('.my-effort, #legendMyEffort').removeClass('active');
$('.all-effort, #legendAllEffort').addClass('active');
}
else
{
$('.my-effort, #legendMyEffort').addClass('active');
$('#recordForm').removeClass('hidden');
}
$.cookie('recordEstimateType', null);
$('.order-btn').on('click', function()
{
$.cookie('recordEstimateType', 'all');
});
/* Hide creation logs when displaying team logs. */
$('#linearefforts .tabs ul > li').click(function()
{
@@ -7,7 +26,6 @@ $(function()
$('#recordForm').toggleClass('hidden', tab == '#legendAllEffort');
});
$('.form-date').datetimepicker('setEndDate', today);
$("#recordForm #submit").click(function(e, confirmed)
+15 -1
View File
@@ -4140,10 +4140,24 @@ class taskModel extends model
$storyChanged = !empty($task->storyStatus) && $task->storyStatus == 'active' && $task->latestStoryVersion > $task->storyVersion && !in_array($task->status, array('cancel', 'closed'));
if($storyChanged) return $this->buildMenu('task', 'confirmStoryChange', $params, $task, 'browse', '', 'hiddenwin');
$canStart = ($task->status != 'pause' and common::hasPriv('task', 'start'));
$canRestart = ($task->status == 'pause' and common::hasPriv('task', 'restart'));
$canFinish = common::hasPriv('task', 'finish');
$canClose = common::hasPriv('task', 'close');
$canRecordEstimate = common::hasPriv('task', 'recordEstimate');
$canEdit = common::hasPriv('task', 'edit');
$canBatchCreate = ($this->config->vision == 'rnd' and common::hasPriv('task', 'batchCreate'));
if($task->status != 'pause') $menu .= $this->buildMenu('task', 'start', $params, $task, 'browse', '', '', 'iframe', true);
if($task->status == 'pause') $menu .= $this->buildMenu('task', 'restart', $params, $task, 'browse', '', '', 'iframe', true);
$menu .= $this->buildMenu('task', 'close', $params, $task, 'browse', '', '', 'iframe', true);
$menu .= $this->buildMenu('task', 'finish', $params, $task, 'browse', '', '', 'iframe', true);
$menu .= $this->buildMenu('task', 'close', $params, $task, 'browse', '', '', 'iframe', true);
if(($canStart or $canRestart or $canFinish or $canClose) and ($canRecordEstimate or $canEdit or $canBatchCreate))
{
$menu .= "<div class='dividing-line'></div>";
}
$menu .= $this->buildMenu('task', 'recordEstimate', $params, $task, 'browse', 'time', '', 'iframe', true);
$menu .= $this->buildMenu('task', 'edit', $params, $task, 'browse');
if($this->config->vision == 'rnd')
+28 -15
View File
@@ -16,33 +16,45 @@ foreach($task->team as $team) $teamOrders[$team->order] = $team->account;
$myOrders = array();
$allEfforts = array();
$recorders = array();
foreach($efforts as $effort)
$index = 0;
$allOrders = array();
$efforts = array_values($efforts);
foreach($efforts as $key => $effort)
{
$order = $effort->order;
$account = $effort->account;
$allEfforts[$order][] = $effort;
$prevEffort = $key > 0 ? $efforts[$key - 1] : null;
$order = (!$prevEffort or $prevEffort->order == $effort->order) ? $index : ++$index;
$account = $effort->account;
$allEfforts[$order][] = $effort;
$recorders[$order][$account] = $account;
if($app->user->account == $account)
{
if(!isset($myOrders[$order])) $myOrders[$order] = 0;
$myOrders[$order] += 1;
}
$allOrders[$order] = $effort->order + 1;
}
?>
<div id='linearefforts'>
<div class='tabs'>
<ul class='nav nav-tabs'>
<li class='active'><a href='#legendMyEffort' data-toggle='tab'><?php echo $lang->task->myEffort;?></a></li>
<li><a href='#legendAllEffort' data-toggle='tab'><?php echo $lang->task->allEffort;?></a></li>
<li class='my-effort'><a href='#legendMyEffort' data-toggle='tab'><?php echo $lang->task->myEffort;?></a></li>
<li class='all-effort'><a href='#legendAllEffort' data-toggle='tab'><?php echo $lang->task->allEffort;?></a></li>
</ul>
<div class='tab-content'>
<div class='tab-pane active' id='legendMyEffort'>
<div class='tab-pane' id='legendMyEffort'>
<?php if(!empty($myOrders)):?>
<table class='table table-bordered table-fixed table-recorded'>
<table class='table table-bordered table-fixed table-recorded has-sort-head'>
<thead>
<tr class='text-center'>
<th class="w-60px"> <?php echo $lang->task->teamOrder;?></th>
<th class="w-120px"><?php echo $lang->task->date;?></th>
<?php
$vars = (isset($objectType) ? "objectType=$objectType&" : '') . "taskID=$task->id&from=$from&orderBy=%s";
$sort = explode(',', $orderBy);
$orderBy = zget($sort, '0', '');
if(!strpos($orderBy, '_')) $orderBy .= '_asc';
?>
<th class="w-60px"><?php common::printOrderLink('order', $orderBy, $vars, $lang->task->teamOrder);?></th>
<th class="w-120px"><?php common::printOrderLink('date', $orderBy, $vars, $lang->task->date);?></th>
<th class="w-120px"><?php echo $lang->task->recordedBy;?></th>
<th><?php echo $lang->task->work;?></th>
<th class="thWidth"><?php echo $lang->task->consumedAB;?></th>
@@ -58,7 +70,7 @@ foreach($efforts as $effort)
<?php if($effort->account != $this->app->user->account) continue;?>
<tr class="text-center">
<?php if(!$showOrder):?>
<td rowspan='<?php echo $count;?>'><?php echo $order + 1;?></td>
<td rowspan='<?php echo $count;?>'><?php echo $allOrders[$order];?></td>
<?php $showOrder = true;?>
<?php endif;?>
<td><?php echo $effort->date;?></td>
@@ -84,11 +96,12 @@ foreach($efforts as $effort)
<?php endif;?>
</div>
<div class='tab-pane' id='legendAllEffort'>
<table class='table table-bordered table-fixed table-recorded'>
<table class='table table-bordered table-fixed table-recorded has-sort-head'>
<thead>
<tr class='text-center'>
<th class="w-60px"> <?php echo $lang->task->teamOrder;?></th>
<th class="w-120px"><?php echo $lang->task->date;?></th>
<?php $vars = (isset($objectType) ? "objectType=$objectType&" : '') . "taskID=$task->id&from=$from&orderBy=%s";?>
<th class="w-60px order-btn"><?php common::printOrderLink('order', $orderBy, $vars, $lang->task->teamOrder);?></th>
<th class="w-120px order-btn"><?php common::printOrderLink('date', $orderBy, $vars, $lang->task->date);?></th>
<th class="w-120px"><?php echo $lang->task->recordedBy;?></th>
<th><?php echo $lang->task->work;?></th>
<th class="thWidth"><?php echo $lang->task->consumedAB;?></th>
@@ -103,7 +116,7 @@ foreach($efforts as $effort)
<?php foreach($allEfforts[$order] as $effort):?>
<tr class="text-center">
<?php if(!$showOrder):?>
<td rowspan='<?php echo $count;?>'><?php echo $order + 1;?></td>
<td rowspan='<?php echo $count;?>'><?php echo $allOrders[$order];?></td>
<?php $showOrder = true;?>
<?php endif;?>
<td><?php echo $effort->date;?></td>
+4 -3
View File
@@ -59,10 +59,11 @@ if(!empty($members) && $task->mode == 'linear')
<?php if(!empty($task->team) and $task->mode == 'linear'):?>
<?php include __DIR__ . '/lineareffort.html.php';?>
<?php else:?>
<table class='table table-bordered table-fixed table-recorded'>
<table class='table table-bordered table-fixed table-recorded has-sort-head'>
<thead>
<tr class='text-center'>
<th class="w-120px"><?php echo $lang->task->date;?></th>
<?php $vars = "taskID=$task->id&from=$from&orderBy=%s";?>
<th class="w-120px"><?php common::printOrderLink('date', !strpos($orderBy, ',') ? $orderBy : 'date_asc', $vars, $lang->task->date);?></th>
<th class="w-120px"><?php echo $lang->task->recordedBy;?></th>
<th><?php echo $lang->task->work;?></th>
<th class="thWidth"><?php echo $lang->task->consumed;?></th>
@@ -103,7 +104,7 @@ if(!empty($members) && $task->mode == 'linear')
</div>
</div>
<?php else:?>
<form id="recordForm" method='post' target='hiddenwin'>
<form id="recordForm" class='hidden' method='post' target='hiddenwin'>
<?php
$readonly = '';
$left = '';
+1 -1
View File
@@ -254,7 +254,7 @@ $lang->testcase->featureBar['browse']['all'] = $lang->testcase->allCases
$lang->testcase->featureBar['browse']['wait'] = 'Wartend';
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
$lang->testcase->featureBar['browse']['group'] = 'Group View';
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story';
$lang->testcase->featureBar['browse']['browseunits'] = 'Unit Test';
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
+1 -1
View File
@@ -254,7 +254,7 @@ $lang->testcase->featureBar['browse']['all'] = $lang->testcase->allCases
$lang->testcase->featureBar['browse']['wait'] = 'Waiting';
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
$lang->testcase->featureBar['browse']['group'] = 'Group View';
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story';
$lang->testcase->featureBar['browse']['browseunits'] = 'Unit Test';
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
+1 -1
View File
@@ -254,7 +254,7 @@ $lang->testcase->featureBar['browse']['all'] = $lang->testcase->allCases
$lang->testcase->featureBar['browse']['wait'] = 'En Attente';
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
$lang->testcase->featureBar['browse']['group'] = 'Group View';
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story';
$lang->testcase->featureBar['browse']['browseunits'] = 'Unit Test';
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
+1 -1
View File
@@ -254,7 +254,7 @@ $lang->testcase->featureBar['browse']['all'] = '全部';
$lang->testcase->featureBar['browse']['wait'] = '待评审';
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
$lang->testcase->featureBar['browse']['group'] = '分组查看';
$lang->testcase->featureBar['browse']['suite'] = '套件';
$lang->testcase->featureBar['browse']['zerocase'] = "零用例{$lang->SRCommon}";
$lang->testcase->featureBar['browse']['browseunits'] = '单元测试';
$lang->testcase->featureBar['browse']['suite'] = '套件';
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
+48
View File
@@ -13,6 +13,7 @@
.btn-group a.btn-primary {border-right: 1px solid rgba(255,255,255,0.2);}
.btn-group button.dropdown-toggle.btn-primary {padding:6px;}
.body-modal #mainMenu>.btn-toolbar {width: auto;}
#mainMenu .dividing-line {width: 1px; height: 16px; display: inline-block; background: #D8DBDE; margin: 7px 8px 0 0; float: left;}
</style>
<div id='mainMenu' class='clearfix'>
<?php if(!($this->app->rawMethod == 'groupcase')):?>
@@ -195,3 +196,50 @@ if(!empty($headerHooks))
foreach($headerHooks as $fileName) include($fileName);
}
?>
<script>
$(function()
{
var $allTab = $('#allTab');
var $waitTab = $('#waitTab');
var $needconfirmTab = $('#needconfirmTab');
var $groupTab = $('#groupTab');
var $zerocaseTab = $('#zerocaseTab');
var $bysuiteTab = $('#bysuiteTab');
var $browseunitsTab = $('#browseunitsTab');
var hasAllTab = $allTab.length > 0;
var hasWaitTab = $waitTab.length > 0;
var hasNeedconfirmTab = $needconfirmTab.length > 0;
var hasGroupTab = $groupTab.length > 0;
var hasZerocaseTab = $zerocaseTab.length > 0;
var hasbysuiteTab = $bysuiteTab.length > 0;
var hasBrowseunitsTab = $browseunitsTab.length > 0;
if((hasAllTab || hasWaitTab) && (hasNeedconfirmTab || hasGroupTab || hasbysuiteTab || hasZerocaseTab || hasBrowseunitsTab))
{
if(hasWaitTab)
{
$waitTab.after("<div class='dividing-line'></div>");
}
else
{
$allTab.after("<div class='dividing-line'></div>");
}
}
if((hasNeedconfirmTab || hasGroupTab || hasZerocaseTab) && (hasbysuiteTab || hasBrowseunitsTab))
{
if(hasZerocaseTab)
{
$zerocaseTab.after("<div class='dividing-line'></div>");
}
else if(hasGroupTab)
{
$groupTab.after("<div class='dividing-line'></div>");
}
else
{
$needconfirmTab.after("<div class='dividing-line'></div>");
}
}
});
</script>
+1 -1
View File
@@ -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
+14 -1
View File
@@ -118,8 +118,21 @@ body.xxc-embed.m-productplan-view,body.xxc-embed.m-bug-browse,body.xxc-embed.m-p
#downloadMobile .dropdown-menu .mobile-version {text-align: center;}
#downloadMobile .dropdown-menu .mobile-version span {color: #0c64eb; font-size: 12px; font-weight: 700;}
.radio-text-divider {width: 1px; height: 13px; display: inline-block; margin: -2px 9px 0; background: #D9D9D9; vertical-align: middle;}
.input-divider {margin: 0 4px;}
.setting-input {width: 64px; height: 20px; margin: 0 4px; text-align: center;}
.setting-input.disabled,.setting-input[disabled="disabled"] {color: #C4C4C4;}
/* #mainMenu > .btn-toolBar .btn-link .label-light,
#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
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))
{