Merge branch '15.0.beta3' of http://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -203,12 +203,12 @@ class router extends baseRouter
|
||||
|
||||
/* Record hour unit. */
|
||||
$config->hourUnit = 'h';
|
||||
if($hourKey == STORYPOINT_KEY) $config->hourUnit = 'SP';
|
||||
if($hourKey == FUNCTIONPOINT_KEY) $config->hourUnit = 'FP';
|
||||
if($hourKey == STORYPOINT_KEY) $config->hourUnit = 'sp';
|
||||
if($hourKey == FUNCTIONPOINT_KEY) $config->hourUnit = 'fp';
|
||||
|
||||
$model = new stdclass();
|
||||
$model->model = 'scrum';
|
||||
if($this->session->PRJ) $model = $this->dbh->query('SELECT model FROM' . TABLE_PROJECT . "WHERE id = {$this->session->PRJ}")->fetch();
|
||||
//if($this->session->PRJ) $model = $this->dbh->query('SELECT model FROM' . TABLE_PROJECT . "WHERE id = {$this->session->PRJ}")->fetch();
|
||||
|
||||
$iterationKey = $projectKey;
|
||||
if(isset($model->model) && $model->model == 'waterfall') $projectKey = STAGE_KEY;
|
||||
@@ -244,7 +244,7 @@ class router extends baseRouter
|
||||
if($this->dbh and !empty($this->config->db->name) and !defined('IN_UPGRADE'))
|
||||
{
|
||||
/* Get story concept in project and product. */
|
||||
$URSRList = $this->dbh->query('SELECT `key`, `value` FROM' . TABLE_LANG . "WHERE module = 'custom' and section = 'URSRList' and lang = \"{$this->clientLang}\"")->fetchAll();
|
||||
$URSRList = $this->dbh->query('SELECT `key`, `value` FROM' . TABLE_LANG . "WHERE module = 'custom' and section = 'URSRList' and `key` = \"{$config->URSR}\"")->fetchAll();
|
||||
|
||||
/* Get UR pairs and SR pairs. */
|
||||
$URPairs = array();
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<style>.table .c-progress {width: 60px;}</style>
|
||||
<?php if(empty($executionStats)): ?>
|
||||
<div class='empty-tip'><?php common::printLink('execution', 'create', '', "<i class='icon-plus'></i> " . $lang->execution->create, '', "class='btn btn-primary'")?></div>
|
||||
<?php else:?>
|
||||
@@ -51,15 +52,13 @@
|
||||
<span class="status-project status-<?php echo $execution->status?>" title='<?php echo $statusName;?>'><?php echo $statusName;?></span>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td class="c-hours" title="<?php echo $execution->hours->totalEstimate . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalEstimate . ' ' . $lang->execution->workHourUnit;?></td>
|
||||
<td class="c-hours" title="<?php echo $execution->hours->totalConsumed . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalConsumed . ' ' . $lang->execution->workHourUnit;?></td>
|
||||
<td class="c-hours" title="<?php echo $execution->hours->totalLeft . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalLeft . ' ' . $lang->execution->workHourUnit;?></td>
|
||||
<td class="c-hours" title="<?php echo $execution->hours->totalEstimate . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalEstimate . $lang->execution->workHourUnit;?></td>
|
||||
<td class="c-hours" title="<?php echo $execution->hours->totalConsumed . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalConsumed . $lang->execution->workHourUnit;?></td>
|
||||
<td class="c-hours" title="<?php echo $execution->hours->totalLeft . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalLeft . $lang->execution->workHourUnit;?></td>
|
||||
<?php endif;?>
|
||||
<td class="c-progress">
|
||||
<div class="progress progress-text-left">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $execution->hours->progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $execution->hours->progress;?>%">
|
||||
<span class="progress-text"><?php echo $execution->hours->progress;?>%</span>
|
||||
</div>
|
||||
<div class='progress-pie' data-doughnut-size='90' data-color='#00da88' data-value='<?php echo $execution->hours->progress;?>' data-width='24' data-height='24' data-back-color='#e8edf3'>
|
||||
<div class='progress-info'><?php echo $execution->hours->progress;?></div>
|
||||
</div>
|
||||
</td>
|
||||
<?php if($longBlock):?>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</td>
|
||||
<?php if($longBlock):?>
|
||||
<td class='text-center'><?php echo $project->teamCount;?></td>
|
||||
<td class='text-right' title="<?php echo $project->consumed . ' ' . $lang->execution->workHour;?>"><?php echo $project->consumed . ' ' . $lang->execution->workHourUnit;?></td>
|
||||
<td class='text-right' title="<?php echo $project->consumed . ' ' . $lang->execution->workHour;?>"><?php echo $project->consumed . $lang->execution->workHourUnit;?></td>
|
||||
<?php $programBudget = in_array($this->app->getClientLang(), ['zh-cn','zh-tw']) ? number_format((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : number_format((float)$project->budget, 2);?>
|
||||
<td class='text-right'><?php echo $project->budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $programBudget : $lang->project->future;?></td>
|
||||
<td class='text-center'><?php echo $project->leftStories;?></td>
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
<span class="status-project status-<?php echo $execution->status?>" title='<?php echo $statusName;?>'><?php echo $statusName;?></span>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td class="c-hours" title="<?php echo $execution->hours->totalEstimate . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalEstimate . ' ' . $lang->execution->workHourUnit;?></td>
|
||||
<td class="c-hours" title="<?php echo $execution->hours->totalConsumed . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalConsumed . ' ' . $lang->execution->workHourUnit;?></td>
|
||||
<td class="c-hours" title="<?php echo $execution->hours->totalLeft . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalLeft . ' ' . $lang->execution->workHourUnit;?></td>
|
||||
<td class="c-hours" title="<?php echo $execution->hours->totalEstimate . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalEstimate . $lang->execution->workHourUnit;?></td>
|
||||
<td class="c-hours" title="<?php echo $execution->hours->totalConsumed . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalConsumed . $lang->execution->workHourUnit;?></td>
|
||||
<td class="c-hours" title="<?php echo $execution->hours->totalLeft . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalLeft . $lang->execution->workHourUnit;?></td>
|
||||
<?php endif;?>
|
||||
<td class="c-progress">
|
||||
<div class='progress-pie' data-doughnut-size='90' data-color='#00da88' data-value='<?php echo $execution->hours->progress;?>' data-width='24' data-height='24' data-back-color='#e8edf3'>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<td class='c-pri <?php if($longBlock) echo "c-pri-long"?>'><span class='label-pri label-pri-<?php echo $task->pri;?>' title='<?php echo zget($lang->task->priList, $task->pri, $task->pri)?>'><?php echo zget($lang->task->priList, $task->pri, $task->pri)?></span></td>
|
||||
<td class='c-name' style='color: <?php echo $task->color?>' title='<?php echo $task->name?>'><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', '', $task->project), $task->name)?></td>
|
||||
<?php if($longBlock):?>
|
||||
<td class='c-estimate text-center' title="<?php echo $task->estimate . ' ' . $lang->execution->workHour;?>"><?php echo $task->estimate . ' ' . $lang->execution->workHourUnit;?></td>
|
||||
<td class='c-estimate text-center' title="<?php echo $task->estimate . ' ' . $lang->execution->workHour;?>"><?php echo $task->estimate . $lang->execution->workHourUnit;?></td>
|
||||
<td class='c-deadline'><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
|
||||
<?php endif;?>
|
||||
<?php $status = $this->processStatus('task', $task);?>
|
||||
|
||||
@@ -435,11 +435,6 @@ class bug extends control
|
||||
|
||||
if($runID and $resultID) extract($this->bug->getBugInfoFromResult($resultID, 0, 0, isset($stepIdList) ? $stepIdList : ''));// If set runID and resultID, get the result info by resultID as template.
|
||||
if(!$runID and $caseID) extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version, isset($stepIdList) ? $stepIdList : ''));// If not set runID but set caseID, get the result info by resultID and case info.
|
||||
if($testtask)
|
||||
{
|
||||
$testtask = $this->loadModel('testtask')->getById($testtask);
|
||||
$buildID = $testtask->build;
|
||||
}
|
||||
|
||||
/* If bugID setted, use this bug as template. */
|
||||
if(isset($bugID))
|
||||
@@ -456,7 +451,15 @@ class bug extends control
|
||||
$assignedTo = $bug->assignedTo;
|
||||
$deadline = $bug->deadline;
|
||||
$color = $bug->color;
|
||||
$testtask = $bug->testtask;
|
||||
}
|
||||
|
||||
if($testtask)
|
||||
{
|
||||
$testtask = $this->loadModel('testtask')->getById($testtask);
|
||||
$buildID = $testtask->build;
|
||||
}
|
||||
|
||||
if(isset($todoID))
|
||||
{
|
||||
$todo = $this->loadModel('todo')->getById($todoID);
|
||||
@@ -687,6 +690,7 @@ class bug extends control
|
||||
if(!$bug) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
if($bug->project) $this->session->project = $bug->project;
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->project);
|
||||
$this->session->set('storyList', '', 'product');
|
||||
|
||||
$this->bug->checkBugExecutionPriv($bug);
|
||||
|
||||
|
||||
@@ -317,7 +317,7 @@ js::set('blockID', $blockID);
|
||||
<?php echo html::submitButton();?>
|
||||
<?php if($caseID == 0) echo html::backButton();?>
|
||||
<?php echo html::hidden('case', (int)$caseID) . html::hidden('caseVersion', (int)$version);?>
|
||||
<?php echo html::hidden('result', (int)$runID) . html::hidden('testtask', $testtask ? (int)$testtask : 0);?>
|
||||
<?php echo html::hidden('result', (int)$runID) . html::hidden('testtask', empty($testtask) ? 0 : $testtask->id);?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
common::printIcon('bug', 'close', $params, $bug, 'button', '', '', 'text-danger iframe showinonlybody', true);
|
||||
common::printIcon('bug', 'activate', $params, $bug, 'button', '', '', 'text-success iframe showinonlybody', true);
|
||||
|
||||
common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&execution=0&bugID=$bug->id", $bug, 'button', $lang->icons['story'], '', '', '', "data-app='product'", $lang->bug->toStory);
|
||||
common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&execution=0&bugID=$bug->id", $bug, 'button', $lang->icons['story'], '', '', '', "data-app='" . ($this->app->openApp == 'project' ? 'project' : 'product') . "'", $lang->bug->toStory);
|
||||
common::printIcon('bug', 'createCase', $convertParams, $bug, 'button', 'sitemap');
|
||||
|
||||
echo $this->buildOperateMenu($bug, 'view');
|
||||
|
||||
@@ -170,8 +170,6 @@ $lang->product->dividerMenu = $config->URAndSR ? ',requirement,set,' : ',track,s
|
||||
$lang->project->homeMenu = new stdclass();
|
||||
$lang->project->homeMenu->browse = array('link' => ($config->systemMode == 'new' ? $lang->project->list : $lang->executionCommon) . '|project|browse|', 'alias' => 'batchedit,create');
|
||||
|
||||
$lang->project->dividerMenu = ',execution,programplan,doc,dynamic,';
|
||||
|
||||
/* Scrum menu. */
|
||||
$lang->scrum->menu = new stdclass();
|
||||
$lang->scrum->menu->index = array('link' => "{$lang->dashboard}|project|index|project=%s");
|
||||
@@ -185,6 +183,8 @@ $lang->scrum->menu->release = array('link' => "{$lang->release->common}|projec
|
||||
$lang->scrum->menu->dynamic = array('link' => "$lang->dynamic|project|dynamic|project=%s");
|
||||
$lang->scrum->menu->settings = array('link' => "$lang->settings|project|view|project=%s", 'subModule' => 'stakeholder', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
|
||||
|
||||
$lang->scrum->dividerMenu = ',execution,programplan,doc,dynamic,';
|
||||
|
||||
/* Scrum menu order. */
|
||||
$lang->scrum->menuOrder[5] = 'index';
|
||||
$lang->scrum->menuOrder[10] = 'execution';
|
||||
@@ -540,4 +540,6 @@ $lang->navGroup->entry = 'admin';
|
||||
$lang->navGroup->extension = 'admin';
|
||||
$lang->navGroup->action = 'admin';
|
||||
|
||||
$lang->navGroup->tree = 'tree';
|
||||
$lang->navGroup->search = 'search';
|
||||
$lang->navGroup->index = 'index';
|
||||
$lang->navGroup->tree = 'tree';
|
||||
|
||||
+24
-4
@@ -484,7 +484,7 @@ class customModel extends model
|
||||
* Get UR and SR pairs.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return array
|
||||
*/
|
||||
public function getURSRPairs()
|
||||
{
|
||||
@@ -494,6 +494,11 @@ class customModel extends model
|
||||
->andWhere('module')->eq('custom')
|
||||
->andWhere('section')->eq('URSRList')
|
||||
->fetchAll();
|
||||
if(empty($langData))
|
||||
{
|
||||
$URSR = $this->loadModel('setting')->getURSR();
|
||||
$langData = $this->dao->select('`key`, `value`, `system`')->from(TABLE_LANG)->where('`key`')->eq($URSR)->andWhere('module')->eq('custom')->andWhere('section')->eq('URSRList')->fetchAll();
|
||||
}
|
||||
|
||||
$URSRPairs = array();
|
||||
foreach($langData as $id => $content)
|
||||
@@ -509,11 +514,16 @@ class customModel extends model
|
||||
* Get UR pairs.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return array
|
||||
*/
|
||||
public function getURPairs()
|
||||
{
|
||||
$URSRList = $this->dao->select('`key`,`value`')->from(TABLE_LANG)->where('module')->eq('custom')->andWhere('section')->eq('URSRList')->andWhere('lang')->eq($this->app->clientLang)->fetchPairs();
|
||||
if(empty($URSRList))
|
||||
{
|
||||
$URSR = $this->loadModel('setting')->getURSR();
|
||||
$URSRList = $this->dao->select('`key`,`value`')->from(TABLE_LANG)->where('module')->eq('custom')->andWhere('section')->eq('URSRList')->andWhere('`key`')->eq($URSR)->fetchPairs();
|
||||
}
|
||||
|
||||
$URPairs = array();
|
||||
foreach($URSRList as $key => $value)
|
||||
@@ -529,11 +539,16 @@ class customModel extends model
|
||||
* Get SR pairs.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return array
|
||||
*/
|
||||
public function getSRPairs()
|
||||
{
|
||||
$URSRList = $this->dao->select('`key`,`value`')->from(TABLE_LANG)->where('module')->eq('custom')->andWhere('section')->eq('URSRList')->andWhere('lang')->eq($this->app->clientLang)->fetchPairs();
|
||||
if(empty($URSRList))
|
||||
{
|
||||
$URSR = $this->loadModel('setting')->getURSR();
|
||||
$URSRList = $this->dao->select('`key`,`value`')->from(TABLE_LANG)->where('module')->eq('custom')->andWhere('section')->eq('URSRList')->andWhere('`key`')->eq($URSR)->fetchPairs();
|
||||
}
|
||||
|
||||
$SRPairs = array();
|
||||
foreach($URSRList as $key => $value)
|
||||
@@ -549,7 +564,7 @@ class customModel extends model
|
||||
* Get UR and SR list.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return array
|
||||
*/
|
||||
public function getURSRList()
|
||||
{
|
||||
@@ -561,6 +576,11 @@ class customModel extends model
|
||||
->andWhere('module')->eq('custom')
|
||||
->andWhere('section')->eq('URSRList')
|
||||
->fetchAll();
|
||||
if(empty($langData))
|
||||
{
|
||||
$URSR = $this->loadModel('setting')->getURSR();
|
||||
$langData = $this->dao->select('`key`, `value`, `system`')->from(TABLE_LANG)->where('`key`')->eq($URSR)->andWhere('module')->eq('custom')->andWhere('section')->eq('URSRList')->fetchAll();
|
||||
}
|
||||
|
||||
$URSRList = array();
|
||||
foreach($langData as $id => $content)
|
||||
|
||||
@@ -20,7 +20,7 @@ $lang->execution->project = 'Project';
|
||||
$lang->execution->execName = 'Execution Name';
|
||||
$lang->execution->execCode = 'Execution Code';
|
||||
$lang->execution->execType = 'Execution Type';
|
||||
$lang->execution->statge = 'Stage';
|
||||
$lang->execution->stage = 'Stage';
|
||||
$lang->execution->pri = 'Priorität';
|
||||
$lang->execution->openedBy = 'OpenedBy';
|
||||
$lang->execution->openedDate = 'OpenedDate';
|
||||
|
||||
@@ -20,7 +20,7 @@ $lang->execution->project = 'Project';
|
||||
$lang->execution->execName = 'Execution Name';
|
||||
$lang->execution->execCode = 'Execution Code';
|
||||
$lang->execution->execType = 'Execution Type';
|
||||
$lang->execution->statge = 'Stage';
|
||||
$lang->execution->stage = 'Stage';
|
||||
$lang->execution->pri = 'Priority';
|
||||
$lang->execution->openedBy = 'OpenedBy';
|
||||
$lang->execution->openedDate = 'OpenedDate';
|
||||
|
||||
@@ -20,7 +20,7 @@ $lang->execution->project = 'Project';
|
||||
$lang->execution->execName = 'Execution Name';
|
||||
$lang->execution->execCode = 'Execution Code';
|
||||
$lang->execution->execType = 'Execution Type';
|
||||
$lang->execution->statge = 'Etape';
|
||||
$lang->execution->stage = 'Etape';
|
||||
$lang->execution->pri = 'Priorité';
|
||||
$lang->execution->openedBy = 'Ouvert par';
|
||||
$lang->execution->openedDate = "Date d'ouverture";
|
||||
|
||||
@@ -20,7 +20,7 @@ $lang->execution->project = 'Project';
|
||||
$lang->execution->execName = 'Execution Name';
|
||||
$lang->execution->execCode = 'Execution Code';
|
||||
$lang->execution->execType = 'Execution Type';
|
||||
$lang->execution->statge = 'Giai đoạn';
|
||||
$lang->execution->stage = 'Giai đoạn';
|
||||
$lang->execution->pri = 'Ưu tiên';
|
||||
$lang->execution->openedBy = 'Mở bởi';
|
||||
$lang->execution->openedDate = 'Ngày mở';
|
||||
|
||||
@@ -20,7 +20,7 @@ $lang->execution->project = '所属项目';
|
||||
$lang->execution->execName = '执行名称';
|
||||
$lang->execution->execCode = '执行代号';
|
||||
$lang->execution->execType = '执行类型';
|
||||
$lang->execution->statge = '阶段';
|
||||
$lang->execution->stage = '阶段';
|
||||
$lang->execution->pri = '优先级';
|
||||
$lang->execution->openedBy = '由谁创建';
|
||||
$lang->execution->openedDate = '创建日期';
|
||||
|
||||
@@ -167,23 +167,24 @@ if($config->systemMode == 'new')
|
||||
$lang->resource->program->unbindWhitelist = 'unbindWhitelist';
|
||||
$lang->resource->program->export = 'export';
|
||||
|
||||
$lang->program->methodOrder[10] = 'browse';
|
||||
$lang->program->methodOrder[15] = 'product';
|
||||
$lang->program->methodOrder[20] = 'create';
|
||||
$lang->program->methodOrder[25] = 'edit';
|
||||
$lang->program->methodOrder[30] = 'view';
|
||||
$lang->program->methodOrder[35] = 'start';
|
||||
$lang->program->methodOrder[40] = 'suspend';
|
||||
$lang->program->methodOrder[45] = 'close';
|
||||
$lang->program->methodOrder[50] = 'activate';
|
||||
$lang->program->methodOrder[55] = 'delete';
|
||||
$lang->program->methodOrder[60] = 'project';
|
||||
$lang->program->methodOrder[65] = 'stakeholder';
|
||||
$lang->program->methodOrder[67] = 'createStakeholder';
|
||||
$lang->program->methodOrder[70] = 'unlinkStakeholder';
|
||||
$lang->program->methodOrder[75] = 'batchUnlinkStakeholders';
|
||||
$lang->program->methodOrder[80] = 'export';
|
||||
$lang->program->methodOrder[85] = 'unbindWhitelist';
|
||||
$lang->program->methodOrder[5] = 'browse';
|
||||
$lang->program->methodOrder[10] = 'view';
|
||||
$lang->program->methodOrder[15] = 'product';
|
||||
$lang->program->methodOrder[20] = 'create';
|
||||
$lang->program->methodOrder[25] = 'edit';
|
||||
$lang->program->methodOrder[30] = 'view';
|
||||
$lang->program->methodOrder[35] = 'start';
|
||||
$lang->program->methodOrder[40] = 'suspend';
|
||||
$lang->program->methodOrder[45] = 'activate';
|
||||
$lang->program->methodOrder[50] = 'close';
|
||||
$lang->program->methodOrder[55] = 'delete';
|
||||
$lang->program->methodOrder[60] = 'project';
|
||||
$lang->program->methodOrder[65] = 'stakeholder';
|
||||
$lang->program->methodOrder[70] = 'createStakeholder';
|
||||
$lang->program->methodOrder[75] = 'unlinkStakeholder';
|
||||
$lang->program->methodOrder[80] = 'batchUnlinkStakeholders';
|
||||
$lang->program->methodOrder[85] = 'unbindWhitelist';
|
||||
$lang->program->methodOrder[90] = 'export';
|
||||
|
||||
/* Project. */
|
||||
$lang->resource->project = new stdclass();
|
||||
|
||||
@@ -872,7 +872,7 @@ class my extends control
|
||||
$this->view->position[] = $this->lang->my->preference;
|
||||
|
||||
$this->view->URSRList = $this->loadModel('custom')->getURSRPairs();
|
||||
$this->view->URSR = isset($this->config->URSR) ? $this->config->URSR : $this->setting->getItem('owner=system&module=custom&key=URSR');
|
||||
$this->view->URSR = $this->setting->getURSR();
|
||||
$this->view->programLink = isset($this->config->programLink) ? $this->config->programLink : 'program-browse';
|
||||
$this->view->productLink = isset($this->config->productLink) ? $this->config->productLink : 'product-all';
|
||||
$this->view->projectLink = isset($this->config->projectLink) ? $this->config->projectLink : 'project-browse';
|
||||
|
||||
@@ -261,14 +261,14 @@ class productModel extends model
|
||||
{
|
||||
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getProductPairs();
|
||||
|
||||
$orderBy = !empty($this->config->product->orderBy) ? $this->config->product->orderBy : 'isClosed';
|
||||
$products = $this->dao->select('*, IF(INSTR(" closed", status) < 2, 0, 1) AS isClosed')
|
||||
->from(TABLE_PRODUCT)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF($programID)->andWhere('program')->eq($programID)->fi()
|
||||
->beginIF(strpos($mode, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->products)->fi()
|
||||
->orderBy($orderBy)
|
||||
$products = $this->dao->select('*, IF(INSTR(" closed", t1.status) < 2, 0, 1) AS isClosed, t1.id AS id, t1.name AS name')
|
||||
->from(TABLE_PRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROGRAM)->alias('t2')->on('t1.program = t2.id')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->beginIF($programID)->andWhere('t1.program')->eq($programID)->fi()
|
||||
->beginIF(strpos($mode, 'noclosed') !== false)->andWhere('t1.status')->ne('closed')->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->products)->fi()
|
||||
->orderBy('t2.order_asc, t1.line_desc, t1.order_asc')
|
||||
->fetchPairs('id', 'name');
|
||||
return $products;
|
||||
}
|
||||
|
||||
@@ -22,13 +22,6 @@
|
||||
<h2 class="detail-title"><span class="label-id"><?php echo $product->id;?></span> <span class="label label-light label-outline"><?php echo $product->code;?></span> <?php echo $product->name;?></h2>
|
||||
<div class="detail-content article-content">
|
||||
<p><?php echo $product->desc;?></p>
|
||||
<p>
|
||||
<span class="label label-primary label-outline"><?php echo $lang->product->typeAB . ':' . zget($lang->product->typeList, $product->type);?></span>
|
||||
<span class="label label-success label-outline"><?php echo $lang->product->status . ':' . $this->processStatus('product', $product);?></span>
|
||||
<?php if($product->deleted):?>
|
||||
<span class='label label-danger label-outline'><?php echo $lang->product->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($product->type == 'platform'):?>
|
||||
@@ -81,7 +74,7 @@
|
||||
<td><strong><?php echo formatTime($product->createdDate, DT_DATE1);?></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="w-80px"><?php echo $lang->product->status;?></th>
|
||||
<th class="w-80px"><?php echo $lang->productCommon . $lang->product->status;?></th>
|
||||
<td class="<?php echo $product->status;?>"><strong><?php echo zget($lang->product->statusList, $product->status);?></strong></td>
|
||||
<th><?php echo $lang->product->acl;?></th>
|
||||
<td><strong><?php echo $lang->product->aclList[$product->acl];?></strong></td>
|
||||
|
||||
@@ -921,6 +921,8 @@ class project extends control
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('group', "projectID=$projectID&programID=$programID")));
|
||||
}
|
||||
|
||||
$this->project->setMenu($projectID);
|
||||
|
||||
$group = $this->group->getById($groupID);
|
||||
|
||||
$this->view->title = $group->name . $this->lang->colon . $this->lang->group->manageView;
|
||||
@@ -991,6 +993,7 @@ class project extends control
|
||||
$this->view->changelogs = ',' . join(',', $changelog) . ',';
|
||||
$this->view->groupPrivs = $groupPrivs;
|
||||
$this->view->groupID = $groupID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->menu = $menu;
|
||||
$this->view->version = $version;
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ $lang->project->ev = 'EV';
|
||||
$lang->project->sv = 'SV%';
|
||||
$lang->project->ac = 'AC';
|
||||
$lang->project->cv = 'CV%';
|
||||
$lang->project->teamCount = '成员';
|
||||
$lang->project->teamCount = '人数';
|
||||
$lang->project->longTime = '长期';
|
||||
$lang->project->future = '待定';
|
||||
$lang->project->moreProject = '更多项目';
|
||||
|
||||
@@ -1607,8 +1607,9 @@ class projectModel extends model
|
||||
public function setMenu($objectID)
|
||||
{
|
||||
$project = $this->getByID($objectID);
|
||||
$this->lang->project->menu = $this->lang->{$project->model}->menu;
|
||||
$this->lang->project->menuOrder = $this->lang->{$project->model}->menuOrder;
|
||||
$this->lang->project->menu = $this->lang->{$project->model}->menu;
|
||||
$this->lang->project->menuOrder = $this->lang->{$project->model}->menuOrder;
|
||||
$this->lang->project->dividerMenu = $this->lang->{$project->model}->dividerMenu;
|
||||
|
||||
$this->lang->switcherMenu = $this->getSwitcher($objectID, $this->app->rawModule, $this->app->rawMethod);
|
||||
common::setMenuVars('project', $objectID);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
.checkbox-right{padding-left:0px !important;}
|
||||
|
||||
td.menus {border-right: 0;padding-right: 0;width: 220px !important;}
|
||||
td.menus + td {border-left: 0;}
|
||||
td.menus + td {border-left: 0;}
|
||||
.menus .checkbox-primary {float: left; width: 220px;}
|
||||
.menus .checkbox-primary:first-child {float: left; width: auto;}
|
||||
.menus a {margin-left: 10px;}
|
||||
@@ -67,8 +67,8 @@ td.menus + td {border-left: 0;}
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<span id='groupName'><i class='icon-lock'></i> <?php echo $group->name;?> <i class="icon icon-chevron-right"></i></span>
|
||||
<?php $params = "type=byGroup¶m=$groupID";?>
|
||||
<?php echo html::a(inlink('pgmmanagepriv', $params), "<span class='text'>{$lang->group->all}</span>", '', "class='btn btn-link btn-active-text'")?>
|
||||
<?php $params = "projectID=$projectID&type=byGroup¶m=$groupID";?>
|
||||
<?php echo html::a(inlink('managepriv', $params), "<span class='text'>{$lang->group->all}</span>", '', "class='btn btn-link btn-active-text'")?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-content'>
|
||||
@@ -164,7 +164,7 @@ $(document).ready(function()
|
||||
})
|
||||
|
||||
/**
|
||||
* 勾选浏览列表标签时,自动勾选下面的所有标签。
|
||||
* 勾选浏览列表标签时,自动勾选下面的所有标签。
|
||||
* Check all tabs when the Browse list tab is selected.
|
||||
*/
|
||||
$('.menus input[value=browse]').change(function()
|
||||
|
||||
@@ -52,14 +52,12 @@ class projectStory extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function track($productID = 0, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
public function track($projectID = 0, $productID = 0, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
if(empty($productID)) $productID = key($this->products);
|
||||
$products = $this->loadModel('product')->getProductPairsByProject($projectID);
|
||||
if(empty($productID)) $productID = key($products);
|
||||
|
||||
$this->lang->story->requirement = str_replace($this->lang->URCommon, $this->lang->URCommon, $this->lang->story->requirement);
|
||||
$this->lang->story->story = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->story);
|
||||
|
||||
echo $this->fetch('story', 'track', "productID=$productID&branch=$branch&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
echo $this->fetch('story', 'track', "productID=$productID&branch=$branch&projectID=$projectID&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,18 @@
|
||||
*/
|
||||
class search extends control
|
||||
{
|
||||
/**
|
||||
* Determine whether to display the effort object.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($module = '', $method = '')
|
||||
{
|
||||
parent::__construct($module, $method);
|
||||
if(!isset($this->config->maxVersion)) unset($this->lang->search->modules['effort']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build search form.
|
||||
*
|
||||
@@ -186,7 +198,6 @@ class search extends control
|
||||
if(empty($type)) $type = $this->post->type;
|
||||
if(empty($type) and ($recTotal != 0 or $pageID != 1)) $type = $this->session->searchIngType;
|
||||
$type = (empty($type) or $type[0] == 'all') ? 'all' : $type;
|
||||
//if($objectType != 'all') $type = explode('', $objectType);
|
||||
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $this->config->search->recPerPage, $pageID);
|
||||
|
||||
@@ -76,7 +76,7 @@ $lang->search->modules['bug'] = 'Bug';
|
||||
$lang->search->modules['case'] = '用例';
|
||||
$lang->search->modules['doc'] = '文档';
|
||||
$lang->search->modules['todo'] = '待办';
|
||||
$lang->search->modules['build'] = 'Build';
|
||||
$lang->search->modules['build'] = '版本';
|
||||
$lang->search->modules['effort'] = '日志';
|
||||
$lang->search->modules['caselib'] = '测试库';
|
||||
$lang->search->modules['product'] = $lang->productCommon;
|
||||
|
||||
+36
-24
@@ -14,10 +14,10 @@
|
||||
class settingModel extends model
|
||||
{
|
||||
//-------------------------------- methods for get, set and delete setting items. ----------------------------//
|
||||
|
||||
|
||||
/**
|
||||
* Get value of an item.
|
||||
*
|
||||
*
|
||||
* @param string $paramString see parseItemParam();
|
||||
* @access public
|
||||
* @return misc
|
||||
@@ -29,7 +29,7 @@ class settingModel extends model
|
||||
|
||||
/**
|
||||
* Get some items.
|
||||
*
|
||||
*
|
||||
* @param string $paramString see parseItemParam();
|
||||
* @access public
|
||||
* @return array
|
||||
@@ -40,10 +40,10 @@ class settingModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Set value of an item.
|
||||
*
|
||||
* @param string $path system.common.global.sn or system.common.sn
|
||||
* @param string $value
|
||||
* Set value of an item.
|
||||
*
|
||||
* @param string $path system.common.global.sn or system.common.sn
|
||||
* @param string $value
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -78,12 +78,12 @@ class settingModel extends model
|
||||
|
||||
/**
|
||||
* Batch set items, the example:
|
||||
*
|
||||
*
|
||||
* $path = 'system.mail';
|
||||
* $items->turnon = true;
|
||||
* $items->smtp->host = 'localhost';
|
||||
*
|
||||
* @param string $path like system.mail
|
||||
* @param string $path like system.mail
|
||||
* @param array|object $items the items array or object, can be mixed by one level or two levels.
|
||||
* @access public
|
||||
* @return bool
|
||||
@@ -112,7 +112,7 @@ class settingModel extends model
|
||||
|
||||
/**
|
||||
* Delete items.
|
||||
*
|
||||
*
|
||||
* @param string $paramString see parseItemParam();
|
||||
* @access public
|
||||
* @return void
|
||||
@@ -124,7 +124,7 @@ class settingModel extends model
|
||||
|
||||
/**
|
||||
* Parse the param string for select or delete items.
|
||||
*
|
||||
*
|
||||
* @param string $paramString owner=xxx&key=sn and so on.
|
||||
* @access public
|
||||
* @return array
|
||||
@@ -132,7 +132,7 @@ class settingModel extends model
|
||||
public function parseItemParam($paramString)
|
||||
{
|
||||
/* Parse the param string into array. */
|
||||
parse_str($paramString, $params);
|
||||
parse_str($paramString, $params);
|
||||
|
||||
/* Init fields not set in the param string. */
|
||||
$fields = 'owner,module,section,key';
|
||||
@@ -144,7 +144,7 @@ class settingModel extends model
|
||||
|
||||
/**
|
||||
* Create a DAO object to select or delete one or more records.
|
||||
*
|
||||
*
|
||||
* @param array $params the params parsed by parseItemParam() method.
|
||||
* @param string $method select|delete.
|
||||
* @access public
|
||||
@@ -162,7 +162,7 @@ class settingModel extends model
|
||||
/**
|
||||
* Get config of system and one user.
|
||||
*
|
||||
* @param string $account
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -189,10 +189,10 @@ class settingModel extends model
|
||||
}
|
||||
|
||||
//-------------------------------- methods for version and sn. ----------------------------//
|
||||
|
||||
|
||||
/**
|
||||
* Get the version of current zentaopms.
|
||||
*
|
||||
*
|
||||
* Since the version field not saved in db. So if empty, return 0.3 beta.
|
||||
*
|
||||
* @access public
|
||||
@@ -206,9 +206,21 @@ class settingModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Update version
|
||||
*
|
||||
* @param string $version
|
||||
* Get URSR.
|
||||
*
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getURSR()
|
||||
{
|
||||
if(isset($this->config->URSR)) return $this->config->URSR;
|
||||
return $this->getItem('owner=system&module=custom&key=URSR');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update version
|
||||
*
|
||||
* @param string $version
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -219,7 +231,7 @@ class settingModel extends model
|
||||
|
||||
/**
|
||||
* Set the sn of current zentaopms.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -231,8 +243,8 @@ class settingModel extends model
|
||||
|
||||
/**
|
||||
* Compute a SN. Use the server ip, and server software string as seed, and an rand number, two micro time
|
||||
*
|
||||
* Note: this sn just to unique this zentaopms. No any private info.
|
||||
*
|
||||
* Note: this sn just to unique this zentaopms. No any private info.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
@@ -246,8 +258,8 @@ class settingModel extends model
|
||||
|
||||
/**
|
||||
* Judge a sn needed update or not.
|
||||
*
|
||||
* @param string $sn
|
||||
*
|
||||
* @param string $sn
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
@@ -1380,10 +1380,10 @@ class story extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function track($productID, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
public function track($productID, $branch = 0, $projectID = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* Set menu. The projectstory module does not execute. */
|
||||
if($this->app->rawModule == 'story')
|
||||
if(!$projectID)
|
||||
{
|
||||
$products = $this->product->getPairs();
|
||||
$productID = $this->product->saveState($productID, $products);
|
||||
@@ -1403,7 +1403,11 @@ class story extends control
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$tracks = $this->story->getTracks($productID, $branch, $pager);
|
||||
|
||||
if($this->app->rawModule == 'projectstory') $projectProducts = $this->product->getProducts($this->session->project);
|
||||
if($projectID)
|
||||
{
|
||||
$this->loadModel('project')->setMenu($projectID);
|
||||
$projectProducts = $this->product->getProducts($projectID);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->story->track;
|
||||
$this->view->position[] = $this->lang->story->track;
|
||||
|
||||
@@ -3484,7 +3484,7 @@ class storyModel extends model
|
||||
common::printIcon('story', 'review', $vars . "&from=$story->from", $story, 'list', 'search', '', '', false, "data-group=$story->from");
|
||||
common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('story', 'edit', $vars . "&from=$story->from", $story, 'list', '', '', '', false, "data-group=$story->from");
|
||||
common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap');
|
||||
common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', '', false, "data-app='qa'");
|
||||
common::printIcon('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&storyID=$story->id", $story, 'list', 'split', '', '', '', '', $this->lang->story->subdivide);
|
||||
if($this->app->rawModule == 'projectstory') common::printIcon('projectstory', 'unlinkStory', "projectID={$this->session->project}&storyID=$story->id", '', 'list', 'unlink', 'hiddenwin');
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<?php printf('%03d', $story->id);?>
|
||||
</td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri)?></span></td>
|
||||
<td class='text-left' title="<?php echo $story->title?>"><nobr><?php echo html::a($viewLink, $story->title, '', "data-app='{$this->app->openApp}'");?></nobr></td>
|
||||
<td class='text-left' title="<?php echo $story->title?>"><nobr><?php echo html::a($viewLink, $story->title, '', "data-app='product'");?></nobr></td>
|
||||
<td title="<?php echo $story->planTitle?>"><?php echo $story->planTitle;?></td>
|
||||
<td><?php echo $lang->story->sourceList[$story->source];?></td>
|
||||
<td><?php echo zget($users, $story->openedBy);?></td>
|
||||
|
||||
@@ -273,6 +273,10 @@ class testcase extends control
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($this->session->execution);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->qa->setMenu($this->products, $productID, $branch);
|
||||
}
|
||||
|
||||
$testcaseID = ($from and strpos('testcase|work|contribute', $from)) ? $param : 0;
|
||||
$bugID = $from == 'bug' ? $param : 0;
|
||||
|
||||
@@ -423,7 +423,6 @@ class todo extends control
|
||||
else
|
||||
{
|
||||
$this->todo->delete(TABLE_TODO, $todoID);
|
||||
$this->loadModel('action')->create('todo', $todoID, 'erased');
|
||||
|
||||
/* if ajax request, send result. */
|
||||
if($this->server->ajax)
|
||||
|
||||
Reference in New Issue
Block a user