* Adjust repo control init.
This commit is contained in:
@@ -45,7 +45,7 @@ class repo extends control
|
||||
*/
|
||||
public function commonAction(int $repoID = 0, int $objectID = 0)
|
||||
{
|
||||
$tab = $this->app->tab;
|
||||
$tab = isonlybody() ? '' : $this->app->tab;
|
||||
$this->repos = $this->repo->getRepoPairs($tab, $objectID);
|
||||
|
||||
if($tab == 'project')
|
||||
@@ -65,7 +65,7 @@ class repo extends control
|
||||
$this->loadModel('execution')->setMenu($objectID);
|
||||
$this->view->executionID = $objectID;
|
||||
}
|
||||
elseif($tab != 'admin')
|
||||
elseif($tab != 'admin' && !isonlybody())
|
||||
{
|
||||
$this->repo->setMenu($this->repos, $repoID);
|
||||
}
|
||||
|
||||
@@ -30,10 +30,13 @@ jsVar('urlParams', "repoID=$repoID&objectID=$objectID&entry=%s&oldRevision=$oldR
|
||||
\zin\featureBar();
|
||||
|
||||
$dropMenus = array();
|
||||
if(common::hasPriv('repo', 'download')) $dropMenus[] = array('text' => $this->lang->repo->downloadDiff, 'icon' => 'download', 'data-link' => $this->repo->createLink('download', "repoID=$repoID&path={path}&fromRevision=$oldRevision&toRevision=$newRevision&type=path"), 'id' => 'repoDownloadCode');
|
||||
if(!isonlybody())
|
||||
{
|
||||
if(common::hasPriv('repo', 'download')) $dropMenus[] = array('text' => $this->lang->repo->downloadDiff, 'icon' => 'download', 'data-link' => $this->repo->createLink('download', "repoID=$repoID&path={path}&fromRevision=$oldRevision&toRevision=$newRevision&type=path"), 'id' => 'repoDownloadCode');
|
||||
|
||||
$dropMenus[] = array('text' => $this->lang->repo->viewDiffList['inline'], 'icon' => 'snap-house', 'id' => 'inline', 'class' => 'inline-appose');
|
||||
$dropMenus[] = array('text' => $this->lang->repo->viewDiffList['appose'], 'icon' => 'col-archive', 'id' => 'appose', 'class' => 'inline-appose');
|
||||
$dropMenus[] = array('text' => $this->lang->repo->viewDiffList['inline'], 'icon' => 'snap-house', 'id' => 'inline', 'class' => 'inline-appose');
|
||||
$dropMenus[] = array('text' => $this->lang->repo->viewDiffList['appose'], 'icon' => 'col-archive', 'id' => 'appose', 'class' => 'inline-appose');
|
||||
}
|
||||
div(
|
||||
set::id('fileTabs'),
|
||||
tabs
|
||||
|
||||
Reference in New Issue
Block a user