* Finish task#1004678
This commit is contained in:
@@ -273,7 +273,8 @@ if($config->vision == 'lite')
|
||||
|
||||
if($config->inQuickon)
|
||||
{
|
||||
$lang->admin->menuList->platform['subMenu']['dashboard'] = array('link' => "{$lang->dashboard}|system|dashboard|");
|
||||
$dashboard = is_object($lang->dashboard) ? $lang->dashboard->common : $lang->dashboard;
|
||||
$lang->admin->menuList->platform['subMenu']['dashboard'] = array('link' => "{$dashboard}|system|dashboard|");
|
||||
$lang->admin->menuList->platform['menuOrder']['5'] = 'dashboard';
|
||||
|
||||
$lang->admin->menuList->system['subMenu']['backup'] = array('link' => "{$lang->backup->common}|system|browsebackup|", 'alias' => 'restorebackup');
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
global $lang, $app;
|
||||
$app->loadLang('sonarqube');
|
||||
$app->loadLang('bug');
|
||||
|
||||
$config->repo->dtable = new stdclass();
|
||||
|
||||
@@ -219,3 +220,30 @@ $config->repo->taskDtable->fieldList['status']['statusMap'] = $lang->task->statu
|
||||
$config->repo->taskDtable->fieldList['status']['sortType'] = true;
|
||||
$config->repo->taskDtable->fieldList['status']['show'] = true;
|
||||
$config->repo->taskDtable->fieldList['status']['group'] = 1;
|
||||
|
||||
$config->repo->reviewDtable = new stdclass();
|
||||
|
||||
$config->repo->reviewDtable->fieldList['id']['title'] = $lang->idAB;
|
||||
$config->repo->reviewDtable->fieldList['id']['type'] = 'id';
|
||||
|
||||
$config->repo->reviewDtable->fieldList['title']['type'] = 'title';
|
||||
$config->repo->reviewDtable->fieldList['title']['link'] = array('module' => 'bug', 'method' => 'view', 'params' => 'bugID={id}&from=repo');
|
||||
|
||||
$config->repo->reviewDtable->fieldList['fileLocation']['title'] = $lang->repo->file . '/' . $lang->repo->location;
|
||||
$config->repo->reviewDtable->fieldList['fileLocation']['name'] = 'entry';
|
||||
$config->repo->reviewDtable->fieldList['fileLocation']['width'] = '300';
|
||||
|
||||
$config->repo->reviewDtable->fieldList['revisionA']['name'] = 'revisionA';
|
||||
$config->repo->reviewDtable->fieldList['revisionA']['width'] = '100';
|
||||
|
||||
$config->repo->reviewDtable->fieldList['type']['title'] = $lang->repo->type;
|
||||
$config->repo->reviewDtable->fieldList['type']['name'] = 'repoType';
|
||||
$config->repo->reviewDtable->fieldList['type']['map'] = $lang->repo->typeList;
|
||||
|
||||
$config->repo->reviewDtable->fieldList['status']['map'] = $lang->bug->statusList;
|
||||
|
||||
$config->repo->reviewDtable->fieldList['openedBy']['type'] = 'user';
|
||||
|
||||
$config->repo->reviewDtable->fieldList['assignedTo']['type'] = 'user';
|
||||
|
||||
$config->repo->reviewDtable->fieldList['openedDate']['type'] = 'datetime';
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
window.renderRepobugList = function (result, {col, row, value})
|
||||
{
|
||||
if(col.name == 'entry')
|
||||
{
|
||||
result[0] = {html: '<span class="label primary mr-1">' + row.data.lines + '</span><a href="' + row.data.link + '" data-toggle="modal">' + row.data.entry + '</a>'};
|
||||
return result;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* The link view file of mr module of ZenTaoPMS.
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Zeng Gang<zenggang@easycorp.ltd>
|
||||
* @package mr
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
namespace zin;
|
||||
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
$bug->revisionA = $repo->SCM != 'Subversion' ? substr(strtr($bug->v2, '*', '-'), 0, 10) : $bug->v2;
|
||||
|
||||
$lines = explode(',', trim($bug->lines, ','));
|
||||
$bug->entry = $repo->name . '/' . $this->repo->decodePath($bug->entry);
|
||||
if(empty($bug->v1))
|
||||
{
|
||||
$revision = $repo->SCM != 'Subversion' ? $this->repo->getGitRevisionName($bug->v2, zget($historys, $bug->v2)) : $bug->v2;
|
||||
$bug->link = $this->repo->createLink('view', "repoID=$repoID&objectID=0&entry={$bug->entry}&revision={$bug->v2}") . "#L$lines[0]";
|
||||
}
|
||||
else
|
||||
{
|
||||
$revision = $repo->SCM != 'Subversion' ? substr($bug->v1, 0, 10) : $bug->v1;
|
||||
$revision .= ' : ';
|
||||
$revision .= $repo->SCM != 'Subversion' ? substr($bug->v2, 0, 10) : $bug->v2;
|
||||
if($repo->SCM != 'Subversion') $revision .= ' (' . zget($historys, $bug->v1) . ' : ' . zget($historys, $bug->v2) . ')';
|
||||
$bug->link = $this->repo->createLink('diff', "repoID=$repoID&objectID=0&entry={$bug->entry}&oldRevision={$bug->v1}&newRevision={$bug->v2}") . "#L$lines[0]";
|
||||
}
|
||||
}
|
||||
$bugs = initTableData($bugs, $config->repo->reviewDtable->fieldList);
|
||||
|
||||
featureBar
|
||||
(
|
||||
set::linkParams("repoID=$repoID&browseType={key}"),
|
||||
);
|
||||
|
||||
dtable
|
||||
(
|
||||
set::userMap($users),
|
||||
set::cols($config->repo->reviewDtable->fieldList),
|
||||
set::data($bugs),
|
||||
set::onRenderCell(jsRaw('window.renderRepobugList')),
|
||||
set::footPager(usePager()),
|
||||
);
|
||||
|
||||
render();
|
||||
|
||||
Reference in New Issue
Block a user