* Fix bug#12376.

This commit is contained in:
qiyu-xie
2021-04-26 15:25:59 +08:00
parent c7a282cdd3
commit 09f16fe1b4
4 changed files with 18 additions and 9 deletions
+1
View File
@@ -341,6 +341,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
<ul class='dropdown-menu'> <ul class='dropdown-menu'>
<?php <?php
$class = $canBatchClose ? '' : "class='disabled'"; $class = $canBatchClose ? '' : "class='disabled'";
$productID = $this->app->openApp == 'project' ? 0 : $productID;
$actionLink = $this->createLink('story', 'batchClose', "productID=$productID&projectID=0&storyType=$storyType"); $actionLink = $this->createLink('story', 'batchClose', "productID=$productID&projectID=0&storyType=$storyType");
$misc = $canBatchClose ? "onclick=\"setFormAction('$actionLink')\"" : ''; $misc = $canBatchClose ? "onclick=\"setFormAction('$actionLink')\"" : '';
echo "<li $class>" . html::a('#', $lang->close, '', $misc) . "</li>"; echo "<li $class>" . html::a('#', $lang->close, '', $misc) . "</li>";
+1
View File
@@ -193,6 +193,7 @@ class projectrelease extends control
public function view($releaseID, $type = 'story', $link = 'false', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 100, $pageID = 1) public function view($releaseID, $type = 'story', $link = 'false', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 100, $pageID = 1)
{ {
$this->session->set('buildList', $this->app->getURI(true), 'execution'); $this->session->set('buildList', $this->app->getURI(true), 'execution');
$this->session->set('storyList', $this->app->getURI(true), $this->app->openApp);
$this->loadModel('story'); $this->loadModel('story');
$this->loadModel('bug'); $this->loadModel('bug');
+1 -1
View File
@@ -146,7 +146,7 @@
if(common::hasPriv('story', 'batchClose')) if(common::hasPriv('story', 'batchClose'))
{ {
$closeURL = $this->createLink('story', 'batchClose', "productID=$release->product"); $closeURL = $this->createLink('story', 'batchClose');
echo html::a("###", $lang->story->batchClose, '', "onclick='setFormAction(\"$closeURL\", \"\", this)' class='btn'"); echo html::a("###", $lang->story->batchClose, '', "onclick='setFormAction(\"$closeURL\", \"\", this)' class='btn'");
} }
?> ?>
+15 -8
View File
@@ -1195,18 +1195,25 @@ class story extends control
$this->view->position[] = html::a($this->createLink('execution', 'story', "executionID=$execution->id"), $execution->name); $this->view->position[] = html::a($this->createLink('execution', 'story', "executionID=$execution->id"), $execution->name);
$this->view->title = $execution->name . $this->lang->colon . $this->lang->story->batchClose; $this->view->title = $execution->name . $this->lang->colon . $this->lang->story->batchClose;
} }
/* The stories of my. */
else else
{ {
$this->lang->story->menu = $this->lang->my->menu; if($this->app->openApp == 'project')
$this->lang->story->menuOrder = $this->lang->my->menuOrder; {
$this->loadModel('my')->setMenu(); $this->project->setMenu($this->session->project);
$this->view->title = $this->lang->story->batchEdit;
}
else
{
$this->lang->story->menu = $this->lang->my->menu;
$this->lang->story->menuOrder = $this->lang->my->menuOrder;
$this->loadModel('my')->setMenu();
if($from == 'work') $this->lang->my->menu->work['subModule'] = 'story'; if($from == 'work') $this->lang->my->menu->work['subModule'] = 'story';
if($from == 'contribute') $this->lang->my->menu->contribute['subModule'] = 'story'; if($from == 'contribute') $this->lang->my->menu->contribute['subModule'] = 'story';
$this->view->position[] = html::a($this->createLink('my', 'story'), $this->lang->my->story); $this->view->position[] = html::a($this->createLink('my', 'story'), $this->lang->my->story);
$this->view->title = $this->lang->story->batchEdit; $this->view->title = $this->lang->story->batchEdit;
}
} }
/* Judge whether the editedStories is too large and set session. */ /* Judge whether the editedStories is too large and set session. */