Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -4,7 +4,7 @@ class myExecution extends execution
|
||||
{
|
||||
public function create($projectID = '', $executionID = 0, $copyExecutionID = '', $planID = 0, $confirm = 'no', $productID = 0, $extra = '')
|
||||
{
|
||||
$this->config->execution->create->requiredFields = 'name,code,begin,end';
|
||||
$this->config->execution->create->requiredFields = 'name,code,begin,end';
|
||||
parent::create($projectID, $executionID, $copyExecutionID, $planID, $confirm, $productID, $extra);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,22 +20,25 @@ body {margin-bottom: 25px;}
|
||||
.assignedTo{border-radius: 4px !important;}
|
||||
#productStoryForm table tbody tr td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 0 4px 0 0;}
|
||||
</style>
|
||||
<?php js::set('browseType', $browseType);?>
|
||||
<?php js::set('productID', $productID);?>
|
||||
<?php js::set('projectID', $projectID);?>
|
||||
<?php js::set('branch', $branch);?>
|
||||
<?php js::set('rawModule', $this->app->rawModule);?>
|
||||
<?php js::set('productType', $this->app->tab == 'product' ? $product->type : '');?>
|
||||
<?php
|
||||
$unfoldStories = isset($config->product->browse->unfoldStories) ? json_decode($config->product->browse->unfoldStories, true) : array();
|
||||
$unfoldStories = zget($unfoldStories, $productID, array());
|
||||
$lang->story->createCommon = $storyType == 'story' ? $lang->story->createStory : $lang->story->createRequirement;
|
||||
$unfoldStories = isset($config->product->browse->unfoldStories) ? json_decode($config->product->browse->unfoldStories, true) : array();
|
||||
$unfoldStories = zget($unfoldStories, $productID, array());
|
||||
$isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
$projectHasProduct = $isProjectStory && !empty($project->hasProduct);
|
||||
$projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
js::set('unfoldStories', $unfoldStories);
|
||||
js::set('unfoldAll', $lang->execution->treeLevel['all']);
|
||||
js::set('foldAll', $lang->execution->treeLevel['root']);
|
||||
js::set('storyType', $storyType);
|
||||
$lang->story->createCommon = $storyType == 'story' ? $lang->story->createStory : $lang->story->createRequirement;
|
||||
$isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
$projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
js::set('browseType', $browseType);
|
||||
js::set('productID', $productID);
|
||||
js::set('projectID', $projectID);
|
||||
js::set('branch', $branch);
|
||||
js::set('rawModule', $this->app->rawModule);
|
||||
js::set('productType', $this->app->tab == 'product' ? $product->type : '');
|
||||
js::set('projectHasProduct', $projectHasProduct);
|
||||
js::set('URAndSR', $this->config->URAndSR);
|
||||
?>
|
||||
<style>
|
||||
.btn-group .icon-close:before {font-size: 5px; vertical-align: 25%;}
|
||||
|
||||
@@ -181,7 +181,7 @@ class router extends baseRouter
|
||||
|
||||
$hourKey = $planKey = $URSR = $URAndSR = 0;
|
||||
|
||||
$mode = 'new';
|
||||
$mode = 'ALM';
|
||||
$score = '0';
|
||||
$projectKey = ITERATION_KEY;
|
||||
$disabledFeatures = '';
|
||||
@@ -200,7 +200,7 @@ class router extends baseRouter
|
||||
}
|
||||
|
||||
/* Lite Version is compatible with classic modes */
|
||||
if($config->vision == 'lite') $mode = 'new';
|
||||
if($config->vision == 'lite') $mode = 'ALM';
|
||||
|
||||
/* Record system mode. */
|
||||
$config->systemMode = $mode;
|
||||
|
||||
@@ -115,6 +115,9 @@ class design extends control
|
||||
$pager = pager::init(0, $recPerPage, $pageID);
|
||||
$designs = $this->design->getList($projectID, $productID, $type, $queryID, $orderBy, $pager);
|
||||
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
$this->view->hiddenProduct = $project->hasProduct ? false : true;
|
||||
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->browse;
|
||||
$this->view->position[] = $this->lang->design->browse;
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
<?php $vars = "projectID=$projectID&productID=$productID&type=$type¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left w-60px"> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class="text-left"> <?php common::printOrderLink('name', $orderBy, $vars, $lang->design->name);?></th>
|
||||
<th class="text-left w-150px"> <?php common::printOrderLink('product', $orderBy, $vars, $lang->design->product);?></th>
|
||||
<th class="text-left w-60px"> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class="text-left"> <?php common::printOrderLink('name', $orderBy, $vars, $lang->design->name);?></th>
|
||||
<th class="text-left w-150px <?php echo $hiddenProduct ? 'hidden' : '';?>"><?php common::printOrderLink('product', $orderBy, $vars, $lang->design->product);?></th>
|
||||
<th class="text-left w-100px"> <?php common::printOrderLink('type', $orderBy, $vars, $lang->design->type);?></th>
|
||||
<th class="c-assignedTo w-120px"><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->design->assignedTo);?></th>
|
||||
<th class="text-left w-120px"> <?php common::printOrderLink('createdBy', $orderBy, $vars, $lang->design->createdByAB);?></th>
|
||||
@@ -47,7 +47,7 @@
|
||||
<tr>
|
||||
<td calss="c-id"> <?php printf('%03d', $design->id);?></td>
|
||||
<td class="c-name" title="<?php echo $design->name;?>"><?php echo common::hasPriv('design', 'view') ? html::a($this->createLink('design', 'view', "id={$design->id}"), $design->name) : $design->name;?></td>
|
||||
<td class="c-product"> <?php echo zget($products, $design->product);?></td>
|
||||
<td class="c-product <?php echo $hiddenProduct ? 'hidden' : '';?>"><?php echo zget($products, $design->product);?></td>
|
||||
<td class="c-type"> <?php echo zget($lang->design->typeList, $design->type);?></td>
|
||||
<td class="c-assignedTo"> <?php echo $this->design->printAssignedHtml($design, $users);?></td>
|
||||
<td class="c-createdBy"> <?php echo zget($users, $design->createdBy);?></td>
|
||||
@@ -55,9 +55,9 @@
|
||||
<td class='c-actions text-center'>
|
||||
<?php
|
||||
$vars = "design={$design->id}";
|
||||
common::printIcon('design', 'edit', $vars, $design, 'list', 'alter');
|
||||
common::printIcon('design', 'viewCommit', $vars, $design, 'list', 'list-alt', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('design', 'delete', $vars, $design, 'list', 'trash', 'hiddenwin');
|
||||
common::printIcon('design', 'edit', $vars, $design, 'list', 'alter');
|
||||
if(helper::hasFeature('devops')) common::printIcon('design', 'viewCommit', $vars, $design, 'list', 'list-alt', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('design', 'delete', $vars, $design, 'list', 'trash', 'hiddenwin');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -12,6 +12,8 @@ $(function()
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
if($('#executionList thead th.c-name').width() < 260) $('#executionList thead th.c-name').width(260);
|
||||
|
||||
$('#executionTableList').on('sort.sortable', function(e, data)
|
||||
{
|
||||
var list = '';
|
||||
|
||||
@@ -88,7 +88,6 @@ class programModel extends model
|
||||
$dao = $this->dao->select('id, name, program')->from(TABLE_PRODUCT)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('vision')->eq($this->config->vision)
|
||||
->beginIF($programID !== '')->andWhere('program')->eq($programID)->fi()
|
||||
->beginIF($shadow !== 'all')->andWhere('shadow')->eq((int)$shadow)->fi()
|
||||
->beginIF($mode == 'assign')->andWhere('program')->eq($programID)->fi()
|
||||
->beginIF(strpos($status, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
|
||||
|
||||
@@ -160,10 +160,8 @@ function setParentProgram(parentProgram)
|
||||
var selectedProduct = $(this).find('[name^=products]').val();
|
||||
var selectedBranch = $(this).find('[name^=branch]').val();
|
||||
var selectedPlan = $('#plan' + index ).find('[name^=plans]').val();
|
||||
var newProductHtml = $(this).find('span.input-group-addon');
|
||||
|
||||
$(this).html(productSelectHtml);
|
||||
$(this).append(newProductHtml);
|
||||
$(this).find('[name^=products]').attr('name', 'products[' + index + ']').attr('id', 'products' + index).attr('data-branch', selectedBranch).attr('data-plan', selectedPlan);
|
||||
$(this).find('[name^=products]').val(selectedProduct).chosen().change();
|
||||
});
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#swapper li {padding-top: 0; padding-bottom: 0;}
|
||||
#swapper .tree li>.list-toggle {top: -1px;}
|
||||
|
||||
#closed {width: 90px; height: 25px; line-height: 25px; background-color: #ddd; color: #3c495c; text-align: center; margin-left: 15px; border-radius: 2px;}
|
||||
div#closed {width: 90px; height: 25px; line-height: 25px; background-color: #ddd; color: #3c495c; text-align: center; margin-left: 15px; border-radius: 2px;}
|
||||
#gray-line {width:230px; height: 1px; margin-left: 10px; margin-bottom:2px; background-color: #ddd;}
|
||||
</style>
|
||||
<?php
|
||||
|
||||
@@ -26,13 +26,18 @@
|
||||
<th><?php echo $lang->release->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class='form-control' required");?></td>
|
||||
<td>
|
||||
<?php if(!$product->shadow):?>
|
||||
<div id='markerBox' class='checkbox-primary'>
|
||||
<input id='marker' name='marker' value='1' type='checkbox' />
|
||||
<label for='marker'><?php echo $lang->release->marker;?></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php if($lastRelease) echo '(' . $lang->release->last . ': ' . $lastRelease->name . ')';?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if($product->shadow):?>
|
||||
<?php echo html::hidden('product', $product->id);?>
|
||||
<?php else:?>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->product;?></th>
|
||||
<td>
|
||||
@@ -43,6 +48,7 @@
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->build;?></th>
|
||||
<td id='buildBox'><?php echo html::select('build[]', $builds, '', "class='form-control chosen' multiple");?></td>
|
||||
|
||||
@@ -40,7 +40,7 @@ class projectStory extends control
|
||||
if($projectID)
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
if(!$project->hasProduct) $productID = $this->dao->select('product')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->fetch('product');
|
||||
if(!$project->hasProduct) $productID = $this->loadModel('product')->getShadowProductByProject($projectID)->id;
|
||||
}
|
||||
|
||||
$this->products = $this->loadModel('product')->getProductPairsByProject($projectID);
|
||||
|
||||
@@ -972,6 +972,7 @@ class story extends control
|
||||
$project = $this->dao->findByID($executionID)->from(TABLE_PROJECT)->fetch();
|
||||
if($project->type == 'project')
|
||||
{
|
||||
if(!($project->model == 'scrum' and !$project->hasProduct and $project->multiple)) $this->view->hiddenPlan = true;
|
||||
$this->project->setMenu($executionID);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -204,26 +204,6 @@
|
||||
<?php echo html::hidden('status', $story->status);?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if(strpos('draft,changing', $story->status) !== false and $story->type == 'story'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->stage;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if($story->stages and $branchTagOption)
|
||||
{
|
||||
foreach($story->stages as $branch => $stage)
|
||||
{
|
||||
if(isset($branchTagOption[$branch])) echo '<p>' . $branchTagOption[$branch] . html::select("stages[$branch]", $lang->story->stageList, $stage, "class='form-control chosen'") . '</p>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::select('stage', $lang->story->stageList, $story->stage, "class='form-control chosen'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->category;?></th>
|
||||
<td><?php echo html::select('category', $lang->story->categoryList, $story->category, "class='form-control chosen'");?></td>
|
||||
|
||||
Reference in New Issue
Block a user