diff --git a/module/repo/ui/browse.html.php b/module/repo/ui/browse.html.php index 7e65fa6b52..4e0eb67b8f 100644 --- a/module/repo/ui/browse.html.php +++ b/module/repo/ui/browse.html.php @@ -32,7 +32,7 @@ foreach($branches as $branchName) $base64BranchID = helper::safe64Encode(base64_encode($branchName)); $branchLink = $this->createLink('repo', 'browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"); - $branchMenus[] = array('text' => $branchName, 'id' => $branchName, 'keys' => zget(common::convert2Pinyin(array($branchName), $branchName), ''), 'url' => $branchLink); + $branchMenus[] = array('text' => $branchName, 'id' => $branchName, 'keys' => zget(common::convert2Pinyin(array($branchName), $branchName), ''), 'url' => $branchLink, 'data-app' => $app->tab); } foreach($tags as $tagName) { @@ -40,7 +40,7 @@ foreach($tags as $tagName) $base64TagID = helper::safe64Encode(base64_encode($tagName)); $tagLink = $this->createLink('repo', 'browse', "repoID=$repoID&branchID=$base64TagID&objectID=$objectID&path=&revision=HEAD&refresh=0&branchOrTag=tag"); - $tagMenus[] = array('text' => $tagName, 'id' => $tagName, 'keys' => zget(common::convert2Pinyin(array($tagName), $tagName), ''), 'url' => $tagLink); + $tagMenus[] = array('text' => $tagName, 'id' => $tagName, 'keys' => zget(common::convert2Pinyin(array($tagName), $tagName), ''), 'url' => $tagLink, 'data-app' => $app->tab); } $tabs = array(array('name' => 'branch', 'text' => $lang->repo->branch), array('name' => 'tag', 'text' => $lang->repo->tag)); @@ -90,9 +90,9 @@ featureBar( /* zin: Define the toolbar on main menu. */ $refreshLink = $this->createLink('repo', 'browse', "repoID=$repoID&branchID=" . $base64BranchID . "&objectID=$objectID&path=" . $this->repo->encodePath($path) . "&revision=$revision&refresh=1"); -$refreshItem = array('text' => $lang->refresh, 'url' => $refreshLink, 'class' => 'primary', 'icon' => 'refresh'); +$refreshItem = array('text' => $lang->refresh, 'url' => $refreshLink, 'class' => 'primary', 'icon' => 'refresh', 'data-app' => $app->tab); -$createItem = array('text' => $lang->repo->createAction, 'url' => createLink('repo', 'create', "objectID={$objectID}")); +$createItem = array('text' => $lang->repo->createAction, 'url' => createLink('repo', 'create', "objectID={$objectID}"), 'data-app' => $app->tab); $tableData = initTableData($infos, $config->repo->repoDtable->fieldList, $this->repo); @@ -217,7 +217,7 @@ toolbar array($downloadWg) ), ), - hasPriv('repo', 'create') && $this->app->tab == 'project' ? item + hasPriv('repo', 'create') && $app->tab == 'project' ? item ( set($createItem + array ( diff --git a/module/repo/ui/create.html.php b/module/repo/ui/create.html.php index 8c8b29f924..c4d3b2e39c 100644 --- a/module/repo/ui/create.html.php +++ b/module/repo/ui/create.html.php @@ -10,7 +10,15 @@ declare(strict_types=1); */ namespace zin; -if($this->app->tab != 'devops') dropmenu(set::module('repo'), set::tab('repo')); +if($this->app->tab != 'devops') +{ + dropmenu + ( + set::module($app->tab), + set::tab($app->tab), + set::url(createLink($app->tab, 'ajaxGetDropMenuData', "objectID=$objectID&module={$app->rawModule}&method={$app->rawMethod}")) + ); +} jsVar('pathGitTip', $lang->repo->example->path->git); jsVar('pathSvnTip', $lang->repo->example->path->svn);