* Delete release of execution menu and adjust session.

This commit is contained in:
holan20180123
2021-03-24 15:54:53 +08:00
parent 7f289f5170
commit 0afdfe0b60
3 changed files with 12 additions and 12 deletions
-1
View File
@@ -272,7 +272,6 @@ $lang->execution->menu->qa = array('link' => "{$lang->qa->common}|executio
$lang->execution->menu->repo = array('link' => "{$lang->repo->common}|repo|browse|repoID=0&objectID=%s", 'subModule' => 'repo');
$lang->execution->menu->doc = array('link' => "{$lang->doc->common}|doc|objectLibs|type=execution&objectID=%s", 'subModule' => 'doc');
$lang->execution->menu->build = array('link' => "{$lang->build->common}|execution|build|executionID=%s", 'subModule' => 'build');
$lang->execution->menu->release = array('link' => "{$lang->release->common}|projectrelease|browse|projectID=0&executionID=%s", 'subModule' => 'projectrelease');
$lang->execution->menu->action = array('link' => "$lang->dynamic|execution|dynamic|executionID=%s");
$lang->execution->menu->settings = array('link' => "$lang->settings|execution|view|executionID=%s", 'subModule' => 'personnel', 'alias' => 'edit,manageproducts,team,whitelist,addwhitelist,managemembers', 'class' => 'dropdown dropdown-hover');
+10 -9
View File
@@ -67,7 +67,7 @@ class projectrelease extends control
*/
public function browse($projectID = 0, $executionID = 0, $type = 'all')
{
$this->session->set('releaseList', $this->app->getURI(true));
$this->session->set('releaseList', $this->app->getURI(true), 'project');
$project = $this->project->getById($projectID);
$execution = $this->loadModel('execution')->getById($executionID);
@@ -93,11 +93,10 @@ class projectrelease extends control
* Create a release.
*
* @param int $projectID
* @param int $executionID
* @access public
* @return void
*/
public function create($projectID, $executionID = 0)
public function create($projectID)
{
$this->app->loadConfig('release');
$this->config->projectrelease->create = $this->config->release->create;
@@ -120,8 +119,7 @@ class projectrelease extends control
foreach($releaseBuilds as $build) unset($builds[$build]);
unset($builds['trunk']);
if($projectID) $this->project->setMenu($projectID);
if($executionID) $this->loadModel('execution')->setMenu($executionID);
$this->project->setMenu($projectID);
$this->commonAction();
$this->view->title = $this->view->project->name . $this->lang->colon . $this->lang->release->create;
@@ -167,6 +165,9 @@ class projectrelease extends control
$this->commonAction($release->product, $release->branch);
$build = $this->build->getById($release->build);
/* Set project menu. */
$this->project->setMenu($release->project);
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->release->edit;
$this->view->position[] = $this->lang->release->edit;
$this->view->release = $release;
@@ -191,8 +192,8 @@ class projectrelease extends control
*/
public function view($releaseID, $type = 'story', $link = 'false', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 100, $pageID = 1)
{
if($type == 'story') $this->session->set('storyList', $this->app->getURI(true));
if($type == 'bug' or $type == 'leftBug') $this->session->set('bugList', $this->app->getURI(true));
if($type == 'story') $this->session->set('storyList', $this->app->getURI(true), 'product');
if($type == 'bug' or $type == 'leftBug') $this->session->set('bugList', $this->app->getURI(true), 'qa');
$this->loadModel('story');
$this->loadModel('bug');
@@ -428,7 +429,7 @@ class projectrelease extends control
$this->projectrelease->linkStory($releaseID);
die(js::locate(inlink('view', "releaseID=$releaseID&type=story"), 'parent'));
}
$this->session->set('storyList', inlink('view', "releaseID=$releaseID&type=story&link=true&param=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")));
$this->session->set('storyList', inlink('view', "releaseID=$releaseID&type=story&link=true&param=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), 'product');
$release = $this->projectrelease->getByID($releaseID);
$build = $this->loadModel('build')->getByID($release->build);
@@ -548,7 +549,7 @@ class projectrelease extends control
die(js::locate(inlink('view', "releaseID=$releaseID&type=$type"), 'parent'));
}
$this->session->set('bugList', inlink('view', "releaseID=$releaseID&type=$type&link=true&param=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")));
$this->session->set('bugList', inlink('view', "releaseID=$releaseID&type=$type&link=true&param=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), 'qa');
/* Set menu. */
$release = $this->projectrelease->getByID($releaseID);
$build = $this->loadModel('build')->getByID($release->build);
+2 -2
View File
@@ -23,7 +23,7 @@
</div>
<div class="btn-toolbar pull-right">
<?php if(common::canModify('execution', $execution)):?>
<?php common::printLink('projectrelease', 'create', "projectID=$projectID&executionID=$executionID", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
<?php common::printLink('projectrelease', 'create', "projectID=$projectID", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
<?php endif;?>
</div>
</div>
@@ -33,7 +33,7 @@
<p>
<span class="text-muted"><?php echo $lang->release->noRelease;?></span>
<?php if(common::canModify('execution', $execution) and common::hasPriv('projectrelease', 'create')):?>
<?php echo html::a($this->createLink('projectrelease', 'create', "projectID=$projectID&executionID=$executionID"), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('projectrelease', 'create', "projectID=$projectID"), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>