Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into importExport

This commit is contained in:
tanghucheng
2022-08-25 15:46:21 +08:00
14 changed files with 62 additions and 29 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ class tabsEntry extends baseEntry
foreach($tabs as $menuKey)
{
if(!isset($this->lang->my->$menuKey)) continue;
if(!common::hasPriv('my', $menuKey)) continue;
if(!common::hasPriv('my', 'work')) continue;
$label = $this->lang->my->$menuKey;
if($menuKey == 'calendar') $label = $this->lang->my->calendarAction;
+3 -3
View File
@@ -254,7 +254,7 @@ class userEntry extends Entry
if(!common::hasPriv('my', 'todo')) break;
$control = $this->loadController('my', 'todo');
$control->todo($this->param('date', 'all'), '', 'all', 'date_desc', 0, 0, $this->param('limit', 5), 1);
$control->todo($this->param('date', 'before'), '', 'all', 'date_desc', 0, $this->param('limit', 5), 1);
$data = $this->getData();
if($data->status == 'success')
@@ -313,7 +313,7 @@ class userEntry extends Entry
{
$this->config->openMethods[] = 'my.risk';
$control = $this->loadController('my', 'risk');
$control->risk('createdBy', 0, 'id_desc', 0, $this->param('limit', 5), 1);
$control->risk('assignedTo', 0, 'id_desc', 0, $this->param('limit', 5), 1);
$data = $this->getData();
if($data->status == 'success')
@@ -331,7 +331,7 @@ class userEntry extends Entry
{
$this->config->openMethods[] = 'my.myMeeting';
$control = $this->loadController('my', 'myMeeting');
$control->myMeeting('all', '', 'id_desc', 0, $this->param('limit', 5), 1);
$control->myMeeting('futureMeeting', '', 'id_desc', 0, $this->param('limit', 5), 1);
$data = $this->getData();
if($data->status == 'success')
+12 -5
View File
@@ -179,10 +179,14 @@ if(!isset($config->setCode) or $config->setCode == 1)
{
$config->execution->datatable->defaultField = array('id', 'name', 'code', 'project', 'PM', 'status', 'progress', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn');
}
else
elseif($config->systemMode == 'new')
{
$config->execution->datatable->defaultField = array('id', 'name', 'project', 'PM', 'status', 'progress', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn');
}
else
{
$config->execution->datatable->defaultField = array('id', 'name', 'PM', 'status', 'progress', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn');
}
$config->execution->datatable->fieldList['id']['title'] = 'idAB';
$config->execution->datatable->fieldList['id']['fixed'] = 'left';
@@ -202,10 +206,13 @@ if(!isset($config->setCode) or $config->setCode == 1)
$config->execution->datatable->fieldList['code']['required'] = 'no';
}
$config->execution->datatable->fieldList['project']['title'] = 'project';
$config->execution->datatable->fieldList['project']['fixed'] = 'no';
$config->execution->datatable->fieldList['project']['width'] = '100';
$config->execution->datatable->fieldList['project']['required'] = 'no';
if($config->systemMode == 'new')
{
$config->execution->datatable->fieldList['project']['title'] = 'project';
$config->execution->datatable->fieldList['project']['fixed'] = 'no';
$config->execution->datatable->fieldList['project']['width'] = '100';
$config->execution->datatable->fieldList['project']['required'] = 'no';
}
$config->execution->datatable->fieldList['PM']['title'] = 'owner';
$config->execution->datatable->fieldList['PM']['fixed'] = 'no';
+1
View File
@@ -3752,6 +3752,7 @@ class execution extends control
$this->view->pager = $pager;
$this->view->orderBy = $orderBy;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->projects = array('') + $this->project->getPairsByProgram();
$this->view->status = $status;
$this->view->from = $from;
$this->view->param = $param;
+2 -2
View File
@@ -491,7 +491,7 @@ $lang->resource->story = new stdclass();
$lang->resource->story->create = 'create';
$lang->resource->story->batchCreate = 'batchCreate';
$lang->resource->story->edit = 'editAction';
$lang->resource->story->linkStory = 'linkStory';
if($config->URAndSR) $lang->resource->story->linkStory = 'linkStory';
$lang->resource->story->batchEdit = 'batchEdit';
$lang->resource->story->export = 'exportAction';
$lang->resource->story->delete = 'deleteAction';
@@ -540,7 +540,7 @@ $lang->story->methodOrder[90] = 'tasks';
$lang->story->methodOrder[95] = 'bugs';
$lang->story->methodOrder[100] = 'cases';
$lang->story->methodOrder[105] = 'report';
$lang->story->methodOrder[110] = 'linkStory';
if($config->URAndSR) $lang->story->methodOrder[110] = 'linkStory';
$lang->story->methodOrder[115] = 'batchChangeBranch';
$lang->story->methodOrder[120] = 'batchChangeModule';
$lang->story->methodOrder[125] = 'batchToTask';
+5 -4
View File
@@ -155,10 +155,11 @@ class messageModel extends model
$moduleName = $objectType == 'case' ? 'testcase' : $objectType;
$moduleName = $objectType == 'kanbancard' ? 'kanban' : $objectType;
$space = common::checkNotCN() ? ' ' : '';
$data = $user->realname . $space . $this->lang->action->label->$actionType . $space . $this->lang->action->objectTypes[$objectType];
$dataID = $objectType == 'kanbancard' ? $object->kanban : $objectID;
$data .= ' ' . html::a($sysURL . helper::createLink($moduleName, 'view', "id=$dataID"), "[#{$objectID}::{$object->$field}]");
$space = common::checkNotCN() ? ' ' : '';
$data = $user->realname . $space . $this->lang->action->label->$actionType . $space . $this->lang->action->objectTypes[$objectType];
$dataID = $objectType == 'kanbancard' ? $object->kanban : $objectID;
$url = helper::createLink($moduleName, 'view', "id=$dataID");
$data .= ' ' . html::a((strpos($url, $sysURL) === 0 ? '' : $sysURL) . $url, "[#{$objectID}::{$object->$field}]");
if($isonlybody) $_GET['onlybody'] = 'yes';
+1 -1
View File
@@ -1077,7 +1077,7 @@ class productModel extends model
$modules = array();
$branchList = $this->loadModel('branch')->getPairs($productID, '', $projectID);
$branchModuleList = $this->tree->getOptionMenu($productID, 'story', 0, array_keys($branchList));
foreach($branchModuleList as $branchID => $branchModules) $modules[] = $branchModules;
foreach($branchModuleList as $branchID => $branchModules) $modules = array_merge($modules, $branchModules);
}
else
{
+5
View File
@@ -458,6 +458,11 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
echo '</div></li>';
}
else
{
$class= "class='disabled'";
echo "<li $class>" . html::a('javascript:;', $lang->product->branchName[$this->session->currentProductType], '', $class) . '</li>';
}
if($storyType == 'story')
{
+4
View File
@@ -853,6 +853,9 @@ class story extends control
/* Process the module when branch products are switched to normal products. */
if($product->type == 'normal' and !empty($story->branch)) $this->view->moduleOptionMenu += $this->tree->getModulesName($story->module);
$branch = $product->type == 'branch' ? ($story->branch > 0 ? $story->branch : '0') : 'all';
$productStories = $this->story->getProductStoryPairs($story->product, $branch, 0, 'all', 'id_desc', 0, '');
$this->view->title = $this->lang->story->edit . "STORY" . $this->lang->colon . $this->view->story->title;
$this->view->position[] = $this->lang->story->edit;
$this->view->story = $story;
@@ -861,6 +864,7 @@ class story extends control
$this->view->product = $product;
$this->view->plans = $this->loadModel('productplan')->getPairsForStory($story->product, $story->branch == 0 ? 'all' : $story->branch, 'skipParent');
$this->view->products = $products;
$this->view->productStories = $productStories;
$this->view->branchOption = $branchOption;
$this->view->branchTagOption = $branchTagOption;
$this->view->reviewers = array_keys($reviewerList);
+6
View File
@@ -79,4 +79,10 @@ $(function()
var modalTrigger = new $.zui.ModalTrigger({type: 'iframe', width: '95%', url: link});
modalTrigger.show();
});
$('#duplicateStory').picker(
{
disableEmptySearch : true,
dropWidth : 'auto'
});
})
+15 -7
View File
@@ -4214,7 +4214,7 @@ class storyModel extends model
if(strpos('draft,changing', $story->status) !== false)
{
$menu .= $this->buildMenu('story', 'submitReview', "storyID=$story->id&storyType=$story->type", $story, $type, 'sub-review', '', 'iframe', true, "data-width='50%'");
$menu .= $this->buildMenu('story', 'submitReview', "storyID=$story->id&storyType=$story->type", $story, $type, 'confirm', '', 'iframe', true, "data-width='50%'");
}
else
{
@@ -4291,7 +4291,7 @@ class storyModel extends model
if($type == 'view')
{
$menu .= $this->buildMenu('story', 'change', $params . "&from=&storyType=$story->type", $story, $type, 'alter', '', 'showinonlybody');
if(strpos('draft,changing', $story->status) !== false) $menu .= $this->buildMenu('story', 'submitReview', $params . "&storyType=$story->type", $story, $type, 'sub-review', '', 'showinonlybody iframe', true, "data-width='50%'");
if(strpos('draft,changing', $story->status) !== false) $menu .= $this->buildMenu('story', 'submitReview', $params . "&storyType=$story->type", $story, $type, 'confirm', '', 'showinonlybody iframe', true, "data-width='50%'");
$title = $story->status == 'changing' ? $this->lang->story->recallChange : $this->lang->story->recall;
$menu .= $this->buildMenu('story', 'recall', $params . "&from=view&confirm=no&storyType=$story->type", $story, $type, 'undo', 'hiddenwin', 'showinonlybody', false, '', $title);
@@ -4355,17 +4355,25 @@ class storyModel extends model
$story->reviewer = isset($story->reviewer) ? $story->reviewer : array();
$story->notReview = isset($story->notReview) ? $story->notReview : array();
if(common::hasPriv('story', 'review'))
if(strpos('draft,changing', $story->status) !== false)
{
$reviewDisabled = in_array($this->app->user->account, $story->notReview) and ($story->status == 'draft' or $story->status == 'changing') ? '' : 'disabled';
$story->from = 'execution';
$menu .= common::printIcon('story', 'review', "story={$story->id}&from=story", $story, 'list', 'search', '', $reviewDisabled, false, "data-group=execution");
if(common::hasPriv('story', 'submitReview')) $menu .= common::printIcon('story', 'submitReview', "storyID=$story->id&from=story", $story, 'list', 'confirm', '', 'iframe', true, "data-width='50%'");
}
else
{
if(common::hasPriv('story', 'review'))
{
$reviewDisabled = in_array($this->app->user->account, $story->notReview) and ($story->status == 'draft' or $story->status == 'changing') ? '' : 'disabled';
$story->from = 'execution';
$menu .= common::printIcon('story', 'review', "story={$story->id}&from=story", $story, 'list', 'search', '', $reviewDisabled, false, "data-group=execution");
}
}
if(common::hasPriv('story', 'recall'))
{
$recallDisabled = empty($story->reviewedBy) and strpos('draft,changing', $story->status) !== false and !empty($story->reviewer) ? '' : 'disabled';
$menu .= common::printIcon('story', 'recall', "story={$story->id}", $story, 'list', 'undo', 'hiddenwin', $recallDisabled, '', '', $this->lang->story->recall);
$title = $story->status == 'changing' ? $this->lang->story->recallChange : $this->lang->story->recall;
$menu .= common::printIcon('story', 'recall', "story={$story->id}", $story, 'list', 'undo', 'hiddenwin', $recallDisabled, '', '', $title);
}
$this->lang->task->create = $this->lang->execution->wbs;
+2 -2
View File
@@ -38,12 +38,12 @@
<td class='story-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></td>
<td>
<?php if($story->status == 'draft') unset($reasonList['cancel']);?>
<table class='w-p100'>
<table class='w-p100 table-form'>
<tr>
<td class='pd-0'>
<?php echo html::select("closedReasons[$storyID]", $reasonList, 'done', "class=form-control onchange=setDuplicateAndChild(this.value,$storyID) style='min-width: 80px'");?>
</td>
<td class='pd-0 w-p50 required' id='<?php echo 'duplicateStoryBox' . $storyID;?>' <?php if($story->closedReason != 'duplicate') echo "style='display:none'";?>>
<td class='pd-0 w-p40 required' id='<?php echo 'duplicateStoryBox' . $storyID;?>' <?php if($story->closedReason != 'duplicate') echo "style='display:none'";?>>
<?php echo html::select("duplicateStoryIDList[$storyID]", $productStoryList[$story->product][$story->branch], $story->duplicateStory, "class='form-control' placeholder='{$lang->idAB}'");?>
</td>
<td class='pd-0' id='<?php echo 'childStoryBox' . $storyID;?>' <?php if($story->closedReason != 'subdivided') echo "style='display:none'";?>>
+3 -3
View File
@@ -285,13 +285,13 @@
<table class='table table-form'>
<tr id='duplicateStoryBox'>
<th class='w-90px'><?php echo $lang->story->duplicateStory;?></th>
<td><?php echo html::input('duplicateStory', $story->duplicateStory == 0 ? '' : $story->duplicateStory, "class='form-control'");?></td>
<td><?php echo html::select('duplicateStory', $productStories, $story->duplicateStory, 'class="form-control"'); ?></td>
</tr>
<tr class='text-top'>
<th class='thWidth'><?php echo $lang->story->linkStory;?></th>
<th class='thWidth'><?php echo $story->type == 'story' ? $lang->requirement->linkStory : $lang->story->linkStory;?></th>
<td>
<?php if(common::hasPriv('story', 'linkStories') and $story->type == 'story') echo html::a("#", $lang->story->linkStoriesAB, '', "class='btn btn-info' id='linkStoriesLink'");?>
<?php if(common::hasPriv('story', 'linkRequirements') and $story->type == 'requirement') echo html::a("#", $lang->story->linkRequirementsAB, '', "class='btn btn-info' id='linkStoriesLink'");?>
<?php if(common::hasPriv('requirement', 'linkRequirements') and $story->type == 'requirement') echo html::a("#", $lang->story->linkRequirementsAB, '', "class='btn btn-info' id='linkStoriesLink'");?>
</td>
</tr>
<tr>
+2 -1
View File
@@ -487,10 +487,11 @@ class webhookModel extends model
$tab = $meeting->project ? '#app=project' : '#app=my';
}
$sysUrl = common::getSysURL();
$viewLink = helper::createLink($objectType, 'view', "id=$objectID", 'html') . $tab;
if($oldOnlyBody) $_GET['onlybody'] = $oldOnlyBody;
return $viewLink;
return ltrim($viewLink, $sysUrl);
}
/**