* [bug#50138] Return modal when recall in modal.

This commit is contained in:
xieqiyu
2024-05-29 09:50:05 +08:00
committed by caoyanyi
parent efde3a4222
commit 4360b18b7e
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -706,6 +706,8 @@ class story extends control
$action = $story->status == 'changing' ? 'recalledChange' : 'Recalled';
$this->loadModel('action')->create('story', $storyID, $action);
if($from == 'modal') return $this->send(array('result' => 'success', 'load' => 'modal'));
$locateLink = $this->session->storyList ? $this->session->storyList : $this->createLink('product', 'browse', "productID={$story->product}");
if($from == 'view')
{
+1
View File
@@ -177,6 +177,7 @@ $versionBtn = count($versions) > 1 ? to::title(dropdown
set::items($versions)
)) : null;
if($isInModal) $config->story->actionList['recall']['url'] = str_replace('&from=view&', '&from=modal&', $config->story->actionList['recall']['url']);
if($story->status == 'changing') $config->story->actionList['recall']['text'] = $lang->story->recallChange;
$hasRepo = $this->loadModel('repo')->getListByProduct($story->product, 'Gitlab,Gitea,Gogs,GitFox', 1);
$actions = $story->deleted ? array() : $this->loadModel('common')->buildOperateMenu($story);