Merge branch '15.0.beta3' of http://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
+13
-11
@@ -28,17 +28,19 @@ class action extends control
|
||||
|
||||
/* Save session. */
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->session->set('productList', $uri);
|
||||
$this->session->set('productPlanList', $uri);
|
||||
$this->session->set('releaseList', $uri);
|
||||
$this->session->set('storyList', $uri);
|
||||
$this->session->set('projectList', $uri);
|
||||
$this->session->set('taskList', $uri);
|
||||
$this->session->set('buildList', $uri);
|
||||
$this->session->set('bugList', $uri);
|
||||
$this->session->set('caseList', $uri);
|
||||
$this->session->set('testtaskList', $uri);
|
||||
$this->session->set('docList', $uri);
|
||||
$this->session->set('productList', $uri, 'product');
|
||||
$this->session->set('productPlanList', $uri, 'product');
|
||||
$this->session->set('storyList', $uri, 'product');
|
||||
$this->session->set('releaseList', $uri, 'execution');
|
||||
$this->session->set('programList', $uri, 'program');
|
||||
$this->session->set('projectList', $uri, 'project');
|
||||
$this->session->set('executionList', $uri, 'execution');
|
||||
$this->session->set('taskList', $uri, 'execution');
|
||||
$this->session->set('buildList', $uri, 'execution');
|
||||
$this->session->set('bugList', $uri, 'qa');
|
||||
$this->session->set('caseList', $uri, 'qa');
|
||||
$this->session->set('testtaskList', $uri, 'qa');
|
||||
$this->session->set('docList', $uri, 'doc');
|
||||
|
||||
/* Get deleted objects. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* @version $Id: zh-cn.php 4955 2013-07-02 01:47:21Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
global $config;
|
||||
|
||||
$lang->action->common = '系统日志';
|
||||
$lang->action->product = $lang->productCommon;
|
||||
$lang->action->project = '项目';
|
||||
@@ -73,7 +75,7 @@ $lang->action->objectTypes['productplan'] = '计划';
|
||||
$lang->action->objectTypes['release'] = '发布';
|
||||
$lang->action->objectTypes['program'] = '项目集';
|
||||
$lang->action->objectTypes['project'] = '项目';
|
||||
$lang->action->objectTypes['execution'] = $lang->executionCommon;
|
||||
$lang->action->objectTypes['execution'] = $config->systemMode == 'new' ? '执行' : $lang->executionCommon;
|
||||
$lang->action->objectTypes['task'] = '任务';
|
||||
$lang->action->objectTypes['build'] = '版本';
|
||||
$lang->action->objectTypes['job'] = '构建';
|
||||
@@ -427,7 +429,6 @@ $lang->action->dynamicAction->entry['created'] = '添加应用';
|
||||
$lang->action->dynamicAction->entry['edited'] = '编辑应用';
|
||||
|
||||
/* 用来生成相应对象的链接。*/
|
||||
global $config;
|
||||
$lang->action->label->product = $lang->productCommon . '|product|view|productID=%s';
|
||||
$lang->action->label->productplan = "计划|productplan|view|productID=%s";
|
||||
$lang->action->label->release = '发布|release|view|productID=%s';
|
||||
|
||||
@@ -501,7 +501,7 @@ class actionModel extends model
|
||||
|
||||
foreach($typeTrashes as $objectType => $objectIds)
|
||||
{
|
||||
if(!isset($this->config->objectTables[$objectType]))continue;
|
||||
if(!isset($this->config->objectTables[$objectType])) continue;
|
||||
|
||||
$objectIds = array_unique($objectIds);
|
||||
$table = $this->config->objectTables[$objectType];
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('system');?></div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php if($type == 'hidden') echo html::a(inLink('trash', "type=all"), $lang->goback, '', "class='btn'");?>
|
||||
<?php if($type == 'all') echo html::a(inLink('trash', "type=hidden"), "<i class='icon-eye-close'></i> " . $lang->action->dynamic->hidden, '', "class='btn btn-danger'");?>
|
||||
@@ -36,10 +35,10 @@
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-130px'><?php common::printOrderLink('objectType', $orderBy, $vars, $lang->action->objectType);?></th>
|
||||
<th class='w-id'> <?php common::printOrderLink('objectID', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='w-id'><?php common::printOrderLink('objectID', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th><?php echo $lang->action->objectName;?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('actor', $orderBy, $vars, $lang->action->actor);?></th>
|
||||
<th class='w-150px'><?php common::printOrderLink('date', $orderBy, $vars, $lang->action->date);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('actor', $orderBy, $vars, $lang->action->actor);?></th>
|
||||
<th class='w-150px'><?php common::printOrderLink('date', $orderBy, $vars, $lang->action->date);?></th>
|
||||
<th class='w-100px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -205,16 +205,17 @@ class block extends control
|
||||
*
|
||||
* @param string $module
|
||||
* @param string $type
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function dashboard($module, $type = '')
|
||||
public function dashboard($module, $type = '', $projectID = 0)
|
||||
{
|
||||
if($this->loadModel('user')->isLogon()) $this->session->set('blockModule', $module);
|
||||
$blocks = $this->block->getBlockList($module, $type);
|
||||
|
||||
$commonField = 'common';
|
||||
if($module == 'project')
|
||||
if($module == 'project' and $projectID)
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($this->session->project);
|
||||
$commonField = $project->model . 'common';
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-name w-100px'><?php echo $lang->project->name;?></th>
|
||||
<th class='w-100px'><?php echo $lang->program->PM;?></th>
|
||||
<th class='w-80px'><?php echo $lang->program->status;?></th>
|
||||
<th class='w-80px'><?php echo $lang->program->PM;?></th>
|
||||
<th class='w-60px'><?php echo $lang->program->status;?></th>
|
||||
<?php if($longBlock):?>
|
||||
<th class='w-60px'><?php echo $lang->program->teamCount;?></th>
|
||||
<th class='w-90px'><?php echo $lang->program->teamCount;?></th>
|
||||
<th class='w-90px text-right'><?php echo $lang->task->consumed;?></th>
|
||||
<th class='w-80px text-right'><?php echo $lang->program->budget;?></th>
|
||||
<th class='w-80px'><?php echo $lang->project->leftStories;?></th>
|
||||
|
||||
@@ -40,14 +40,21 @@ class build extends control
|
||||
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
$model = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch('model');
|
||||
$this->lang->project->menu = $this->lang->$model->menu;
|
||||
$this->lang->project->menuOrder = $this->lang->$model->menuOrder;
|
||||
commonModel::setMenuVars('project', $projectID);
|
||||
|
||||
$executions = $this->execution->getPairs($projectID);
|
||||
$executionID = isset($executions[$this->session->executionID]) ? $this->session->executionID : key($executions);
|
||||
$this->session->set('executionID', 0);
|
||||
$this->session->set('PRJ', $projectID);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
{
|
||||
$executions = $this->execution->getPairs($execution->project);
|
||||
$this->execution->setMenu($executionID);
|
||||
$this->session->set('project', $execution->project);
|
||||
}
|
||||
|
||||
$productGroups = $this->execution->getProducts($executionID);
|
||||
@@ -103,6 +110,14 @@ class build extends control
|
||||
$this->loadModel('product');
|
||||
$build = $this->build->getById((int)$buildID);
|
||||
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
$model = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($build->project)->fetch('model');
|
||||
$this->lang->project->menu = $this->lang->$model->menu;
|
||||
$this->lang->project->menuOrder = $this->lang->$model->menuOrder;
|
||||
commonModel::setMenuVars('project', $build->project);
|
||||
}
|
||||
|
||||
/* Set menu. */
|
||||
$this->execution->setMenu($this->execution->getPairs($build->project), $build->execution);
|
||||
|
||||
@@ -164,10 +179,19 @@ class build extends control
|
||||
*/
|
||||
public function view($buildID, $type = 'story', $link = 'false', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 100, $pageID = 1)
|
||||
{
|
||||
|
||||
$build = $this->build->getByID((int)$buildID, true);
|
||||
if(!$build) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
$this->session->PRJ = $build->project;
|
||||
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
$model = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($build->project)->fetch('model');
|
||||
$this->lang->project->menu = $this->lang->$model->menu;
|
||||
$this->lang->project->menuOrder = $this->lang->$model->menuOrder;
|
||||
commonModel::setMenuVars('project', $build->project);
|
||||
}
|
||||
|
||||
/* Set session and load modules. */
|
||||
if($type == 'story')$this->session->set('storyList', $this->app->getURI(true));
|
||||
if($type == 'bug') $this->session->set('bugList', $this->app->getURI(true));
|
||||
@@ -199,7 +223,7 @@ class build extends control
|
||||
foreach($stages as $storyID => $stage)$stories[$storyID]->stage = $stage;
|
||||
|
||||
/* Set menu. */
|
||||
commonModel::setAppObjectID('execution', $build->execution);
|
||||
commonModel::setMenuVars('execution', $build->execution);
|
||||
$executions = $this->loadModel('execution')->getPairs($this->session->PRJ, 'all', 'empty');
|
||||
|
||||
$this->view->title = "BUILD #$build->id $build->name - " . $executions[$build->execution];
|
||||
@@ -550,7 +574,7 @@ class build extends control
|
||||
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$allBugs = $this->bug->getBySearch($build->product, $build->branch, $queryID, 'id_desc', $build->bugs, $pager);
|
||||
$allBugs = $this->bug->getBySearch($build->product, $build->branch, $queryID, 'id_desc', $build->bugs, $pager, $build->project);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -863,17 +863,10 @@ $lang->icons['score'] = 'tint';
|
||||
/* Scrum menu. */
|
||||
$lang->menu = new stdclass();
|
||||
$lang->menu->scrum = new stdclass();
|
||||
<<<<<<< Updated upstream
|
||||
$lang->menu->scrum->index = 'Index|project|index|project={PROJECT}';
|
||||
$lang->menu->scrum->project = "$lang->executionCommon|project|index|locate=no";
|
||||
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|', 'subModule' => 'story', 'alias' => 'story,track');
|
||||
$lang->menu->scrum->doc = 'Doc|doc|index|';
|
||||
=======
|
||||
$lang->menu->scrum->index = 'Index|project|index|project=%s';
|
||||
$lang->menu->scrum->project = array('link' => "$lang->executionCommon|project|index|locate=no");
|
||||
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|project=%s', 'subModule' => 'story', 'alias' => 'story,track');
|
||||
$lang->menu->scrum->doc = array('link' => 'Doc|doc|objectLibs|type=project&objectID=%s', 'subModule' => 'doc');
|
||||
>>>>>>> Stashed changes
|
||||
$lang->menu->scrum->qa = 'QA|qa|index';
|
||||
$lang->menu->scrum->ci = 'Code|repo|browse';
|
||||
$lang->menu->scrum->build = array('link' => 'Build|project|build|project=%s');
|
||||
|
||||
@@ -2038,9 +2038,9 @@ class execution extends control
|
||||
{
|
||||
/* Delete execution. */
|
||||
$this->dao->update(TABLE_EXECUTION)->set('deleted')->eq(1)->where('id')->eq($executionID)->exec();
|
||||
$this->loadModel('action')->create($this->objectType, $executionID, 'deleted', '', $extra = ACTIONMODEL::CAN_UNDELETED);
|
||||
$this->dao->update(TABLE_DOCLIB)->set('deleted')->eq(1)->where('execution')->eq($executionID)->exec();
|
||||
$this->loadModel('action')->create('execution', $executionID, 'deleted', '', ACTIONMODEL::CAN_UNDELETED);
|
||||
$this->execution->updateUserView($executionID);
|
||||
|
||||
$this->session->set('execution', '');
|
||||
$this->executeHooks($executionID);
|
||||
die(js::locate(inlink('index'), 'parent'));
|
||||
@@ -2554,7 +2554,7 @@ class execution extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetDropMenu($module, $method, $extra)
|
||||
public function ajaxGetDropMenu($executionID, $module, $method, $extra)
|
||||
{
|
||||
$projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->in($this->app->user->view->projects)->andWhere('deleted')->eq(0)->orderBy('order_desc')->fetchAll('id');
|
||||
|
||||
@@ -2582,6 +2582,7 @@ class execution extends control
|
||||
$this->view->link = $this->execution->getLink($module, $method, $extra);
|
||||
$this->view->module = $module;
|
||||
$this->view->method = $method;
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->extra = $extra;
|
||||
$this->view->projects = $this->project->getPairsByModel();
|
||||
$this->view->executions = $orderedExecutions;
|
||||
|
||||
@@ -139,7 +139,7 @@ class executionModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
$dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "module=$currentModule&method=$currentMethod&extra=$extra");
|
||||
$dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "executionID=$executionID&module=$currentModule&method=$currentMethod&extra=$extra");
|
||||
$currentExecutionName = '';
|
||||
if(isset($currentExecution->name)) $currentExecutionName = $currentExecution->name;
|
||||
|
||||
@@ -850,7 +850,7 @@ class executionModel extends model
|
||||
$currentExecutionName = $currentExecution->name;
|
||||
}
|
||||
|
||||
$dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "module=$currentModule&method=$currentMethod&extra=");
|
||||
$dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "executionID=$executionID&module=$currentModule&method=$currentMethod&extra=");
|
||||
$output = "<div class='btn-group header-btn'><i class='icon icon-run'></i> {$this->lang->execution->common}</div> ";
|
||||
$output .= "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentExecutionName}'><span class='text'>{$currentExecutionName}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
|
||||
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
|
||||
@@ -2444,8 +2444,8 @@ class executionModel extends model
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t2.status')->ne('closed')
|
||||
->andWhere('t2.stage')->in('wait,planned,executioned,developing')
|
||||
->groupBy('execution')
|
||||
->fetchAll('execution');
|
||||
->groupBy('project')
|
||||
->fetchAll('project');
|
||||
|
||||
foreach($burns as $executionID => $burn)
|
||||
{
|
||||
|
||||
@@ -20,33 +20,34 @@ $executionsPinYin = common::convert2Pinyin($executionNames);
|
||||
|
||||
foreach($executions as $execution)
|
||||
{
|
||||
$selected = $execution->id == $executionID ? 'selected' : '';
|
||||
$executionName = zget($projects, $execution->project) . '/' . $execution->name;
|
||||
if($execution->status != 'done' and $execution->status != 'closed' and $execution->PM == $this->app->user->account)
|
||||
{
|
||||
$myProjectsHtml .= html::a(sprintf($link, $execution->id), "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " . $executionName, '', "class='text-important' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
|
||||
$myProjectsHtml .= html::a(sprintf($link, $execution->id), "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " . $executionName, '', "class='text-important $selected' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
|
||||
}
|
||||
else if($execution->status != 'done' and $execution->status != 'closed' and !($execution->PM == $this->app->user->account))
|
||||
{
|
||||
$normalProjectsHtml .= html::a(sprintf($link, $execution->id), "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " . $executionName, '', "title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
|
||||
$normalProjectsHtml .= html::a(sprintf($link, $execution->id), "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " . $executionName, '', "class='$selected' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
|
||||
}
|
||||
else if($execution->status == 'done' or $execution->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $execution->id), "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " . $executionName, '', "title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
|
||||
else if($execution->status == 'done' or $execution->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $execution->id), "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " . $executionName, '', "class='$selected' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
|
||||
}
|
||||
?>
|
||||
<div class="table-row">
|
||||
<div class="table-col col-left">
|
||||
<div class='list-group'>
|
||||
<?php
|
||||
if(!empty($myProjectsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->execution->mine}</div>";
|
||||
echo $myProjectsHtml;
|
||||
if(!empty($myProjectsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->execution->other}</div>";
|
||||
}
|
||||
}
|
||||
echo $normalProjectsHtml;
|
||||
?>
|
||||
<?php
|
||||
if(!empty($myProjectsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->execution->mine}</div>";
|
||||
echo $myProjectsHtml;
|
||||
if(!empty($myProjectsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->execution->other}</div>";
|
||||
}
|
||||
}
|
||||
echo $normalProjectsHtml;
|
||||
?>
|
||||
</div>
|
||||
<div class="col-footer">
|
||||
<?php //echo html::a(helper::createLink('execution', 'all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->execution->all, '', 'class="not-list-item"'); ?>
|
||||
@@ -54,10 +55,15 @@ foreach($executions as $execution)
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-col col-right">
|
||||
<div class='list-group'>
|
||||
<?php
|
||||
echo $closedProjectsHtml;
|
||||
?>
|
||||
</div>
|
||||
<div class='list-group'><?php echo $closedProjectsHtml;?></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
if($('#dropMenu .table-row .col-left .list-group .selected').length > 0)
|
||||
{
|
||||
$('#dropMenu .table-row .col-left .list-group').scrollTop($('#dropMenu .table-row .col-left .list-group .selected').position().top - 75);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -883,7 +883,7 @@ class my extends control
|
||||
$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';
|
||||
$this->view->executionLink = isset($this->config->executionLink) ? $this->config->executionLink : 'execution-task';
|
||||
//$this->view->executionLink = isset($this->config->executionLink) ? $this->config->executionLink : 'execution-task';
|
||||
$this->view->preferenceSetted = isset($this->config->preferenceSetted) ? true : false;
|
||||
|
||||
$this->display();
|
||||
|
||||
@@ -55,10 +55,12 @@ html,body {height: 100%;}
|
||||
<td><?php echo html::select('projectLink', $lang->my->projectLinkList, $projectLink, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<!--
|
||||
<tr>
|
||||
<th><?php echo $lang->my->executionLink;?></th>
|
||||
<td><?php echo html::select('executionLink', $lang->my->executionLinkList, $executionLink, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
<td colspan='2' class='text-center form-actions'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
|
||||
@@ -134,6 +134,7 @@ class product extends control
|
||||
$this->loadModel('execution');
|
||||
|
||||
/* Set product, module and query. */
|
||||
$productID = $this->app->openApp != 'project' ? $this->product->saveState($productID, $this->products) : $productID;
|
||||
$branch = ($branch === '') ? (int)$this->cookie->preBranch : (int)$branch;
|
||||
setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
@@ -22,43 +22,44 @@ $closedProductsHtml = '';
|
||||
|
||||
foreach($products as $product)
|
||||
{
|
||||
$selected = $product->id == $productID ? 'selected' : '';
|
||||
$productName = $product->program ? zget($programs, $product->program, '') . '/' : '';
|
||||
$productName .= $product->line ? zget($lines, $product->line, '') . '/' . $product->name : $product->name;
|
||||
if($product->status == 'normal' and $product->PO == $this->app->user->account)
|
||||
{
|
||||
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
|
||||
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id);
|
||||
$myProductsHtml .= html::a($linkHtml, $productName, '', "class='text-important' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'");
|
||||
$myProductsHtml .= html::a($linkHtml, $productName, '', "class='text-important $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'");
|
||||
}
|
||||
else if($product->status == 'normal' and !($product->PO == $this->app->user->account))
|
||||
{
|
||||
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
|
||||
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id);
|
||||
$normalProductsHtml .= html::a($linkHtml, $productName, '', "title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'");
|
||||
$normalProductsHtml .= html::a($linkHtml, $productName, '', "class='$selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'");
|
||||
}
|
||||
else if($product->status == 'closed')
|
||||
{
|
||||
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
|
||||
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $objectID);
|
||||
$closedProductsHtml .= html::a($linkHtml, $productName, '', "title='{$productName}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'");
|
||||
$closedProductsHtml .= html::a($linkHtml, $productName, '', "class='$selected' title='{$productName}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="table-row">
|
||||
<div class="table-col col-left">
|
||||
<div class='list-group'>
|
||||
<?php
|
||||
if(!empty($myProductsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->product->mine}</div>";
|
||||
echo $myProductsHtml;
|
||||
if(!empty($myProductsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->product->other}</div>";
|
||||
}
|
||||
}
|
||||
echo $normalProductsHtml;
|
||||
?>
|
||||
<?php
|
||||
if(!empty($myProductsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->product->mine}</div>";
|
||||
echo $myProductsHtml;
|
||||
if(!empty($myProductsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->product->other}</div>";
|
||||
}
|
||||
}
|
||||
echo $normalProductsHtml;
|
||||
?>
|
||||
</div>
|
||||
<div class="col-footer">
|
||||
<?php //echo html::a(helper::createLink('product', 'all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->product->all, '', 'class="not-list-item"'); ?>
|
||||
@@ -67,8 +68,15 @@ foreach($products as $product)
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-col col-right">
|
||||
<div class='list-group'>
|
||||
<?php echo $closedProductsHtml;?>
|
||||
</div>
|
||||
<div class='list-group'><?php echo $closedProductsHtml;?></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
if($('#dropMenu .table-row .col-left .list-group .selected').length > 0)
|
||||
{
|
||||
$('#dropMenu .table-row .col-left .list-group').scrollTop($('#dropMenu .table-row .col-left .list-group .selected').position().top - 75);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -47,7 +47,7 @@ class program extends control
|
||||
|
||||
if(common::hasPriv('program', 'create')) $this->lang->pageActions = html::a($this->createLink('program', 'create'), "<i class='icon icon-sm icon-plus'></i> " . $this->lang->program->create, '', "class='btn btn-secondary'");
|
||||
|
||||
$this->app->session->set('programList', $this->app->getURI(true));
|
||||
$this->session->set('programList', $this->app->getURI(true));
|
||||
|
||||
$programType = $this->cookie->programType ? $this->cookie->programType : 'bylist';
|
||||
|
||||
@@ -368,7 +368,7 @@ class program extends control
|
||||
if($confirm == 'no') die(js::confirm($this->lang->program->confirmDelete, $this->createLink('program', 'delete', "programID=$programID&confirm=yes")));
|
||||
|
||||
$this->dao->update(TABLE_PROGRAM)->set('deleted')->eq(1)->where('id')->eq($programID)->exec();
|
||||
$this->loadModel('action')->create('program', $programID, 'deleted', '', $extra = ACTIONMODEL::CAN_UNDELETED);
|
||||
$this->loadModel('action')->create('program', $programID, 'deleted', '', ACTIONMODEL::CAN_UNDELETED);
|
||||
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ $config->project->datatable->fieldList['budget']['required'] = 'yes';
|
||||
|
||||
$config->project->datatable->fieldList['teamCount']['title'] = 'teamCount';
|
||||
$config->project->datatable->fieldList['teamCount']['fixed'] = 'no';
|
||||
$config->project->datatable->fieldList['teamCount']['width'] = '40';
|
||||
$config->project->datatable->fieldList['teamCount']['width'] = '70';
|
||||
$config->project->datatable->fieldList['teamCount']['required'] = 'no';
|
||||
$config->project->datatable->fieldList['teamCount']['sort'] = 'no';
|
||||
|
||||
|
||||
@@ -1325,13 +1325,22 @@ class project extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$projectIdList = $this->project->getExecutionsByProject($projectID);
|
||||
$this->project->delete(TABLE_PROJECT, $projectID);
|
||||
$this->dao->update(TABLE_PROJECT)->set('deleted')->eq(1)->where('id')->in(array_keys($projectIdList))->exec();
|
||||
$this->dao->update(TABLE_DOCLIB)->set('deleted')->eq(1)->where('project')->eq($projectID)->exec();
|
||||
$this->project->updateUserView($projectID);
|
||||
$this->session->set('project', '');
|
||||
$this->loadModel('user');
|
||||
$this->loadModel('action');
|
||||
|
||||
$this->project->delete(TABLE_PROJECT, $projectID);
|
||||
$this->dao->update(TABLE_DOCLIB)->set('deleted')->eq(1)->where('execution')->eq($projectID)->exec();
|
||||
$this->user->updateUserView($projectID, 'project');
|
||||
|
||||
/* Delete the execution under the project. */
|
||||
$executionIdList = $this->execution->getByProject($projectID);
|
||||
if(empty($executionIdList)) die(js::reload('parent'));
|
||||
|
||||
$this->dao->update(TABLE_EXECUTION)->set('deleted')->eq(1)->where('id')->in(array_keys($executionIdList))->exec();
|
||||
foreach($executionIdList as $executionID => $execution) $this->action->create('execution', $executionID, 'deleted', '', ACTIONMODEL::CAN_UNDELETED);
|
||||
$this->user->updateUserView($executionIdList, 'sprint');
|
||||
|
||||
$this->session->set('project', '');
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ $lang->project->errorSameProducts = '项目不能关联多个相同的产品。'
|
||||
$lang->project->errorNoProducts = '最少关联一个产品';
|
||||
$lang->project->copyNoProject = '没有可用的项目来复制';
|
||||
$lang->project->searchByName = '输入项目名称进行检索';
|
||||
$lang->project->deleted = '已删除';
|
||||
|
||||
/* Fields. */
|
||||
$lang->project->common = '项目';
|
||||
|
||||
@@ -20,34 +20,35 @@ $projectsPinYin = common::convert2Pinyin($projectNames);
|
||||
|
||||
foreach($projects as $project)
|
||||
{
|
||||
$link = helper::createLink('project', 'index', "projectID=%s", '', '', $project->id);
|
||||
$selected = $project->id == $projectID ? 'selected' : '';
|
||||
$link = helper::createLink('project', 'index', "projectID=%s", '', '', $project->id);
|
||||
$projectName = zget($programs, $project->parent, '') ? zget($programs, $project->parent) . '/' . $project->name : $project->name;
|
||||
if($project->status != 'done' and $project->status != 'closed' and $project->PM == $this->app->user->account)
|
||||
{
|
||||
$myProjectsHtml .= html::a(sprintf($link, $project->id), $projectName, '', "class='text-important' title='{$projectName}' data-key='" . zget($projectsPinYin, $projectName, '') . "'");
|
||||
$myProjectsHtml .= html::a(sprintf($link, $project->id), $projectName, '', "class='text-important $selected' title='{$projectName}' data-key='" . zget($projectsPinYin, $projectName, '') . "'");
|
||||
}
|
||||
else if($project->status != 'done' and $project->status != 'closed' and !($project->PM == $this->app->user->account))
|
||||
{
|
||||
$normalProjectsHtml .= html::a(sprintf($link, $project->id), $projectName, '', "title='{$projectName}' data-key='" . zget($projectsPinYin, $projectName, '') . "'");
|
||||
$normalProjectsHtml .= html::a(sprintf($link, $project->id), $projectName, '', "class='$selected' title='{$projectName}' data-key='" . zget($projectsPinYin, $projectName, '') . "'");
|
||||
}
|
||||
else if($project->status == 'done' or $project->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $project->id), $projectName, '', "title='{$projectName}' data-key='" . zget($projectsPinYin, $projectName, '') . "'");
|
||||
else if($project->status == 'done' or $project->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $project->id), $projectName, '', "class='$selected' title='{$projectName}' data-key='" . zget($projectsPinYin, $projectName, '') . "'");
|
||||
}
|
||||
?>
|
||||
<div class="table-row">
|
||||
<div class="table-col col-left">
|
||||
<div class='list-group'>
|
||||
<?php
|
||||
if(!empty($myProjectsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->project->myProject}</div>";
|
||||
echo $myProjectsHtml;
|
||||
if(!empty($myProjectsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->project->other}</div>";
|
||||
}
|
||||
}
|
||||
echo $normalProjectsHtml;
|
||||
?>
|
||||
<?php
|
||||
if(!empty($myProjectsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->project->myProject}</div>";
|
||||
echo $myProjectsHtml;
|
||||
if(!empty($myProjectsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->project->other}</div>";
|
||||
}
|
||||
}
|
||||
echo $normalProjectsHtml;
|
||||
?>
|
||||
</div>
|
||||
<div class="col-footer">
|
||||
<?php //echo html::a(helper::createLink('project', 'browse', 'programID=0&browseType=all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->project->all, '', 'class="not-list-item"'); ?>
|
||||
@@ -55,10 +56,15 @@ foreach($projects as $project)
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-col col-right">
|
||||
<div class='list-group'>
|
||||
<?php
|
||||
echo $closedProjectsHtml;
|
||||
?>
|
||||
</div>
|
||||
<div class='list-group'><?php echo $closedProjectsHtml;?></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
if($('#dropMenu .table-row .col-left .list-group .selected') > 0)
|
||||
{
|
||||
$('#dropMenu .table-row .col-left .list-group').scrollTop($('#dropMenu .table-row .col-left .list-group .selected').position().top - 75);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -60,11 +60,11 @@
|
||||
<?php foreach($projectBuilds as $productID => $builds):?>
|
||||
<?php foreach($builds as $index => $build):?>
|
||||
<tr data-id="<?php echo $productID;?>">
|
||||
<td class="c-id-sm text-muted"><?php echo html::a(helper::createLink('build', 'view', "buildID=$build->id"), sprintf('%03d', $build->id));?></td>
|
||||
<td class="c-id-sm text-muted"><?php echo html::a(helper::createLink('build', 'view', "buildID=$build->id"), sprintf('%03d', $build->id), '', "data-app='project'");?></td>
|
||||
<td class="c-name text-left" title='<?php echo $build->productName;?>'><?php echo $build->productName;?></td>
|
||||
<td class="c-name">
|
||||
<?php if($build->branchName) echo "<span class='label label-outline label-badge'>{$build->branchName}</span>"?>
|
||||
<?php echo html::a($this->createLink('build', 'view', "build=$build->id"), $build->name);?>
|
||||
<?php echo html::a($this->createLink('build', 'view', "build=$build->id"), $build->name, '', "data-app='project'");?>
|
||||
</td>
|
||||
<td class="c-name text-left" title='<?php echo $build->executionName;?>'><?php echo $build->executionName;?></td>
|
||||
<td class="c-url" title="<?php echo $build->scmPath?>"><?php echo strpos($build->scmPath, 'http') === 0 ? html::a($build->scmPath) : $build->scmPath;?></td>
|
||||
@@ -79,7 +79,7 @@
|
||||
}
|
||||
common::printIcon('testtask', 'create', "product=$build->product&executionID={$build->execution}&build=$build->id&projectID=$projectID", $build, 'list', 'bullhorn', '', '', '', "data-app='execution'");
|
||||
$lang->project->bug = $lang->execution->viewBug;
|
||||
common::printIcon('execution', 'bug', "project={$build->execution}&orderBy=status&build=$build->id", $build, 'list', '', '', '', '', "data-app='execution'");
|
||||
common::printIcon('build', 'view', "buildID=$build->id&type=generatedBug", $build, 'list', 'bug', '', '', '', "data-app='project'");
|
||||
common::printIcon('build', 'edit', "buildID=$build->id", $build, 'list');
|
||||
if(common::hasPriv('build', 'delete', $build))
|
||||
{
|
||||
|
||||
@@ -90,8 +90,9 @@
|
||||
<div class='main-actions'>
|
||||
<div class="btn-toolbar">
|
||||
<?php
|
||||
$params = "project=$project->id";
|
||||
common::printBack(inlink('browse'));
|
||||
$params = "project=$project->id";
|
||||
$browseLink = $this->session->projectList ? $this->session->projectList : inlink('browse');
|
||||
common::printBack($browseLink);
|
||||
if(!$project->deleted)
|
||||
{
|
||||
echo "<div class='divider'></div>";
|
||||
|
||||
@@ -578,13 +578,13 @@ class searchModel extends model
|
||||
{
|
||||
if(!isset($this->config->objectTables[$record->objectType])) continue;
|
||||
$table = $this->config->objectTables[$record->objectType];
|
||||
$executionID = $this->dao->select('execution')->from($table)->where('id')->eq($record->objectID)->fetch('execution');
|
||||
$record->url = helper::createLink($module, $method, "id={$record->objectID}", '', false, $executionID);
|
||||
$projectID = $this->dao->select('project')->from($table)->where('id')->eq($record->objectID)->fetch('project');
|
||||
$record->url = helper::createLink($module, $method, "id={$record->objectID}", '', false, $projectID);
|
||||
}
|
||||
elseif($module == 'issue')
|
||||
{
|
||||
$issue = $this->dao->select('id,execution,owner')->from(TABLE_ISSUE)->where('id')->eq($record->objectID)->fetch();
|
||||
$record->url = helper::createLink($module, $method, "id={$record->objectID}", '', false, $issue->execution);
|
||||
$issue = $this->dao->select('id,project,owner')->from(TABLE_ISSUE)->where('id')->eq($record->objectID)->fetch();
|
||||
$record->url = helper::createLink($module, $method, "id={$record->objectID}", '', false, $issue->project);
|
||||
$record->extraType = empty($issue->owner) ? 'commonIssue' : 'stakeholderIssue';
|
||||
}
|
||||
elseif($module == 'story')
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php $browseLink = $app->session->storyList != false ? $app->session->storyList : $this->createLink('product', 'browse', "productID=$story->product&branch=$story->branch&moduleID=$story->module");?>
|
||||
<?php $browseLink = $app->session->storyList ? $app->session->storyList : $this->createLink('product', 'browse', "productID=$story->product&branch=$story->branch&moduleID=$story->module");?>
|
||||
<?php js::set('sysurl', common::getSysUrl());?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
|
||||
Reference in New Issue
Block a user