Merge branch 'sprint/180_xieqiyu_46543' into 'sprint/180'

Sprint/180 xieqiyu 46543

See merge request easycorp/zentaopms!1162
This commit is contained in:
朱金勇
2021-12-28 06:57:22 +00:00
10 changed files with 36 additions and 22 deletions
+1 -1
View File
@@ -296,5 +296,5 @@ $config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme');
/* Program privs.*/
$config->programPriv = new stdclass();
$config->programPriv->scrum = array('projectstory', 'projectrelease', 'project', 'build', 'bug', 'testcase', 'testreport', 'caselib', 'doc', 'repo', 'meeting', 'stakeholder');
$config->programPriv->scrum = array('projectstory', 'projectrelease', 'project', 'build', 'bug', 'testcase', 'testreport', 'doc', 'repo', 'meeting', 'stakeholder');
$config->programPriv->waterfall = array_merge($config->programPriv->scrum, array('workestimation', 'durationestimation', 'budget', 'programplan', 'review', 'reviewissue', 'weekly', 'cm', 'milestone', 'design', 'issue', 'risk', 'opportunity', 'measrecord', 'auditplan', 'trainplan', 'gapanalysis', 'pssp', 'researchplan', 'researchreport'));
+1 -1
View File
@@ -289,7 +289,7 @@
<td>
<?php
if($bug->story) echo html::a($this->createLink('story', 'view', "storyID=$bug->story", '', true), "#$bug->story $bug->storyTitle", '', "class='iframe' data-width='80%'");
if($bug->storyStatus == 'active' and $bug->latestStoryVersion > $bug->storyVersion)
if($bug->storyStatus == 'active' and $bug->latestStoryVersion > $bug->storyVersion and common::hasPriv('bug', 'confirmStoryChange'))
{
echo "(<span class='warning'>{$lang->story->changed}</span> ";
echo html::a($this->createLink('bug', 'confirmStoryChange', "bugID=$bug->id"), $lang->confirm, 'hiddenwin');
+17 -11
View File
@@ -1905,28 +1905,34 @@ class docModel extends model
*/
public function buildCreateButton4Doc($objectType, $objectID, $libID)
{
if(!common::hasPriv('doc', 'create') and !common::hasPriv('doc', 'createLib')) return '';
if($objectType == 'book')
{
$html = html::a(helper::createLink('doc', 'createLib', "type=$objectType&objectID=$objectID"), '<i class="icon icon-plus"></i> ' . $this->lang->doc->createBook, '', 'class="btn btn-secondary iframe"');
}
elseif($libID)
{
$html = "<div class='dropdown' id='createDropdown'>";
$html = "<div class='dropdown' id='createDropdown'>";
$html .= "<button class='btn btn-primary' type='button' data-toggle='dropdown'><i class='icon icon-plus'></i> " . $this->lang->doc->createAB . " <span class='caret'></span></button>";
$html .= "<ul class='dropdown-menu pull-right'>";
foreach($this->lang->doc->typeList as $typeKey => $typeName)
if(common::hasPriv('doc', 'create'))
{
$class = strpos($this->config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';
$icon = zget($this->config->doc->iconList, $typeKey);
$html .= "<li>";
$html .= html::a(helper::createLink('doc', 'create', "objectType=$objectType&objectID=$objectID&libID=$libID&moduleID=0&type=$typeKey", '', $class ? true : false), "<i class='icon-$icon icon'></i> " . $typeName, '', "class='$class' data-app='{$this->app->tab}'");
$html .= "</li>";
if($typeKey == 'url') $html .= '<li class="divider"></li>';
foreach($this->lang->doc->typeList as $typeKey => $typeName)
{
$class = strpos($this->config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';
$icon = zget($this->config->doc->iconList, $typeKey);
$html .= "<li>";
$html .= html::a(helper::createLink('doc', 'create', "objectType=$objectType&objectID=$objectID&libID=$libID&moduleID=0&type=$typeKey", '', $class ? true : false), "<i class='icon-$icon icon'></i> " . $typeName, '', "class='$class' data-app='{$this->app->tab}'");
$html .= "</li>";
if($typeKey == 'url') $html .= '<li class="divider"></li>';
}
}
if(common::hasPriv('doc', 'createLib'))
{
$html .= '<li class="divider"></li>';
if(common::hasPriv('doc', 'create')) $html .= '<li class="divider"></li>';
$html .= '<li>' . html::a(helper::createLink('doc', 'createLib', "type=$objectType&objectID=$objectID"), "<i class='icon-doc-lib icon'></i> " . $this->lang->doc->createLib, '', "class='iframe' data-width='70%'") . '</li>';
}
$html .= "</ul></div>";
@@ -2579,8 +2585,8 @@ EOT;
$tab = strpos(',doc,product,project,execution,', ",{$this->app->tab},") !== false ? $this->app->tab : 'doc';
if($tab != 'doc') $this->loadModel($tab)->setMenu($objectID);
$this->lang->TRActions = $this->buildCollectButton4Doc();
$this->lang->TRActions .= common::hasPriv('doc', 'create') ? $this->buildCreateButton4Doc($type, $objectID, $libID) : '';
$this->lang->TRActions = $this->buildCollectButton4Doc();
$this->lang->TRActions .= $this->buildCreateButton4Doc($type, $objectID, $libID);
return array($libs, $libID, $object, $objectID);
}
+2
View File
@@ -25,10 +25,12 @@
<th><?php echo $lang->group->desc;?></th>
<td><?php echo html::textarea('desc', '', "rows=5 class=form-control");?></td>
</tr>
<?php if($this->app->tab != 'project'):?>
<tr>
<th><?php echo $lang->group->limited;?></th>
<td><?php echo html::checkbox('limited', '');?></td>
</tr>
<?php endif;?>
<tr>
<td colspan='2' class='text-center'><?php echo html::submitButton();?></td>
</tr>
+1 -1
View File
@@ -599,7 +599,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
</div>
<div class="modal-body">
<div class='input-group'>
<?php echo html::select('plan', $productPlans[$productID], '', "class='form-control chosen' id='plan'");?>
<?php echo html::select('plan', zget($productPlans, $productID, ''), '', "class='form-control chosen' id='plan'");?>
<span class='input-group-btn'><?php echo html::commonButton($lang->execution->linkStory, "id='toTaskButton'", 'btn btn-primary');?></span>
</div>
</div>
+8 -4
View File
@@ -125,7 +125,11 @@ $config->project->datatable->fieldList['actions']['width'] = '180';
$config->project->datatable->fieldList['actions']['required'] = 'yes';
$config->project->datatable->fieldList['actions']['pri'] = '1';
$config->project->removePriv['project'] = array('index', 'browse', 'kanban', 'create', 'batchEdit', 'qa', 'updateOrder', 'createGuide', 'programTitle');
$config->project->removePriv['bug'] = array('batchChangePlan');
$config->project->removePriv['doc'] = array('catalog', 'index');
$config->project->removePriv['auditplan'] = array('delete');
$config->project->removePriv['project'] = array('index', 'browse', 'kanban', 'create', 'batchEdit', 'qa', 'updateOrder', 'createGuide', 'programTitle', 'export');
$config->project->removePriv['bug'] = array('browse', 'batchChangePlan', 'batchCreate', 'batchEdit', 'batchConfirm', 'batchResolve', 'batchClose', 'batchActivate', 'report', 'batchChangeModule', 'batchChangeBranch');
$config->project->removePriv['testcase'] = array('browse', 'batchChangeModule', 'batchChangeBranch');
$config->project->removePriv['doc'] = array('catalog', 'index');
$config->project->removePriv['repo'] = array('edit', 'delete', 'maintain', 'setRules');
$config->project->removePriv['testreport'] = array('browse');
$config->project->removePriv['auditplan'] = array('delete');
if(!isset($config->maxVersion)) $config->project->removePriv['stakeholder'] = array('issue', 'viewIssue', 'userIssue');
+2 -2
View File
@@ -2079,8 +2079,8 @@ class projectModel extends model
$this->lang->switcherMenu = $this->getSwitcher($objectID, $this->app->rawModule, $this->app->rawMethod);
/* Reset project priv. */
$moduleName = $this->app->getModuleName();
$methodName = $this->app->getMethodName();
$moduleName = $this->app->rawModule;
$methodName = $this->app->rawMethod;
$this->loadModel('common')->resetProjectPriv($objectID);
if(!$this->common->isOpenMethod($moduleName, $methodName) and !commonModel::hasPriv($moduleName, $methodName)) $this->common->deny($moduleName, $methodName, false);
+1 -1
View File
@@ -14,7 +14,7 @@
<?php js::set('confirmDelete', $lang->stakeholder->confirmDelete);?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php echo html::a($this->createLink('stakeholder', 'browse', 'browseType=all'), '<span class="text">' . $lang->stakeholder->browse . '</span>', '', 'class="btn btn-link btn-active-text"');?>
<?php echo html::a($this->createLink('stakeholder', 'browse', "projectID=$projectID"), '<span class="text">' . $lang->stakeholder->browse . '</span>', '', 'class="btn btn-link btn-active-text"');?>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::hasPriv('stakeholder', 'batchcreate') and common::hasPriv('stakeholder', 'create')):?>
+2
View File
@@ -1325,6 +1325,8 @@ class testtask extends control
*/
public function results($runID, $caseID = 0, $version = 0)
{
if($this->app->tab == 'project') $this->loadModel('project')->setMenu($this->session->project);
if($runID)
{
$case = $this->testtask->getRunById($runID)->case;
+1 -1
View File
@@ -120,7 +120,7 @@
<?php endif; endif; $childId++;?>
</tr>
<?php endforeach;?>
<?php if($result->caseResult == 'fail'):?>
<?php if($result->caseResult == 'fail' and common::hasPriv('testcase', 'createBug')):?>
<tr>
<td></td><td></td><td></td><td></td><td></td><td></td>
<td><?php echo html::commonButton($lang->testcase->createBug, "onclick='createBug(this)'", "btn btn-primary createBtn");?></td>