Merge branch 'sprint/168_liyuchun_44216' into 'sprint/168'
* Finish task #44217,#44218,#44219,#44220. See merge request easycorp/zentaopms!405
This commit is contained in:
@@ -21,3 +21,4 @@
|
||||
.table-grouped > tbody > tr:hover {background: #fff !important;}
|
||||
|
||||
.projectColor {width: 5px; padding: 0px !important; border-right: unset !important}
|
||||
th .count {font-weight: 500; color: #8b91a2;}
|
||||
|
||||
@@ -12,7 +12,7 @@ function changeView(view)
|
||||
function renderUserAvatar(user, objectType, objectID)
|
||||
{
|
||||
var $noPrivAndNoAssigned = $('<div class="avatar has-text avatar-sm avatar-circle" title="' + noAssigned + '" style="background: #ccc"><i class="icon icon-account"></i></div>');
|
||||
if(objectType == 'task')
|
||||
if(objectType == 'task')
|
||||
{
|
||||
if(!priv.canAssignTask && !user) return $noPrivAndNoAssigned;
|
||||
var link = createLink('task', 'assignto', 'executionID=' + executionID + '&id=' + objectID, '', true);
|
||||
@@ -22,7 +22,7 @@ function renderUserAvatar(user, objectType, objectID)
|
||||
if(!priv.canAssignStory && !user) return $noPrivAndNoAssigned;
|
||||
var link = createLink('story', 'assignto', 'id=' + objectID, '', true);
|
||||
}
|
||||
if(objectType == 'bug')
|
||||
if(objectType == 'bug')
|
||||
{
|
||||
if(!priv.canAssignBug && !user) return $noPrivAndNoAssigned;
|
||||
var link = createLink('bug', 'assignto', 'id=' + objectID, '', true);
|
||||
@@ -538,7 +538,7 @@ function createColumnCreateMenu(options)
|
||||
if(col.laneType == 'story')
|
||||
{
|
||||
if(priv.canCreateStory) items.push({label: storyLang.create, url: $.createLink('story', 'create', 'productID=' + productID, '', true), className: 'iframe'});
|
||||
if(priv.canBatchCreateStory) items.push({label: storyLang.batchCreate, url: $.createLink('story', 'batchcreate', 'productID=' + productID + '&branch=0&moduleID=0&storyID=0&executionID=' + executionID, '', true), className: 'iframe'});
|
||||
if(priv.canBatchCreateStory) items.push({label: executionLang.batchCreateStroy, url: $.createLink('story', 'batchcreate', 'productID=' + productID + '&branch=0&moduleID=0&storyID=0&executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '90%'}});
|
||||
if(priv.canLinkStory) items.push({label: executionLang.linkStory, url: $.createLink('execution', 'linkStory', 'executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '90%'}});
|
||||
if(priv.canLinkStoryByPlane) items.push({label: executionLang.linkStoryByPlan, url: '#linkStoryByPlan', 'attrs' : {'data-toggle': 'modal'}});
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='projectColor'></th>
|
||||
<th><?php echo $lang->execution->doingProject . ' (' . $projectCount . ')';?></th>
|
||||
<th><?php echo $lang->execution->doingProject . ' <span class="count">' . $projectCount . '</span>';?></th>
|
||||
<?php foreach($lang->execution->kanbanColType as $status => $colName):?>
|
||||
<th><?php echo $colName . ($status != 'closed' ? ' (' . $statusCount[$status] . ')' : '');?></th>
|
||||
<th><?php echo $colName . ($status != 'closed' ? ' <span class="count">' . $statusCount[$status] . '</span>' : '');?></th>
|
||||
<?php endforeach;?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<button class='btn btn-primary' type='button' data-toggle='dropdown'><i class='icon icon-plus'></i> <?php echo $this->lang->create;?> <span class='caret'></span></button>
|
||||
<ul class='dropdown-menu pull-right'>
|
||||
<?php if($canCreateStory) echo '<li>' . html::a(helper::createLink('story', 'create', "productID=$productID&branch=0&moduleID=0&story=0&execution=$execution->id", '', true), $lang->execution->createStory, '', "class='iframe'") . '</li>';?>
|
||||
<?php if($canBatchCreateStory) echo '<li>' . html::a(helper::createLink('story', 'batchCreate', "productID=$productID&branch=0&moduleID=0&story=0&execution=$execution->id", '', true), $lang->execution->batchCreateStroy, '', "class='iframe'") . '</li>';?>
|
||||
<?php if($canBatchCreateStory) echo '<li>' . html::a(helper::createLink('story', 'batchCreate', "productID=$productID&branch=0&moduleID=0&story=0&execution=$execution->id", '', true), $lang->execution->batchCreateStroy, '', "class='iframe' data-width='90%'") . '</li>';?>
|
||||
<?php if($canLinkStory) echo '<li>' . html::a(helper::createLink('execution', 'linkStory', "execution=$execution->id", '', true), $lang->execution->linkStory, '', "class='iframe' data-width='90%'") . '</li>';?>
|
||||
<?php if($canLinkStoryByPlane) echo '<li>' . html::a('#linkStoryByPlan', $lang->execution->linkStoryByPlan, '', 'data-toggle="modal"') . '</li>';?>
|
||||
<?php if($hasStoryButton and $hasBugButton) echo '<li class="divider"></li>';?>
|
||||
|
||||
@@ -529,7 +529,7 @@ class kanbanModel extends model
|
||||
$lane->type = $type;
|
||||
$lane->groupby = $groupBy;
|
||||
$lane->extra = $groupKey;
|
||||
$lane->name = $laneName;
|
||||
$lane->name = $this->lang->$type->$groupBy . ": " . $laneName;
|
||||
$lane->color = $this->config->kanban->laneColorList[$colorIndex];
|
||||
|
||||
$colorIndex += 1;
|
||||
|
||||
@@ -402,16 +402,13 @@ class storyModel extends model
|
||||
public function batchCreate($productID = 0, $branch = 0, $type = 'story')
|
||||
{
|
||||
$forceReview = $this->checkForceReview();
|
||||
foreach($_POST['needReview'] as $index => $value)
|
||||
foreach($_POST['title'] as $index => $value)
|
||||
{
|
||||
if($_POST['title'][$index] and isset($_POST['reviewer'][$index])) $_POST['reviewer'][$index] = array_filter($_POST['reviewer'][$index]);
|
||||
if($_POST['title'][$index] and empty($_POST['reviewer'][$index]))
|
||||
if($_POST['title'][$index] and empty($_POST['reviewer'][$index]) and $forceReview)
|
||||
{
|
||||
if($value || $forceReview)
|
||||
{
|
||||
dao::$errors[] = $this->lang->story->errorEmptyReviewedBy;
|
||||
return false;
|
||||
}
|
||||
dao::$errors[] = $this->lang->story->errorEmptyReviewedBy;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -460,7 +457,7 @@ class storyModel extends model
|
||||
$story->category = $stories->category[$i];
|
||||
$story->pri = $stories->pri[$i];
|
||||
$story->estimate = $stories->estimate[$i];
|
||||
$story->status = ($stories->needReview[$i] == 0 and !$forceReview) ? 'active' : 'draft';
|
||||
$story->status = (empty($stories->reviewer[$i]) and !$forceReview) ? 'active' : 'draft';
|
||||
$story->stage = ($this->app->tab == 'project' or $this->app->tab == 'execution') ? 'projected' : 'wait';
|
||||
$story->keywords = $stories->keywords[$i];
|
||||
$story->sourceNote = $stories->sourceNote[$i];
|
||||
|
||||
@@ -46,7 +46,9 @@
|
||||
<th class='c-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='c-branch<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo $lang->product->branch;?></th>
|
||||
<th class='c-module<?php echo zget($requiredFields, 'module', '', ' required');?>'><?php echo $lang->story->module;?></th>
|
||||
<?php if(!isonlybody()):?>
|
||||
<th class='c-plan<?php echo zget($visibleFields, 'plan', ' hidden') . zget($requiredFields, 'plan', '', ' required');?>'><?php echo $lang->story->plan;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-name required has-btn'><?php echo $lang->story->title;?></th>
|
||||
<th class='c-spec<?php echo zget($visibleFields, 'spec', ' hidden') . zget($requiredFields, 'spec', '', ' required');?>'><?php echo $lang->story->spec;?></th>
|
||||
<th class='c-source<?php echo zget($visibleFields, 'source', ' hidden') . zget($requiredFields, 'source', '', ' required');?>'><?php echo $lang->story->source;?></th>
|
||||
@@ -55,7 +57,6 @@
|
||||
<th class='c-category'><?php echo $lang->story->category;?></th>
|
||||
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->story->pri;?></th>
|
||||
<th class='c-estimate<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', '', ' required');?>'><?php echo $lang->story->estimate;?></th>
|
||||
<th class='c-review<?php echo zget($visibleFields, 'review', ' hidden') . zget($requiredFields, 'review', '', ' required');?>'><?php echo $lang->story->needReview;?></th>
|
||||
<th class='<?php echo zget($visibleFields, 'review', ' hidden');?>' style="width: 200px !important"><?php echo $lang->story->reviewedBy;?></th>
|
||||
<th class='c-keywords<?php echo zget($visibleFields, 'keywords', ' hidden') . zget($requiredFields, 'keywords', '', ' required');?>'><?php echo $lang->story->keywords;?></th>
|
||||
<?php
|
||||
@@ -69,7 +70,9 @@
|
||||
<td class="c-id">$idPlus</td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select('branch[$id]', $branches, $branch, "class='form-control chosen' onchange='setModuleAndPlan(this.value, $productID, \$id)'");?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select('module[$id]', $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<?php if(!isonlybody()):?>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'><?php echo html::select('plan[$id]', $plans, $planID, "class='form-control chosen'");?></td>
|
||||
<?php endif;?>
|
||||
<td style='overflow:visible'>
|
||||
<div class="input-group">
|
||||
<div class="input-control has-icon-right">
|
||||
@@ -94,9 +97,7 @@
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select('category[$id]', $lang->story->categoryList, 'feature', "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'pri', ' hidden')?>' style='overflow:visible'><?php echo html::select('pri[$id]', $priList, $pri, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'estimate', 'hidden')?>'><?php echo html::input('estimate[$id]', $estimate, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'review', 'hidden')?>'><?php echo html::select('needReview[$id]', $lang->story->reviewList, $needReview, "class='form-control'");?></td>
|
||||
<?php $isDisabled = $needReview ? '' : 'disabled';?>
|
||||
<td class='<?php echo zget($visibleFields, 'review', 'hidden')?>'><?php echo html::select('reviewer[$id][]', $users, '', "class='form-control chosen' multiple $isDisabled");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'review', 'hidden')?>'><?php echo html::select('reviewer[$id][]', $users, '', "class='form-control chosen' multiple");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input('keywords[$id]', '', "class='form-control'");?></td>
|
||||
<?php foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->loadModel('flow')->getFieldControl($extendField, '', $extendField->field . '[$id]') . "</td>";?>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user