* Finish task #36363.

This commit is contained in:
hufangzhou
2021-03-02 09:40:41 +08:00
parent c8654a8b9b
commit 46df489385
7 changed files with 34 additions and 34 deletions
+2 -2
View File
@@ -157,8 +157,8 @@ class personnel extends control
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => $this->getError()));
$locateLink = $this->session->whitelistBrowse ? $this->session->whitelistBrowse : $this->createLink($module, 'whitelist', "objectID=$objectID");
$openModule = $module == 'program' ? ($from == 'PRJ' || $from == 'my' ? '#open=project' : '#open=program') : '';
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink . $openModule));
$openGroup = $module == 'program' ? ($from == 'PRJ' || $from == 'my' ? '#open=project' : '#open=program') : '';
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink . $openGroup));
}
$this->loadModel('dept');
+4 -4
View File
@@ -12,17 +12,17 @@
?>
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<?php $openModule = $module == 'program' ? ($from == 'PRJ' || $from == 'my' ? "data-group='project'" : "data-group='program'") : '';?>
<?php $openGroup = $module == 'program' ? ($from == 'PRJ' || $from == 'my' ? "data-group='project'" : "data-group='program'") : '';?>
<div class="btn-toolbar pull-left">
<?php if($module == 'program') echo html::a($goback, $lang->goback, '', 'class="btn btn-secondary"');?>
<?php $moduleMethod = $module == 'program' ? 'PRJWhitelist' : 'whitelist';?>
<?php $vars = $module == 'program' ? "objectID=$objectID&programID=$programID&module=$module&from=$from" : "objectID=$objectID";?>
<?php echo html::a($this->createLink($module, $moduleMethod, $vars), '<span class="text">' . $lang->personnel->whitelist . '</span>', '', "class='btn btn-link btn-active-text' $openModule");?>
<?php echo html::a($this->createLink($module, $moduleMethod, $vars), '<span class="text">' . $lang->personnel->whitelist . '</span>', '', "class='btn btn-link btn-active-text' $openGroup");?>
</div>
<div class="btn-toolbar pull-right">
<?php $moduleMethod = $module == 'program' ? 'PRJAddWhitelist' : 'addWhitelist';?>
<?php $vars = $module == 'program' ? "objectID=$objectID&deptID=0&programID=$programID&from=$from" : "objectID=$objectID";?>
<?php common::printLink($module, $moduleMethod, $vars, "<i class='icon icon-plus'></i>" . $lang->personnel->addWhitelist, '', "class='btn btn-primary' $openModule");?>
<?php common::printLink($module, $moduleMethod, $vars, "<i class='icon icon-plus'></i>" . $lang->personnel->addWhitelist, '', "class='btn btn-primary' $openGroup");?>
</div>
</div>
<div id='mainContent' class='main-row fade'>
@@ -61,7 +61,7 @@
<td class='c-actions'>
<?php
$deleteClass = common::hasPriv($module, 'unbindWhielist') ? 'btn' : 'btn disabled';
echo html::a($this->createLink($module, 'unbindWhielist', "id=$user->id&confirm=no"), '<i class="icon-unlink"></i>', 'hiddenwin', "title='{$lang->personnel->delete}' class='{$deleteClass}' $openModule");
echo html::a($this->createLink($module, 'unbindWhielist', "id=$user->id&confirm=no"), '<i class="icon-unlink"></i>', 'hiddenwin', "title='{$lang->personnel->delete}' class='{$deleteClass}' $openGroup");
?>
</td>
</tr>
+9 -9
View File
@@ -901,15 +901,15 @@ class product extends control
$moduleGroup = in_array($moduleGroup, array('product', 'qa'))? $moduleGroup : 'project';
$products = $moduleGroup == 'project' ? $this->product->getProductsByProject($this->session->PRJ) : $this->product->getList();
$this->view->link = $this->product->getProductLink($module, $method, $extra);
$this->view->productID = $productID;
$this->view->module = $module;
$this->view->method = $method;
$this->view->extra = $extra;
$this->view->products = $products;
$this->view->projectID = $moduleGroup == 'project' ? $this->session->PRJ : 0;
$this->view->programs = $this->loadModel('program')->getPGMOption();
$this->view->openModule = $moduleGroup;
$this->view->link = $this->product->getProductLink($module, $method, $extra);
$this->view->productID = $productID;
$this->view->module = $module;
$this->view->method = $method;
$this->view->extra = $extra;
$this->view->products = $products;
$this->view->projectID = $moduleGroup == 'project' ? $this->session->PRJ : 0;
$this->view->programs = $this->loadModel('program')->getPGMOption();
$this->view->openGroup = $moduleGroup;
$this->display();
}
+3 -3
View File
@@ -27,19 +27,19 @@ foreach($products as $product)
{
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id);
$myProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "class='text-important' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='$openModule'");
$myProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "class='text-important' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='$openGroup'");
}
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, html::icon($lang->icons['product']) . ' ' . $productName, '', "title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='$openModule'");
$normalProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='$openGroup'");
}
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, html::icon($lang->icons['product']) . ' ' . $productName, '', "title='{$productName}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='$openModule'");
$closedProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "title='{$productName}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='$openGroup'");
}
}
?>
+5 -5
View File
@@ -1958,9 +1958,9 @@ class programModel extends model
echo "</div>";
}
$from = $project->from == 'PRJ' ? 'PRJ' : 'pgmproject';
$openModule = $project->from == 'PRJ' ? 'project' : 'program';
common::printIcon('program', 'PRJEdit', "projectID=$project->id&from=$from", $project, 'list', 'edit', '', '', '', "data-group=$openModule", '', $project->id);
$from = $project->from == 'PRJ' ? 'PRJ' : 'pgmproject';
$openGroup = $project->from == 'PRJ' ? 'project' : 'program';
common::printIcon('program', 'PRJEdit', "projectID=$project->id&from=$from", $project, 'list', 'edit', '', '', '', "data-group=$openGroup", '', $project->id);
common::printIcon('program', 'PRJManageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', '', $this->lang->project->team, $project->id);
if($this->config->systemMode == 'new') common::printIcon('program', 'PRJGroup', "projectID=$project->id&programID=$programID", $project, 'list', 'lock', '', '', '', '', '', $project->id);
@@ -1969,8 +1969,8 @@ class programModel extends model
echo "<div class='btn-group'>";
echo "<button type='button' class='btn dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}'><i class='icon-more-alt'></i></button>";
echo "<ul class='dropdown-menu pull-right text-center' role='menu'>";
common::printIcon('program', 'PRJManageProducts', "projectID=$project->id&programID=$programID&from=$from", $project, 'list', 'link', '', 'btn-action', '', "data-group=$openModule", $this->lang->project->manageProducts, $project->id);
if($this->config->systemMode == 'new') common::printIcon('program', 'PRJWhitelist', "projectID=$project->id&programID=$programID&module=program&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', "data-group=$openModule", '', $project->id);
common::printIcon('program', 'PRJManageProducts', "projectID=$project->id&programID=$programID&from=$from", $project, 'list', 'link', '', 'btn-action', '', "data-group=$openGroup", $this->lang->project->manageProducts, $project->id);
if($this->config->systemMode == 'new') common::printIcon('program', 'PRJWhitelist', "projectID=$project->id&programID=$programID&module=program&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', "data-group=$openGroup", '', $project->id);
if(common::hasPriv('program','PRJDelete')) echo html::a(inLink("PRJDelete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$this->lang->program->PRJDelete}'");
echo "</ul>";
echo "</div>";
+8 -8
View File
@@ -3279,12 +3279,12 @@ class storyModel extends model
$canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchReview or $canBatchChangeStage or $canBatchChangeBranch or $canBatchChangeModule or $canBatchChangePlan or $canBatchAssignTo or $canBatchUnlinkStory);
$module = $this->app->rawModule == 'projectstory' ? 'projectstory' : 'story';
$canView = common::hasPriv($module, 'view');
$openModule = $this->app->rawModule == 'projectstory' ? 'project' : 'product';
$storyLink = helper::createLink($module, 'view', "storyID=$story->id");
$account = $this->app->user->account;
$id = $col->id;
$module = $this->app->rawModule == 'projectstory' ? 'projectstory' : 'story';
$canView = common::hasPriv($module, 'view');
$openGroup = $this->app->rawModule == 'projectstory' ? 'project' : 'product';
$storyLink = helper::createLink($module, 'view', "storyID=$story->id");
$account = $this->app->user->account;
$id = $col->id;
if($col->show)
{
$class = "c-{$id}";
@@ -3347,7 +3347,7 @@ class storyModel extends model
case 'id':
if($canBatchAction)
{
echo html::checkbox('storyIdList', array($story->id => '')) . html::a($storyLink, sprintf('%03d', $story->id), '', "data-group='$openModule'");
echo html::checkbox('storyIdList', array($story->id => '')) . html::a($storyLink, sprintf('%03d', $story->id), '', "data-group='$openGroup'");
}
else
{
@@ -3365,7 +3365,7 @@ class storyModel extends model
if($story->branch and isset($branches[$story->branch])) echo "<span class='label label-outline label-badge'>{$branches[$story->branch]}</span> ";
if($story->module and isset($modulePairs[$story->module])) echo "<span class='label label-gray label-badge'>{$modulePairs[$story->module]}</span> ";
if($story->parent > 0) echo '<span class="label label-badge label-light" title="' . $this->lang->story->children . '">' . $this->lang->story->childrenAB . '</span> ';
echo $canView ? html::a($storyLink, $story->title, '', "style='color: $story->color' data-group='$openModule'") : "<span style='color: $story->color'>{$story->title}</span>";
echo $canView ? html::a($storyLink, $story->title, '', "style='color: $story->color' data-group='$openGroup'") : "<span style='color: $story->color'>{$story->title}</span>";
if(!empty($story->children)) echo '<a class="story-toggle" data-id="' . $story->id . '"><i class="icon icon-angle-double-right"></i></a>';
break;
case 'plan':
+3 -3
View File
@@ -50,14 +50,14 @@
<?php if(common::canModify('product', $product)): ?>
<?php
$otherParam = '';
$openModule = 'product';
$openGroup = 'product';
if($this->app->rawModule == 'projectstory')
{
$otherParam = "storyID=&projectID={$this->session->PRJ}";
$openModule = 'project';
$openGroup = 'project';
}
?>
<?php common::printLink('story', 'create', "productID={$story->product}&branch={$story->branch}&moduleID={$story->module}&$otherParam", "<i class='icon icon-plus'></i>" . $lang->story->create, '', "class='btn btn-primary' data-group='$openModule'"); ?>
<?php common::printLink('story', 'create', "productID={$story->product}&branch={$story->branch}&moduleID={$story->module}&$otherParam", "<i class='icon icon-plus'></i>" . $lang->story->create, '', "class='btn btn-primary' data-group='$openGroup'"); ?>
<?php endif;?>
</div>
<?php endif;?>