Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
+17
-4
@@ -762,6 +762,7 @@ class actionModel extends model
|
||||
* Get dynamic by search.
|
||||
*
|
||||
* @param array $products
|
||||
* @param array $projects
|
||||
* @param array $executions
|
||||
* @param int $queryID
|
||||
* @param string $orderBy
|
||||
@@ -771,7 +772,7 @@ class actionModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDynamicBySearch($products, $executions, $queryID, $orderBy = 'date_desc', $pager = null, $date = '', $direction = 'next')
|
||||
public function getDynamicBySearch($products, $projects, $executions, $queryID, $orderBy = 'date_desc', $pager = null, $date = '', $direction = 'next')
|
||||
{
|
||||
$query = $queryID ? $this->loadModel('search')->getQuery($queryID) : '';
|
||||
|
||||
@@ -783,7 +784,8 @@ class actionModel extends model
|
||||
}
|
||||
if($this->session->actionQuery == false) $this->session->set('actionQuery', ' 1 = 1');
|
||||
|
||||
$allProduct = "`product` = 'all'";
|
||||
$allProducts = "`product` = 'all'";
|
||||
$allProjects = "`project` = 'all'";
|
||||
$allExecutions = "`execution` = 'all'";
|
||||
$actionQuery = $this->session->actionQuery;
|
||||
|
||||
@@ -792,14 +794,25 @@ class actionModel extends model
|
||||
{
|
||||
$productID = $out[1];
|
||||
}
|
||||
|
||||
/* If the sql not include 'product', add check purview for product. */
|
||||
if(strpos($actionQuery, $allProduct) === false)
|
||||
if(strpos($actionQuery, $allProducts) === false)
|
||||
{
|
||||
if(!in_array($productID, array_keys($products))) return array();
|
||||
}
|
||||
else
|
||||
{
|
||||
$actionQuery = str_replace($allProduct, '1', $actionQuery);
|
||||
$actionQuery = str_replace($allProducts, '1', $actionQuery);
|
||||
}
|
||||
|
||||
/* If the sql not include 'project', add check purview for project. */
|
||||
if(strpos($actionQuery, $allProjects) === false)
|
||||
{
|
||||
$actionQuery = $actionQuery . ' AND `project`' . helper::dbIN(array_keys($projects));
|
||||
}
|
||||
else
|
||||
{
|
||||
$actionQuery = str_replace($allProjects, '1', $actionQuery);
|
||||
}
|
||||
|
||||
/* If the sql not include 'execution', add check purview for execution. */
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<th class='w-80px'><?php echo $lang->project->PM;?></th>
|
||||
<th class='w-60px'><?php echo $lang->project->status;?></th>
|
||||
<?php if($longBlock):?>
|
||||
<th class='w-90px'><?php echo $lang->project->teamCount;?></th>
|
||||
<th class='w-60px'><?php echo $lang->project->teamCount;?></th>
|
||||
<th class='w-90px text-right'><?php echo $lang->task->consumed;?></th>
|
||||
<th class='w-80px text-right'><?php echo $lang->project->budget;?></th>
|
||||
<th class='w-80px'><?php echo $lang->project->leftStories;?></th>
|
||||
|
||||
@@ -82,7 +82,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'], '', '', '', '', $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='product'", $lang->bug->toStory);
|
||||
common::printIcon('bug', 'createCase', $convertParams, $bug, 'button', 'sitemap');
|
||||
|
||||
echo $this->buildOperateMenu($bug, 'view');
|
||||
|
||||
@@ -213,6 +213,8 @@ $lang->doc->project = 'Project';
|
||||
$lang->doc->custom = 'Custom';
|
||||
$lang->doc->wiki = 'WIKI';
|
||||
|
||||
$lang->product->list = $lang->productCommon . ' List';
|
||||
|
||||
$lang->project->report = 'Report';
|
||||
|
||||
$lang->report->weekly = 'Weekly';
|
||||
@@ -234,7 +236,7 @@ $lang->admin->data = 'Data';
|
||||
$lang->admin->cron = 'Cron';
|
||||
$lang->admin->buildIndex = 'Full Text Search';
|
||||
|
||||
$lang->subject->storyConcept = 'Story Concpet';
|
||||
$lang->storyConcept = 'Story Concpet';
|
||||
|
||||
$lang->searchTips = '';
|
||||
$lang->searchAB = 'Search';
|
||||
|
||||
@@ -128,7 +128,7 @@ $lang->program->menu->personnel['subMenu']->whitelist = array('link' => "{$lang
|
||||
/* Product menu. */
|
||||
$lang->product->homeMenu = new stdclass();
|
||||
$lang->product->homeMenu->home = array('link' => "{$lang->dashboard}|product|index|");
|
||||
$lang->product->homeMenu->list = array('link' => $lang->productCommon . '|product|all|', 'alias' => 'create,batchedit,manageline');
|
||||
$lang->product->homeMenu->list = array('link' => $lang->product->list . '|product|all|', 'alias' => 'create,batchedit,manageline');
|
||||
|
||||
$lang->product->menu = new stdclass();
|
||||
$lang->product->menu->dashboard = array('link' => "{$lang->dashboard}|product|dashboard|productID=%s");
|
||||
@@ -210,7 +210,7 @@ $lang->scrum->menu->settings['subMenu']->view = array('link' => "$lang->o
|
||||
$lang->scrum->menu->settings['subMenu']->products = array('link' => "{$lang->product->common}|project|manageProducts|project=%s", 'alias' => 'manageproducts');
|
||||
$lang->scrum->menu->settings['subMenu']->members = array('link' => "{$lang->team->common}|project|manageMembers|project=%s", 'alias' => 'managemembers');
|
||||
$lang->scrum->menu->settings['subMenu']->whitelist = array('link' => "{$lang->whitelist}|project|whitelist|project=%s", 'subModule' => 'personnel');
|
||||
$lang->scrum->menu->settings['subMenu']->stakeholder = array('link' => "{$lang->stakeholder->common}|stakeholder|browse|", 'subModule' => 'stakeholder');
|
||||
$lang->scrum->menu->settings['subMenu']->stakeholder = array('link' => "{$lang->stakeholder->common}|stakeholder|browse|project=%s", 'subModule' => 'stakeholder');
|
||||
$lang->scrum->menu->settings['subMenu']->group = array('link' => "{$lang->priv}|project|group|project=%s", 'alias' => 'group,manageview,managepriv');
|
||||
|
||||
/* Waterfall menu. */
|
||||
|
||||
@@ -213,6 +213,8 @@ $lang->doc->project = '项目库';
|
||||
$lang->doc->custom = '自定义库';
|
||||
$lang->doc->wiki = 'WIKI';
|
||||
|
||||
$lang->product->list = $lang->productCommon . '列表';
|
||||
|
||||
$lang->project->report = '报告';
|
||||
|
||||
$lang->report->weekly = '周报';
|
||||
|
||||
@@ -9,17 +9,19 @@ $app->loadLang('user');
|
||||
$config->company->dynamic = new stdclass();
|
||||
$config->company->dynamic->search['module'] = 'action';
|
||||
$config->company->dynamic->search['fields']['product'] = $lang->action->product;
|
||||
$config->company->dynamic->search['fields']['project'] = '项目';
|
||||
$config->company->dynamic->search['fields']['execution'] = $lang->action->execution;
|
||||
$config->company->dynamic->search['fields']['actor'] = $lang->action->actor;
|
||||
$config->company->dynamic->search['fields']['objectID'] = $lang->action->objectID;
|
||||
$config->company->dynamic->search['fields']['execution'] = $lang->action->execution;
|
||||
$config->company->dynamic->search['fields']['objectType'] = $lang->action->objectType;
|
||||
$config->company->dynamic->search['fields']['date'] = $lang->action->date;
|
||||
$config->company->dynamic->search['fields']['action'] = $lang->action->action;
|
||||
|
||||
$config->company->dynamic->search['params']['product'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->company->dynamic->search['params']['project'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->company->dynamic->search['params']['execution'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->company->dynamic->search['params']['actor'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->company->dynamic->search['params']['objectID'] = array('operator' => '=', 'control' => 'input', 'values' => '');
|
||||
$config->company->dynamic->search['params']['execution'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->company->dynamic->search['params']['objectType'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->action->search->objectTypeList);
|
||||
$config->company->dynamic->search['params']['date'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
|
||||
$config->company->dynamic->search['params']['action'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
|
||||
@@ -205,7 +205,7 @@ class company extends control
|
||||
$product = $browseType == 'product' ? $param : 'all';
|
||||
$project = $browseType == 'project' ? $param : 'all';
|
||||
$execution = $browseType == 'execution' ? $param : 'all';
|
||||
$period = ($browseType == 'account' or $browseType == 'product' or $browseType == 'execution') ? 'all' : $browseType;
|
||||
$period = in_array($browseType, array('account', 'product', 'project', 'execution')) ? 'all' : $browseType;
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
$date = empty($date) ? '' : date('Y-m-d', $date);
|
||||
|
||||
@@ -214,6 +214,11 @@ class company extends control
|
||||
$products = array($this->lang->company->product) + $products;
|
||||
$this->view->products = $products;
|
||||
|
||||
/* Get projects' list.*/
|
||||
$projects = $this->loadModel('project')->getPairsByProgram(0);
|
||||
$projects = array($this->lang->company->project) + $projects;
|
||||
$this->view->projects = $projects;
|
||||
|
||||
/* Get executions' list.*/
|
||||
$executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode');
|
||||
$executions = array($this->lang->company->execution) + $executions;
|
||||
@@ -238,7 +243,7 @@ class company extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$actions = $this->action->getDynamicBySearch($products, $executions, $queryID, $sort, $pager, $date, $direction);
|
||||
$actions = $this->action->getDynamicBySearch($products, $projects, $executions, $queryID, $sort, $pager, $date, $direction);
|
||||
}
|
||||
|
||||
/* Build search form. */
|
||||
@@ -257,8 +262,9 @@ class company extends control
|
||||
$this->config->company->dynamic->search['actionURL'] = $this->createLink('company', 'dynamic', "browseType=bysearch¶m=myQueryID");
|
||||
$this->config->company->dynamic->search['queryID'] = $queryID;
|
||||
$this->config->company->dynamic->search['params']['action']['values'] = $this->lang->action->search->label;
|
||||
$this->config->company->dynamic->search['params']['execution']['values'] = $executions;
|
||||
$this->config->company->dynamic->search['params']['product']['values'] = $products;
|
||||
$this->config->company->dynamic->search['params']['project']['values'] = $projects;
|
||||
$this->config->company->dynamic->search['params']['execution']['values'] = $executions;
|
||||
$this->config->company->dynamic->search['params']['actor']['values'] = $accountPairs;
|
||||
$this->loadModel('search')->setSearchParams($this->config->company->dynamic->search);
|
||||
|
||||
@@ -267,6 +273,7 @@ class company extends control
|
||||
$this->view->account = $account;
|
||||
$this->view->accountPairs = $accountPairs;
|
||||
$this->view->product = $product;
|
||||
$this->view->project = $project;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->queryID = $queryID;
|
||||
$this->view->orderBy = $orderBy;
|
||||
|
||||
@@ -10,13 +10,21 @@ function changeUser(account)
|
||||
}
|
||||
location.href = link;
|
||||
}
|
||||
function changeExecution(execution)
|
||||
{
|
||||
link = createLink('company', 'dynamic', 'type=execution¶m=' + execution);
|
||||
location.href = link;
|
||||
}
|
||||
|
||||
function changeProduct(product)
|
||||
{
|
||||
link = createLink('company', 'dynamic', 'type=product¶m=' + product);
|
||||
location.href = link;
|
||||
}
|
||||
|
||||
function changeProject(project)
|
||||
{
|
||||
link = createLink('company', 'dynamic', 'type=project¶m=' + project);
|
||||
location.href = link;
|
||||
}
|
||||
|
||||
function changeExecution(execution)
|
||||
{
|
||||
link = createLink('company', 'dynamic', 'type=execution¶m=' + execution);
|
||||
location.href = link;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ $lang->company->guest = 'Gast Login';
|
||||
$lang->company->admins = 'Administratoren';
|
||||
|
||||
$lang->company->product = $lang->productCommon;
|
||||
$lang->company->project = 'Project';
|
||||
$lang->company->execution = $lang->executionCommon;
|
||||
$lang->company->user = 'Benutzer';
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ $lang->company->guest = 'Guest Login';
|
||||
$lang->company->admins = 'Administrator';
|
||||
|
||||
$lang->company->product = $lang->productCommon;
|
||||
$lang->company->project = 'Project';
|
||||
$lang->company->execution = $lang->executionCommon;
|
||||
$lang->company->user = 'User';
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ $lang->company->guest = 'Connexion Invités';
|
||||
$lang->company->admins = 'Administrateur';
|
||||
|
||||
$lang->company->product = $lang->productCommon;
|
||||
$lang->company->project = 'Project';
|
||||
$lang->company->execution = $lang->executionCommon;
|
||||
$lang->company->user = 'Utilisateurs';
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ $lang->company->guest = 'Khách truy cập';
|
||||
$lang->company->admins = 'Quản trị viên';
|
||||
|
||||
$lang->company->product = $lang->productCommon;
|
||||
$lang->company->project = 'Project';
|
||||
$lang->company->execution = $lang->executionCommon;
|
||||
$lang->company->user = 'Người dùng';
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ $lang->company->guest = '匿名登录';
|
||||
$lang->company->admins = '管理员';
|
||||
|
||||
$lang->company->product = $lang->productCommon;
|
||||
$lang->company->project = '项目';
|
||||
$lang->company->execution = $lang->executionCommon;
|
||||
$lang->company->user = '用户';
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<?php endforeach;?>
|
||||
<div class="input-control space w-150px"><?php echo html::select('account', $userIdPairs, $user ? $user->id : '', 'onchange=changeUser(this.value) class="form-control chosen"');?></div>
|
||||
<div class="input-control space w-150px"><?php echo html::select('product', $products, $product, 'onchange=changeProduct(this.value) class="form-control chosen"');?></div>
|
||||
<div class="input-control space w-150px"><?php echo html::select('project', $projects, $project, 'onchange=changeProject(this.value) class=form-control chosen"');?></div>
|
||||
<div class="input-control space w-150px"><?php echo html::select('execution', $executions, $execution, 'onchange=changeExecution(this.value) class="form-control chosen"'); ?></div>
|
||||
<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> <?php echo $lang->action->dynamic->search;?></a>
|
||||
</div>
|
||||
|
||||
@@ -145,7 +145,6 @@ class executionModel extends model
|
||||
|
||||
if($this->config->systemMode == 'classic')
|
||||
{
|
||||
$this->session->set('moreExecutionLink', $this->app->getURI(true));
|
||||
$output = "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentExecutionName}'><span class='text'><i class='icon icon-sprint'></i> {$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>';
|
||||
$output .= "</div></div>";
|
||||
@@ -561,7 +560,7 @@ class executionModel extends model
|
||||
foreach($executions as $executionID => $execution)
|
||||
{
|
||||
$oldExecution = $oldExecutions[$executionID];
|
||||
$team = $this->getTeamMemberPairs($executionID);
|
||||
$team = $this->getTeamMemberPairs($executionID);
|
||||
|
||||
$this->dao->update(TABLE_EXECUTION)->data($execution)
|
||||
->autoCheck($skipFields = 'begin,end')
|
||||
@@ -841,8 +840,6 @@ class executionModel extends model
|
||||
{
|
||||
if(in_array($currentMethod, array('index', 'all', 'batchedit'))) return;
|
||||
|
||||
$this->session->set('moreExecutionLink', $this->app->getURI(true));
|
||||
|
||||
$currentExecutionName = $this->lang->execution->common;
|
||||
if($executionID)
|
||||
{
|
||||
@@ -1325,8 +1322,6 @@ class executionModel extends model
|
||||
if(($this->session->taskBrowseType) and ($this->session->taskBrowseType != 'bysearch')) $browseType = $this->session->taskBrowseType;
|
||||
}
|
||||
|
||||
$this->session->set('taskWithChildren', in_array($browseType, array('unclosed', 'byexecution', 'all', 'bysearch')) ? false : true);
|
||||
|
||||
/* Get tasks. */
|
||||
$tasks = array();
|
||||
if($browseType != "bysearch")
|
||||
@@ -1369,8 +1364,6 @@ class executionModel extends model
|
||||
$taskQuery = str_replace("`execution` = 'all'", $executionQuery, $taskQuery); // Search all execution.
|
||||
$this->session->set('taskQueryCondition', $taskQuery);
|
||||
$this->session->set('taskOnlyCondition', true);
|
||||
$this->session->set('taskOrderBy', $sort);
|
||||
$this->session->set('taskBrowseList', array());
|
||||
|
||||
$tasks = $this->getSearchTasks($taskQuery, $pager, $sort);
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
<?php js::set('workingHourError', sprintf($this->lang->error->notempty, $this->lang->workingHour))?>
|
||||
<style>
|
||||
.btn-group a i.icon-plus {font-size: 16px;}
|
||||
.btn-group a.btn-primary {border-right: 1px solid rgba(255,255,255,0.2);}
|
||||
.btn-group button.dropdown-toggle.btn-primary {padding:6px;}
|
||||
.btn-group a.btn-secondary {border-right: 1px solid rgba(255,255,255,0.2);}
|
||||
.btn-group button.dropdown-toggle.btn-secondary {padding:6px;}
|
||||
</style>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<?php if(!empty($module->name) or !empty($product->name) or !empty($branch)):?>
|
||||
@@ -62,8 +62,8 @@
|
||||
$storyModuleID = (int)$this->cookie->storyModuleParam;
|
||||
$createStoryLink = $this->createLink('story', 'create', "productID=$productID&branch=0&moduleID={$storyModuleID}&story=0&execution=$execution->id");
|
||||
echo "<div class='btn-group dropdown'>";
|
||||
echo html::a($createStoryLink, "<i class='icon icon-plus'></i> {$lang->story->create}", '', "class='btn btn-primary' data-app='execution'");
|
||||
echo "<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>";
|
||||
echo html::a($createStoryLink, "<i class='icon icon-plus'></i> {$lang->story->create}", '', "class='btn btn-secondary' data-app='execution'");
|
||||
echo "<button type='button' class='btn btn-secondary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>";
|
||||
echo "<ul class='dropdown-menu pull-right'>";
|
||||
if(common::hasPriv('story', 'create')) echo '<li>' . html::a($createStoryLink, $lang->story->create, '', "data-app='execution'") . '</li>';
|
||||
if(common::hasPriv('story', 'batchCreate')) echo '<li>' . html::a($this->createLink('story', 'batchCreate', "productID=$productID&branch=0&moduleID={$storyModuleID}&story=0&execution=$execution->id"), $lang->story->batchCreate, '', "data-app='execution'") . '</li>';
|
||||
|
||||
@@ -31,8 +31,14 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
<style>
|
||||
.btn-group .icon-close:before {font-size: 5px; vertical-align: 25%;}
|
||||
.btn-group a i.icon-plus {font-size: 16px;}
|
||||
<?php if($from == 'project'):?>
|
||||
.btn-group a.btn-secondary {border-right: 1px solid rgba(255,255,255,0.2);}
|
||||
.btn-group button.dropdown-toggle.btn-secondary {padding:6px;}
|
||||
<?php endif;?>
|
||||
<?php if($from == 'product'):?>
|
||||
.btn-group a.btn-primary {border-right: 1px solid rgba(255,255,255,0.2);}
|
||||
.btn-group button.dropdown-toggle.btn-primary {padding:6px;}
|
||||
<?php endif;?>
|
||||
</style>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<?php if(!$isProjectStory):?>
|
||||
@@ -135,8 +141,9 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
</div>
|
||||
<?php if(common::canModify('product', $product)):?>
|
||||
<div class='btn-group dropdown'>
|
||||
<?php echo html::a($this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID=$projectID"), "<i class='icon icon-plus'></i> {$lang->story->create}", '', "class='btn btn-primary' data-app='$openApp'");?>
|
||||
<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<?php $buttonType = $from == 'project' ? 'btn-secondary' : 'btn-primary';?>
|
||||
<?php echo html::a($this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID=$projectID"), "<i class='icon icon-plus'></i> {$lang->story->create}", '', "class='btn $buttonType' data-app='$openApp'");?>
|
||||
<button type='button' class="btn <?php echo $buttonType?> dropdown-toggle" data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu pull-right'>
|
||||
<li>
|
||||
<?php
|
||||
|
||||
@@ -52,6 +52,7 @@ $lang->program->beginGreateChild = "Child earliest begin: %s, parent begi
|
||||
$lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date.";
|
||||
$lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed';
|
||||
$lang->program->confirmDelete = "Do you want to delete it?";
|
||||
$lang->program->hasChildren = 'It has child programs or projects. You cannot delete it.';
|
||||
$lang->program->readjustTime = 'Change the program begin&end date.';
|
||||
|
||||
$lang->program->stakeholderTypeList['inside'] = 'Inside';
|
||||
|
||||
@@ -52,6 +52,7 @@ $lang->program->beginGreateChild = "Child earliest begin: %s, parent begi
|
||||
$lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date.";
|
||||
$lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed';
|
||||
$lang->program->confirmDelete = "Do you want to delete it?";
|
||||
$lang->program->hasChildren = 'It has child programs or projects. You cannot delete it.';
|
||||
$lang->program->readjustTime = 'Change the program begin&end date.';
|
||||
|
||||
$lang->program->stakeholderTypeList['inside'] = 'Inside';
|
||||
|
||||
@@ -52,6 +52,7 @@ $lang->program->beginGreateChild = "Child earliest begin: %s, parent begi
|
||||
$lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date.";
|
||||
$lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed';
|
||||
$lang->program->confirmDelete = "Do you want to delete it?";
|
||||
$lang->program->hasChildren = 'It has child programs or projects. You cannot delete it.';
|
||||
$lang->program->readjustTime = 'Change the program begin&end date.';
|
||||
|
||||
$lang->program->stakeholderTypeList['inside'] = 'Inside';
|
||||
|
||||
@@ -52,6 +52,7 @@ $lang->program->beginGreateChild = "Child earliest begin: %s, parent begi
|
||||
$lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date.";
|
||||
$lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed';
|
||||
$lang->program->confirmDelete = "Do you want to delete it?";
|
||||
$lang->program->hasChildren = 'It has child programs or projects. You cannot delete it.';
|
||||
$lang->program->readjustTime = 'Change the program begin&end date.';
|
||||
|
||||
$lang->program->stakeholderTypeList['inside'] = 'Inside';
|
||||
|
||||
@@ -51,6 +51,7 @@ $lang->program->endGreaterParent = "父项目集的完成日期:%s,
|
||||
$lang->program->beginGreateChild = "子项目集的最小开始日期:%s,父项目集的开始日期不能大于子项目集的最小开始日期";
|
||||
$lang->program->endLetterChild = "子项目的最大完成日期:%s,父项目的完成日期不能小于子项目的最大完成日期";
|
||||
$lang->program->closeErrorMessage = '存在子项目集或项目为未关闭状态';
|
||||
$lang->program->hasChildren = '该项目集有子项目集或项目存在,不能删除。';
|
||||
$lang->program->confirmDelete = "您确定要删除吗?";
|
||||
$lang->program->readjustTime = '重新调整项目集起止时间';
|
||||
|
||||
|
||||
@@ -834,6 +834,43 @@ class programModel extends model
|
||||
return $budgetUnitList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get program team member pairs.
|
||||
*
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getTeamMemberPairs($programID = 0)
|
||||
{
|
||||
$projectList = $this->loadModel('project')->getPairsByProgram($programID);
|
||||
if(!$projectList) return array('' => '');
|
||||
|
||||
$users = $this->dao->select("t2.id, t2.account, t2.realname")->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->where('t1.root')->in(array_keys($projectList))
|
||||
->andWhere('t1.type')->eq('project')
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->fetchAll('account');
|
||||
if(!$users) return array('' => '');
|
||||
|
||||
foreach($users as $account => $user)
|
||||
{
|
||||
$firstLetter = ucfirst(substr($user->account, 0, 1)) . ':';
|
||||
if(!empty($this->config->isINT)) $firstLetter = '';
|
||||
$users[$account] = $firstLetter . ($user->realname ? $user->realname : $user->account);
|
||||
}
|
||||
|
||||
return array('' => '') + $users;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set program menu.
|
||||
*
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setMenu($programID)
|
||||
{
|
||||
$this->lang->switcherMenu = $this->getSwitcher($programID);
|
||||
|
||||
@@ -130,8 +130,8 @@
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('.is-nest-child span.icon-program').addClass('table-nest-toggle');
|
||||
$('.is-nest-child span.icon-program').removeClass('table-nest-icon');
|
||||
$('.is-nest-child span.icon-program,.no-nest span.icon-program').addClass('table-nest-toggle');
|
||||
$('.is-nest-child span.icon-program,.no-nest span.icon-program').removeClass('table-nest-icon');
|
||||
|
||||
/* Init orders numbers list */
|
||||
var ordersList = [];
|
||||
|
||||
@@ -470,7 +470,7 @@ class project extends control
|
||||
$this->view->position[] = $this->lang->project->batchEdit;
|
||||
|
||||
$this->view->projects = $projects;
|
||||
$this->view->programList = $this->program->getParentPairs();
|
||||
$this->view->programList = $this->loadModel('program')->getParentPairs();
|
||||
$this->view->PMUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst', $appendPMUsers);
|
||||
|
||||
$this->display();
|
||||
|
||||
@@ -190,7 +190,6 @@ $lang->project->scrum = 'Scrum';
|
||||
$lang->project->waterfall = 'CMMI';
|
||||
$lang->project->waterfallTitle = 'CMMI';
|
||||
$lang->project->cannotCreateChild = 'It is not empty, so you cannot add a child. You can add a parent for it, and then create a child.';
|
||||
$lang->project->hasChildren = 'It has child projects or projects. You cannot delete it.';
|
||||
$lang->project->confirmDelete = "Do you want to delete [%s]?";
|
||||
$lang->project->emptyPM = 'No manager';
|
||||
$lang->project->cannotChangeToCat = "It is not empty, so you cannot change it to a parent.";
|
||||
|
||||
@@ -190,7 +190,6 @@ $lang->project->scrum = 'Scrum';
|
||||
$lang->project->waterfall = 'CMMI';
|
||||
$lang->project->waterfallTitle = 'CMMI';
|
||||
$lang->project->cannotCreateChild = 'It is not empty, so you cannot add a child. You can add a parent for it, and then create a child.';
|
||||
$lang->project->hasChildren = 'It has child projects or projects. You cannot delete it.';
|
||||
$lang->project->confirmDelete = "Do you want to delete [%s]?";
|
||||
$lang->project->emptyPM = 'No manager';
|
||||
$lang->project->cannotChangeToCat = "It is not empty, so you cannot change it to a parent.";
|
||||
|
||||
@@ -190,7 +190,6 @@ $lang->project->scrum = 'Scrum';
|
||||
$lang->project->waterfall = 'CMMI';
|
||||
$lang->project->waterfall = 'CMMI';
|
||||
$lang->project->cannotCreateChild = 'It is not empty, so you cannot add a child. You can add a parent for it, and then create a child.';
|
||||
$lang->project->hasChildren = 'It has child projects or projects. You cannot delete it.';
|
||||
$lang->project->confirmDelete = "Do you want to delete [%s]?";
|
||||
$lang->project->emptyPM = 'No manager';
|
||||
$lang->project->cannotChangeToCat = "It is not empty, so you cannot change it to a parent.";
|
||||
|
||||
@@ -190,7 +190,6 @@ $lang->project->scrum = 'Scrum';
|
||||
$lang->project->waterfall = 'CMMI';
|
||||
$lang->project->waterfallTitle = 'CMMI';
|
||||
$lang->project->cannotCreateChild = 'It is not empty, so you cannot add a child. You can add a parent for it, and then create a child.';
|
||||
$lang->project->hasChildren = 'It has child projects or projects. You cannot delete it.';
|
||||
$lang->project->confirmDelete = "Do you want to delete [%s]?";
|
||||
$lang->project->emptyPM = 'No manager';
|
||||
$lang->project->cannotChangeToCat = "It is not empty, so you cannot change it to a parent.";
|
||||
|
||||
@@ -60,9 +60,8 @@ $lang->project->code = '项目代号';
|
||||
$lang->project->copy = '复制项目';
|
||||
$lang->project->begin = '计划开始';
|
||||
$lang->project->end = '计划完成';
|
||||
$lang->project->status = '项目状态';
|
||||
$lang->project->PM = '项目负责人';
|
||||
$lang->project->budget = '项目预算';
|
||||
$lang->project->status = '状态';
|
||||
$lang->project->budget = '预算';
|
||||
$lang->project->template = '项目模板';
|
||||
$lang->project->estimate = '预计';
|
||||
$lang->project->consume = '消耗';
|
||||
@@ -81,7 +80,6 @@ $lang->project->acl = '访问控制';
|
||||
$lang->project->setPlanduration = '设置工期';
|
||||
$lang->project->auth = '权限控制';
|
||||
$lang->project->durationEstimation = '工作量估算';
|
||||
$lang->project->teamCount = '人数';
|
||||
$lang->project->leftStories = '剩余需求';
|
||||
$lang->project->leftTasks = '剩余任务';
|
||||
$lang->project->leftBugs = '剩余Bug';
|
||||
@@ -97,7 +95,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 = '更多项目';
|
||||
@@ -191,7 +189,6 @@ $lang->project->scrum = 'Scrum';
|
||||
$lang->project->waterfall = '瀑布';
|
||||
$lang->project->waterfallTitle = '瀑布式项目管理';
|
||||
$lang->project->cannotCreateChild = '该项目已经有实际的内容,无法直接添加子项目。您可以为当前项目创建一个父项目,然后在新的父项目下面添加子项目。';
|
||||
$lang->project->hasChildren = '该项目集有子项目集或项目存在,不能删除。';
|
||||
$lang->project->confirmDelete = "您确定要删除吗?";
|
||||
$lang->project->emptyPM = '暂无';
|
||||
$lang->project->cannotChangeToCat = "该项目已经有实际的内容,无法修改为父项目";
|
||||
|
||||
+26
-19
@@ -395,33 +395,40 @@ class projectModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get project team member pairs.
|
||||
* Get team members in pair.
|
||||
*
|
||||
* @param int $programID
|
||||
* @param int $projectID
|
||||
* @param string $params
|
||||
* @param string $usersToAppended
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getTeamMemberPairs($programID = 0)
|
||||
public function getTeamMemberPairs($projectID, $params = '', $usersToAppended = '')
|
||||
{
|
||||
$projectList = $this->getPairsByProgram($programID);
|
||||
if(!$projectList) return array('' => '');
|
||||
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembersPairs();
|
||||
$this->app->loadConfig('user');
|
||||
|
||||
$users = $this->dao->select("t2.id, t2.account, t2.realname")->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->where('t1.root')->in(array_keys($projectList))
|
||||
->andWhere('t1.type')->eq('project')
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->fetchAll('account');
|
||||
if(!$users) return array('' => '');
|
||||
$keyField = strpos($params, 'useid') !== false ? 'id' : 'account';
|
||||
$users = $this->dao->select("t2.id, t2.account, t2.realname")->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->where('t1.root')->eq((int)$projectID)
|
||||
->andWhere('t1.type')->eq('project')
|
||||
->beginIF($params == 'nodeleted' or empty($this->config->user->showDeleted))
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->fi()
|
||||
->fetchAll($keyField);
|
||||
|
||||
foreach($users as $account => $user)
|
||||
{
|
||||
$firstLetter = ucfirst(substr($user->account, 0, 1)) . ':';
|
||||
if(!empty($this->config->isINT)) $firstLetter = '';
|
||||
$users[$account] = $firstLetter . ($user->realname ? $user->realname : $user->account);
|
||||
}
|
||||
if($usersToAppended) $users += $this->dao->select("id, account, realname")->from(TABLE_USER)->where('account')->in($usersToAppended)->fetchAll($keyField);
|
||||
|
||||
return array('' => '') + $users;
|
||||
if(!$users) return array('' => '');
|
||||
|
||||
foreach($users as $account => $user)
|
||||
{
|
||||
$firstLetter = ucfirst(substr($user->account, 0, 1)) . ':';
|
||||
if(!empty($this->config->isINT)) $firstLetter = '';
|
||||
$users[$account] = $firstLetter . ($user->realname ? $user->realname : $user->account);
|
||||
}
|
||||
return array('' => '') + $users;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,20 +4,23 @@ class stakeholder extends control
|
||||
/**
|
||||
* Stakeholder list.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $browseType
|
||||
* @param string orderBy
|
||||
* @param int recTotal
|
||||
* @param int recPerPage
|
||||
* @param int pageID
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($browseType = 'all', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
public function browse($projectID, $browseType = 'all', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->app->loadClass('pager', true);
|
||||
$pager = pager::init($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$stakeholders = $this->stakeholder->getStakeholders($browseType, $orderBy, $pager);
|
||||
$this->loadModel('project')->setMenu($projectID);
|
||||
|
||||
$stakeholders = $this->stakeholder->getStakeholders($projectID, $browseType, $orderBy, $pager);
|
||||
|
||||
$this->view->title = $this->lang->stakeholder->browse;
|
||||
$this->view->position[] = $this->lang->stakeholder->browse;
|
||||
@@ -26,6 +29,7 @@ class stakeholder extends control
|
||||
$this->view->recTotal = $recTotal;
|
||||
$this->view->recPerPage = $recPerPage;
|
||||
$this->view->pageID = $pageID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->stakeholders = $stakeholders;
|
||||
@@ -36,15 +40,15 @@ class stakeholder extends control
|
||||
/**
|
||||
* Create a stakeholder.
|
||||
*
|
||||
* @param int programID
|
||||
* @param int projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($programID = 0)
|
||||
public function create($projectID = 0)
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$stakeholderID = $this->stakeholder->create($programID);
|
||||
$stakeholderID = $this->stakeholder->create($projectID);
|
||||
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = $this->lang->saveSuccess;
|
||||
@@ -65,20 +69,22 @@ class stakeholder extends control
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
|
||||
}
|
||||
|
||||
if($programID)
|
||||
if($this->app->openApp == 'program')
|
||||
{
|
||||
$this->loadModel('program')->setMenu($programID);
|
||||
$this->view->members = $this->loadModel('project')->getTeamMemberPairs($programID);
|
||||
$this->loadModel('program')->setMenu($projectID);
|
||||
$this->view->members = $this->loadModel('program')->getTeamMemberPairs($projectID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->view->members = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
|
||||
$this->loadModel('project')->setMenu($projectID);
|
||||
$this->view->members = $this->loadModel('project')->getTeamMemberPairs($projectID);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->stakeholder->create;
|
||||
$this->view->position[] = $this->lang->stakeholder->create;
|
||||
$this->view->companys = $this->loadModel('company')->getOutsideCompanies();
|
||||
$this->view->programID = $programID;
|
||||
$this->view->programID = $this->app->openApp == 'program' ? $projectID : 0;
|
||||
$this->view->projectID = $this->app->openApp == 'project' ? $projectID : 0;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -86,15 +92,27 @@ class stakeholder extends control
|
||||
/**
|
||||
* Batch create stakeholders.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $dept
|
||||
* @param string $dept
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchCreate($dept = '', $parentID = 0)
|
||||
public function batchCreate($projectID, $dept = '', $parentID = 0)
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->stakeholder->batchCreate();
|
||||
die(js::locate($this->createLink('stakeholder', 'browse'), 'parent'));
|
||||
die(js::locate($this->createLink('stakeholder', 'browse', "projectID=$projectID"), 'parent'));
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'program')
|
||||
{
|
||||
$this->loadModel('program')->setMenu($projectID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->loadModel('project')->setMenu($projectID);
|
||||
}
|
||||
|
||||
$this->loadModel('user');
|
||||
@@ -109,9 +127,9 @@ class stakeholder extends control
|
||||
$this->view->users = $this->user->getPairs('all|nodeleted|noclosed');
|
||||
$this->view->deptUsers = $deptUsers;
|
||||
$this->view->dept = $dept;
|
||||
$this->view->projectID = $this->session->project;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->depts = array('' => '') + $this->dept->getOptionMenu();
|
||||
$this->view->stakeholders = $this->stakeholder->getStakeholders('all', 'id_desc');
|
||||
$this->view->stakeholders = $this->stakeholder->getStakeholders($projectID, 'all', 'id_desc');
|
||||
$this->view->parentStakeholders = $this->loadModel('program')->getStakeholders($parentID, 't1.id_desc');
|
||||
|
||||
$this->display();
|
||||
@@ -170,12 +188,20 @@ class stakeholder extends control
|
||||
*
|
||||
* @param string $user
|
||||
* @param int $programID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetMembers($user = '', $programID = 0)
|
||||
public function ajaxGetMembers($user = '', $programID = 0, $projectID = 0)
|
||||
{
|
||||
$members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->project) : $this->loadModel('project')->getTeamMemberPairs($programID);
|
||||
if($programID)
|
||||
{
|
||||
$members = $this->loadModel('program')->getTeamMemberPairs($programID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$members = $this->loadModel('project')->getTeamMemberPairs($projectID);
|
||||
}
|
||||
die(html::select('user', $members, $user, "class='form-control chosen'"));
|
||||
}
|
||||
|
||||
@@ -184,13 +210,22 @@ class stakeholder extends control
|
||||
*
|
||||
* @param string $user
|
||||
* @param int $programID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetCompanyUser($user = '', $programID = 0)
|
||||
public function ajaxGetCompanyUser($user = '', $programID = 0, $projectID = 0)
|
||||
{
|
||||
$members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->project) : $this->loadModel('project')->getTeamMemberPairs($programID);
|
||||
$users = $this->loadModel('user')->getPairs('noclosed');
|
||||
if($programID)
|
||||
{
|
||||
$members = $this->loadModel('program')->getTeamMemberPairs($programID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$members = $this->loadModel('project')->getTeamMemberPairs($projectID);
|
||||
}
|
||||
|
||||
$users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$companyUsers = array('' => '') + array_diff($users, $members);
|
||||
|
||||
die(html::select('user', $companyUsers, $user, "class='form-control chosen'"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function setDeptUsers(obj)
|
||||
{
|
||||
dept = $(obj).val();//Get dept ID.
|
||||
link = createLink('stakeholder', 'batchCreate', 'dept=' + dept);
|
||||
link = createLink('stakeholder', 'batchCreate', 'projectID=' + projectID + '&dept=' + dept);
|
||||
location.href=link;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ $(function()
|
||||
{
|
||||
$('.user-info').addClass('hidden');
|
||||
$('#user').closest('tr').find('.input-group-addon').addClass('hidden');
|
||||
var link = createLink('stakeholder', 'ajaxGetMembers', 'user=&programID=' + programID);
|
||||
var link = createLink('stakeholder', 'ajaxGetMembers', 'user=&program=' + programID + '&projectID=' + projectID);
|
||||
$.post(link, function(data)
|
||||
{
|
||||
$('#user').replaceWith(data);
|
||||
@@ -19,7 +19,7 @@ $(function()
|
||||
{
|
||||
$('.user-info').addClass('hidden');
|
||||
$('#user').closest('tr').find('.input-group-addon').addClass('hidden');
|
||||
var link = createLink('stakeholder', 'ajaxGetCompanyUser', 'user=&programID=' + programID);
|
||||
var link = createLink('stakeholder', 'ajaxGetCompanyUser', 'user=&programID=' + programID + '&projectID=' + projectID);
|
||||
$.post(link, function(data)
|
||||
{
|
||||
$('#user').replaceWith(data);
|
||||
|
||||
@@ -193,20 +193,21 @@ class stakeholderModel extends model
|
||||
/**
|
||||
* Get stakeholder list.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $browseType
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getStakeholders($browseType = 'all', $orderBy = 'id_desc', $pager = null)
|
||||
public function getStakeholders($projectID, $browseType = 'all', $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
$stakeholders = $this->dao->select('t1.*, t2.phone, t2.realname as name, t2.email, t2.qq, t2.weixin, t2.nature, t2.analysis, t2.strategy, t3.name as companyName, t4.model as projectModel')->from(TABLE_STAKEHOLDER)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.user=t2.account')
|
||||
->leftJoin(TABLE_COMPANY)->alias('t3')->on('t2.company=t3.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.objectID=t4.id')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t1.objectID')->eq($this->session->project)
|
||||
->andWhere('t1.objectID')->eq($projectID)
|
||||
->beginIF($browseType == 'inside')->andWhere('t1.type')->eq('inside')->fi()
|
||||
->beginIF($browseType == 'outside')->andWhere('t1.type')->eq('outside')->fi()
|
||||
->beginIF($browseType == 'key')->andWhere('t1.key')->ne('0')->fi()
|
||||
@@ -220,13 +221,14 @@ class stakeholderModel extends model
|
||||
/**
|
||||
* Get stakeholder pairs.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $browseType
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getStakeHolderPairs()
|
||||
public function getStakeHolderPairs($projectID)
|
||||
{
|
||||
$stakeholders = $this->dao->select('id, user')->from(TABLE_STAKEHOLDER)
|
||||
->where('deleted')->eq('0')
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
<?php echo html::a($this->createLink('stakeholder', 'browse', 'browseType=all'), '<span class="text">' . $lang->stakeholder->browse . '</span>', '', 'class="btn btn-link btn-active-text"');?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('stakeholder', 'batchcreate', '', "<i class='icon icon-plus'></i>" . $lang->stakeholder->batchCreate, '', "class='btn btn-primary'");?>
|
||||
<?php common::printLink('stakeholder', 'create', '', "<i class='icon icon-plus'></i>" . $lang->stakeholder->create, '', "class='btn btn-primary'");?>
|
||||
<?php common::printLink('stakeholder', 'batchcreate', "projectID=$projectID", "<i class='icon icon-plus'></i>" . $lang->stakeholder->batchCreate, '', "class='btn btn-primary'");?>
|
||||
<?php common::printLink('stakeholder', 'create', "projectID=$projectID", "<i class='icon icon-plus'></i>" . $lang->stakeholder->create, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-row fade'>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::set('projectID', $projectID)?>
|
||||
<?php js::set('programID', $programID)?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="center-block">
|
||||
|
||||
@@ -39,6 +39,7 @@ class testcase extends control
|
||||
$this->loadModel('product');
|
||||
$this->loadModel('tree');
|
||||
$this->loadModel('user');
|
||||
$this->loadModel('qa');
|
||||
|
||||
$this->view->products = $this->products = $this->product->getPairs();
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testcase")));
|
||||
@@ -79,10 +80,7 @@ class testcase extends control
|
||||
/* Set browseType, productID, moduleID and queryID. */
|
||||
$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);
|
||||
|
||||
if($this->cookie->preProductID != $productID or $this->cookie->preBranch != $branch)
|
||||
setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true); setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot, '', false, true); if($this->cookie->preProductID != $productID or $this->cookie->preBranch != $branch)
|
||||
{
|
||||
$_COOKIE['caseModule'] = 0;
|
||||
setcookie('caseModule', 0, 0, $this->config->webRoot, '', false, false);
|
||||
@@ -96,8 +94,16 @@ class testcase extends control
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
|
||||
/* Set menu, save session. */
|
||||
if($this->app->openApp == 'project') $this->products = array('0' => $this->lang->product->all) + $this->loadModel('project')->getProducts($this->session->project, false);
|
||||
$this->app->openApp == 'project' ? $this->loadModel('project')->setMenu($projectID) : $this->testcase->setMenu($this->products, $productID, $branch, $moduleID, $suiteID, $orderBy);
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
$this->products = array('0' => $this->lang->product->all) + $this->loadModel('project')->getProducts($this->session->project, false);
|
||||
$this->loadModel('project')->setMenu($projectID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->qa->setMenu($this->products, $productID, $branch);
|
||||
}
|
||||
|
||||
$this->session->set('caseList', $this->app->getURI(true), 'qa');
|
||||
$this->session->set('productID', $productID);
|
||||
$this->session->set('moduleID', $moduleID);
|
||||
@@ -200,7 +206,6 @@ class testcase extends control
|
||||
$this->lang->modulePageNav = $this->product->select($products, $productID, 'testcase', 'groupCase', '', $branch);
|
||||
}
|
||||
|
||||
|
||||
$this->session->set('caseList', $this->app->getURI(true), 'qa');
|
||||
|
||||
$cases = $this->testcase->getModuleCases($productID, $branch, 0, $groupBy);
|
||||
|
||||
@@ -224,7 +224,7 @@ class testcaseModel extends model
|
||||
return $this->dao->select('t1.*, t2.title as storyTitle')->from(TABLE_CASE)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id')
|
||||
->where('t1.product')->eq((int)$productID)
|
||||
->beginIF($this->app->openApp = 'project')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->app->openApp == 'project')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
|
||||
->beginIF($moduleIdList)->andWhere('t1.module')->in($moduleIdList)->fi()
|
||||
->beginIF($browseType == 'wait')->andWhere('t1.status')->eq($browseType)->fi()
|
||||
|
||||
Reference in New Issue
Block a user