+ Add data-app and executionID for repo page.
This commit is contained in:
@@ -231,8 +231,9 @@ $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['title']['type'] = 'title';
|
||||
$config->repo->reviewDtable->fieldList['title']['data-app'] = $app->tab;
|
||||
$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';
|
||||
|
||||
@@ -327,6 +327,7 @@ class repo extends control
|
||||
$entry = urldecode($entry);
|
||||
$pathInfo = helper::mbPathinfo($entry);
|
||||
|
||||
if($this->app->tab == 'execution') $this->view->executionID = $objectID;
|
||||
$this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->repo->view;
|
||||
$this->view->dropMenus = $this->repoZen->getBranchAndTagItems($repo, $this->cookie->repoBranch);
|
||||
$this->view->type = 'view';
|
||||
|
||||
@@ -24,6 +24,7 @@ jsVar('sortLink', createLink('repo', 'review', "repoID=$repoID&browseType=$brows
|
||||
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
$objectID = $app->tab == 'execution' ? $bug->execution : 0;
|
||||
$bug->revisionA = $repo->SCM != 'Subversion' ? strtr($bug->v2, '*', '-') : $bug->v2;
|
||||
|
||||
$lines = explode(',', trim($bug->lines, ','));
|
||||
@@ -31,7 +32,7 @@ foreach($bugs as $bug)
|
||||
{
|
||||
$bug->v2 = $repo->SCM != 'Subversion' ? strtr($bug->v2, '*', '-') : $bug->v2;
|
||||
$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]";
|
||||
$bug->link = $this->repo->createLink('view', "repoID=$repoID&objectID={$objectID}&entry={$bug->entry}&revision={$bug->v2}") . "#L$lines[0]";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -39,7 +40,7 @@ foreach($bugs as $bug)
|
||||
$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]";
|
||||
$bug->link = $this->repo->createLink('diff', "repoID=$repoID&objectID={$objectID}&entry={$bug->entry}&oldRevision={$bug->v1}&newRevision={$bug->v2}") . "#L$lines[0]";
|
||||
}
|
||||
|
||||
$bug->entry = $repo->name . '/' . $this->repo->decodePath($bug->entry);
|
||||
|
||||
Reference in New Issue
Block a user