* Finish task #59439.
This commit is contained in:
@@ -25,6 +25,8 @@ class ciModel extends model
|
||||
session_write_close();
|
||||
}
|
||||
common::setMenuVars('devops', $this->session->repoID);
|
||||
|
||||
$this->lang->switcherMenu = $this->loadModel('repo')->getSwitcher($this->session->repoID);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -396,7 +396,7 @@ $lang->qa->dividerMenu = ',bug,testtask,caselib,';
|
||||
$lang->devops->menu = new stdclass();
|
||||
$lang->devops->menu->code = array('link' => "{$lang->repo->common}|repo|browse|repoID=%s", 'alias' => 'diff,view,revision,log,blame,showsynccommit');
|
||||
$lang->devops->menu->mr = array('link' => "{$lang->devops->mr}|mr|browse|repoID=%s");
|
||||
$lang->devops->menu->compile = array('link' => "{$lang->devops->compile}|job|browse", 'subModule' => 'compile,job');
|
||||
$lang->devops->menu->compile = array('link' => "{$lang->devops->compile}|job|browse|repoID=%s", 'subModule' => 'compile,job');
|
||||
$lang->devops->menu->app = array('link' => "{$lang->app}|devops|app|%s");
|
||||
$lang->devops->menu->set = array('link' => "{$lang->devops->set}|repo|maintain", 'subModule' => 'gitlab,jenkins,sonarqube', 'alias' => 'setrules,create,edit');
|
||||
|
||||
|
||||
@@ -22,12 +22,13 @@ class compile extends control
|
||||
public function __construct($moduleName = '', $methodName = '')
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
$this->loadModel('ci')->setMenu();
|
||||
if($methodName != 'browse') $this->loadModel('ci')->setMenu();
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse jenkins build.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param int $jobID
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
@@ -36,8 +37,17 @@ class compile extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($jobID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
public function browse($repoID = 0, $jobID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
if($jobID)
|
||||
{
|
||||
$job = $this->loadModel('job')->getById($jobID);
|
||||
$repoID = $job->repo;
|
||||
|
||||
$this->view->job = $job;
|
||||
}
|
||||
$this->loadModel('ci')->setMenu($repoID);
|
||||
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
@@ -45,10 +55,9 @@ class compile extends control
|
||||
$this->view->position[] = html::a($this->createLink('job', 'browse'), $this->lang->ci->job);
|
||||
$this->view->position[] = $this->lang->compile->browse;
|
||||
|
||||
$this->loadModel('job');
|
||||
if($jobID) $this->view->job = $this->job->getById($jobID);
|
||||
$this->view->repoID = $repoID;
|
||||
$this->view->jobID = $jobID;
|
||||
$this->view->buildList = $this->compile->getList($jobID, $orderBy, $pager);
|
||||
$this->view->buildList = $this->compile->getList($repoID, $jobID, $orderBy, $pager);
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->display();
|
||||
|
||||
@@ -38,13 +38,14 @@ class compileModel extends model
|
||||
/**
|
||||
* Get build list.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param int $jobID
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getList($jobID, $orderBy = 'id_desc', $pager = null)
|
||||
public function getList($repoID, $jobID, $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
return $this->dao->select('t1.id, t1.name, t1.job, t1.status, t1.createdDate, t1.testtask, t2.pipeline, t2.triggerType, t2.comment, t2.atDay, t2.atTime, t2.engine, t3.name as repoName, t4.name as jenkinsName')->from(TABLE_COMPILE)->alias('t1')
|
||||
->leftJoin(TABLE_JOB)->alias('t2')->on('t1.job=t2.id')
|
||||
@@ -52,6 +53,7 @@ class compileModel extends model
|
||||
->leftJoin(TABLE_PIPELINE)->alias('t4')->on('t2.server=t4.id')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t1.job')->ne('0')
|
||||
->beginIF(!empty($repoID))->andWhere('t3.id')->eq($repoID)->fi()
|
||||
->beginIF(!empty($jobID))->andWhere('t1.job')->eq($jobID)->fi()
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
echo html::a($this->createLink('job', 'browse'), "<span class='text'>{$lang->ci->task}</span>", '', "class='btn btn-link'");
|
||||
echo html::a($this->createLink('compile', 'browse'), "<span class='text'>" . ($jobID ? $job->name : '') . " {$lang->ci->history}</span>", '', "class='btn btn-link btn-active-text'");
|
||||
echo html::a($this->createLink('job', 'browse', "repoID=$repoID"), "<span class='text'>{$lang->ci->task}</span>", '', "class='btn btn-link'");
|
||||
echo html::a($this->createLink('compile', 'browse', "repoID=$repoID&jobID=$jobID"), "<span class='text'>" . ($jobID ? $job->name : '') . " {$lang->ci->history}</span>", '', "class='btn btn-link btn-active-text'");
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if($job->engine == 'gitlab') echo html::a(helper::createLink('ci', "checkCompileStatus", "compileID={$build->id}"), "<i class='icon icon-eye icon-sm'></i> ". $lang->compile->refresh, '', "class='btn btn-secondary' id='refreshBtn'");?>
|
||||
<?php echo html::a(helper::createLink('compile', "browse", "jobID=$build->job"), "<i class='icon icon-back icon-sm'></i> ". $lang->goback, '', "class='btn btn-secondary'");?>
|
||||
<?php echo html::a(helper::createLink('compile', "browse", "repoID={$job->repo}&jobID={$build->job}"), "<i class='icon icon-back icon-sm'></i> ". $lang->goback, '', "class='btn btn-secondary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent'>
|
||||
|
||||
@@ -22,7 +22,7 @@ class job extends control
|
||||
public function __construct($moduleName = '', $methodName = '')
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
$this->loadModel('ci')->setMenu();
|
||||
if($methodName != 'browse') $this->loadModel('ci')->setMenu();
|
||||
$this->projectID = isset($_GET['project']) ? $_GET['project'] : 0;
|
||||
}
|
||||
|
||||
@@ -36,17 +36,21 @@ class job extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
public function browse($repoID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* Set session. */
|
||||
$this->loadModel('ci')->setMenu($repoID);
|
||||
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$this->app->loadLang('compile');
|
||||
$this->view->jobList = $this->job->getList($orderBy, $pager);
|
||||
$this->view->jobList = $this->job->getList($repoID, $orderBy, $pager);
|
||||
|
||||
$this->view->title = $this->lang->ci->job . $this->lang->colon . $this->lang->job->browse;
|
||||
$this->view->position[] = $this->lang->ci->job;
|
||||
$this->view->position[] = $this->lang->job->browse;
|
||||
$this->view->repoID = $repoID;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
|
||||
@@ -167,7 +171,7 @@ class job extends control
|
||||
}
|
||||
|
||||
$this->loadModel('action')->create('job', $id, 'edited');
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse', "repoID={$job->repo}")));
|
||||
}
|
||||
|
||||
$repo = $this->loadModel('repo')->getRepoByID($job->repo);
|
||||
|
||||
@@ -36,17 +36,21 @@ class jobModel extends model
|
||||
/**
|
||||
* Get job list.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @param string $engine
|
||||
* @param string $pipeline
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getList($orderBy = 'id_desc', $pager = null, $engine = '', $pipeline = '')
|
||||
public function getList($repoID = 0, $orderBy = 'id_desc', $pager = null, $engine = '', $pipeline = '')
|
||||
{
|
||||
return $this->dao->select('t1.*, t2.name as repoName, t3.name as jenkinsName')->from(TABLE_JOB)->alias('t1')
|
||||
->leftJoin(TABLE_REPO)->alias('t2')->on('t1.repo=t2.id')
|
||||
->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t1.server=t3.id')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->beginIF($repoID)->andWhere('t1.repo')->eq($repoID)->fi()
|
||||
->beginIF($engine)->andWhere('t1.engine')->eq($engine)->fi()
|
||||
->beginIF($pipeline)->andWhere('t1.pipeline')->eq($pipeline)->fi()
|
||||
->orderBy($orderBy)
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php echo html::a($this->createLink('job', 'browse'), "<span class='text'>{$lang->ci->task}</span>", '', "class='btn btn-link btn-active-text'");?>
|
||||
<?php echo html::a($this->createLink('compile', 'browse'), "<span class='text'>{$lang->ci->history}</span>", '', "class='btn btn-link'");?>
|
||||
<?php echo html::a($this->createLink('job', 'browse', "repoID=$repoID"), "<span class='text'>{$lang->ci->task}</span>", '', "class='btn btn-link btn-active-text'");?>
|
||||
<?php echo html::a($this->createLink('compile', 'browse', "repoID=$repoID"), "<span class='text'>{$lang->ci->history}</span>", '', "class='btn btn-link'");?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(common::hasPriv('job', 'create')) common::printLink('job', 'create', "", "<i class='icon icon-plus'></i> " . $lang->job->create, '', "class='btn btn-primary'");?>
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
<th></th>
|
||||
<td colspan="2" class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php if(!isonlybody()) echo html::a(inlink('browse', ""), $lang->goback, '', 'class="btn btn-wide"');?>
|
||||
<?php if(!isonlybody()) echo html::a(inlink('browse', "repoID={$job->repo}"), $lang->goback, '', 'class="btn btn-wide"');?>
|
||||
<?php echo html::hidden('repoType', zget($repoTypes, $job->repo, 'Git'));?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -674,8 +674,7 @@ class mr extends control
|
||||
{
|
||||
$this->product->setMenu($productID, 0);
|
||||
$this->config->bug->search['fields']['branch'] = $this->lang->product->branch;
|
||||
$branches = array('' => '') + $this->loadModel('branch')->getPairs($productID, 'noempty');
|
||||
$this->config->bug->search['params']['branch']['values'] = $branches;
|
||||
$this->config->bug->search['params']['branch']['values'] = array('' => '') + $this->loadModel('branch')->getPairs($productID, 'noempty');
|
||||
}
|
||||
$this->loadModel('search')->setSearchParams($this->config->bug->search);
|
||||
|
||||
|
||||
@@ -10,14 +10,6 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<div class='btn-group' id="swapper">
|
||||
<?php
|
||||
$link = inlink('browse', 'repoID=%s');
|
||||
echo $this->repo->getReposMenu($repo, $objectID, $link, 'Gitlab');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolBar pull-left">
|
||||
<?php foreach($lang->mr->statusList as $key => $label):?>
|
||||
<?php $active = $param == $key ? 'btn-active-text' : '';?>
|
||||
|
||||
@@ -33,6 +33,9 @@ $config->repo->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->repo->editor->view = array('id' => 'commentText', 'tools' => 'simpleTools');
|
||||
$config->repo->editor->diff = array('id' => 'commentText', 'tools' => 'simpleTools');
|
||||
|
||||
$config->repo->switcherModuleList = array('repo', 'job', 'compile', 'mr');
|
||||
$config->repo->switcherMethodList = array('browse', 'review', 'view', 'diff', 'log', 'revision', 'blame');
|
||||
|
||||
$config->repo->create = new stdclass();
|
||||
$config->repo->create->requiredFields = 'product,SCM,name,path,encoding,client';
|
||||
|
||||
|
||||
+23
-8
@@ -78,9 +78,6 @@ class repo extends control
|
||||
*/
|
||||
public function maintain($objectID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->lang->switcherMenu = '';
|
||||
if(common::hasPriv('repo', 'create')) $this->lang->TRActions = html::a(helper::createLink('repo', 'create'), "<i class='icon icon-plus'></i> " . $this->lang->repo->create, '', "class='btn btn-primary'");
|
||||
|
||||
$repoID = $this->repo->saveState(0, $objectID);
|
||||
if($this->viewType !== 'json') $this->commonAction($repoID, $objectID);
|
||||
|
||||
@@ -1141,11 +1138,30 @@ class repo extends control
|
||||
*/
|
||||
public function ajaxGetDropMenu($repoID, $module = 'repo', $method = 'browse')
|
||||
{
|
||||
$repo = $this->repo->getRepoByID($repoID);
|
||||
$link = $this->createLink($module, $method, "repoID=%s");
|
||||
if($module == 'mr') $method = 'browse';
|
||||
if($module == 'job') $method = 'browse';
|
||||
if($module == 'compile' and $method == 'logs') $method = 'browse';
|
||||
if($module == 'bug' and $method == 'view')
|
||||
{
|
||||
$module = 'repo';
|
||||
$method = 'review';
|
||||
}
|
||||
|
||||
$reposHtml = $this->repo->getReposMenu($repo, 0, $link);
|
||||
return print($reposHtml);
|
||||
/* Get repo group by type. */
|
||||
$repoGroup = $this->repo->getRepoGroup($this->app->tab);
|
||||
if($module == 'mr')
|
||||
{
|
||||
foreach($repoGroup as $type => $group)
|
||||
{
|
||||
if(strtolower($type) != 'gitlab') unset($repoGroup[$type]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->repoID = $repoID;
|
||||
$this->view->repoGroup = $repoGroup;
|
||||
$this->view->link = $this->createLink($module, $method, "repoID=%s");
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1181,7 +1197,6 @@ class repo extends control
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!$projects) $this->send(array('message' => array()));
|
||||
$projectIdList = $projectIdList ? explode(',', $projectIdList) : null;
|
||||
$options = "<option value=''></option>";
|
||||
|
||||
@@ -191,21 +191,3 @@ h3 {font-size: 16px;}
|
||||
.header-btn .btn > .text {text-overflow: unset !important;}
|
||||
|
||||
#repoPageSize {right: 90px;}
|
||||
|
||||
/* Style for repo select. */
|
||||
#dropMenu .tree li {padding: 3px 0 0 10px;}
|
||||
#dropMenu .col-left {padding: 0;}
|
||||
#dropMenu .label {margin-left: 3px;}
|
||||
#dropMenu .hide-in-search {display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center; padding-left: 8px;}
|
||||
#dropMenu .hide-in-search .hidden {display: block !important; visibility: inherit !important;}
|
||||
#dropMenuRepo > div.table-row > div > div > ul > li > div {padding-left: 10px;}
|
||||
#dropMenu .tree li.has-list.open:before {border-left: 0px;}
|
||||
#dropMenu ul.tree-angles {margin-bottom: 0;}
|
||||
#dropMenu {margin: 0;}
|
||||
#dropMenu ul > li > ul > li > a:hover {color: white; background-color: #0c64eb; text-decoration: none;}
|
||||
#dropMenu .tree li > a {max-width: 100%;}
|
||||
#dropMenu .tree li > a {line-height: 20px; border-radius: 2px;}
|
||||
li > a.selected {color: #3123ae !important; background: #f2eafc !important; line-height: 20px; border-radius: 5px;}
|
||||
.search-list .list-group {padding: 7px 10px;}
|
||||
#swapper li>div.hide-in-search>a:focus, #swapper li>div.hide-in-search>a:hover {color: #838a9d; cursor: default;}
|
||||
#dropMenu .label-type {margin: 1px 10px;}
|
||||
|
||||
+5
-54
@@ -72,8 +72,11 @@ class repoModel extends model
|
||||
*/
|
||||
public function getSwitcher($repoID)
|
||||
{
|
||||
$currentModule = $this->app->moduleName;
|
||||
$currentMethod = $this->app->methodName;
|
||||
$currentModule = $this->app->moduleName;
|
||||
$currentMethod = $this->app->methodName;
|
||||
if(!in_array($currentModule, $this->config->repo->switcherModuleList)) return '';
|
||||
if($currentModule == 'repo' and !in_array($currentMethod, $this->config->repo->switcherMethodList)) return '';
|
||||
|
||||
$currentRepo = $this->getRepoByID($repoID);
|
||||
$currentRepoName = $currentRepo->name;
|
||||
|
||||
@@ -2103,56 +2106,4 @@ class repoModel extends model
|
||||
foreach($executions as $execution) $pairs[$execution->id] = $execution->name;
|
||||
return $pairs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get repos select menu.
|
||||
*
|
||||
* @param object $repo
|
||||
* @param int $objectID
|
||||
* @param string $link
|
||||
* @param string $scm
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getReposMenu($repo, $objectID = 0, $link = '', $scm = '')
|
||||
{
|
||||
if(empty($link)) $link = helper::createLink('repo', 'browse', "repoID=%s&branchID=&objectID=$objectID");
|
||||
$html = '<div class="table-row">';
|
||||
$html .= '<div class="table-col col-left">';
|
||||
$html .= '<div class="list-group" id="repoList">';
|
||||
$html .= "<ul class='tree tree-angles' data-ride='tree' data-idx='0'>";
|
||||
|
||||
$tabName = $this->app->tab;
|
||||
$reposGroup = $this->getRepoGroup($tabName, $objectID);
|
||||
foreach($reposGroup as $groupName => $group)
|
||||
{
|
||||
if(empty($group)) continue;
|
||||
if($scm and strtolower($groupName) != strtolower($scm)) continue;
|
||||
|
||||
$html .= "<li data-idx='$groupName' data-id='$groupName' class='has-list open in'>";
|
||||
$html .= "<i class='list-toggle icon'></i>";
|
||||
$html .= "<div class='label-type'>";
|
||||
$html .= "<a class='text-muted not-list-item'>{$groupName}</a>";
|
||||
$html .= "<span class='label label-outline'> {$this->lang->repo->type}</span>";
|
||||
$html .= "</div>";
|
||||
$html .= "<ul data-idx='$groupName'>";
|
||||
foreach($group as $id => $repoName)
|
||||
{
|
||||
$isSelected = $id == $repo->id ? 'selected' : '';
|
||||
$repoName = trim($repoName);
|
||||
|
||||
$html .= "<li data-idx='$repoName' data-id='$groupName-$repoName'>";
|
||||
$html .= "<a href='" . sprintf($link, $id) . "' id='$groupName-$repoName' class='$isSelected text-ellipsis' title='$repoName' data-key='$repoName' data-app='{$tabName}'>$repoName</a>";
|
||||
$html .= "</li>";
|
||||
}
|
||||
$html .= '</ul>';
|
||||
$html .= '</li>';
|
||||
}
|
||||
$html .= '</ul>';
|
||||
$html .= '</div>';
|
||||
$html .= '</div>';
|
||||
$html .= '</div>';
|
||||
$html .= "<script>$('.tree').tree();</script>";
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* The head switcher view file of repo module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2022 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
|
||||
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
|
||||
* @author Yidong Wang <yidong@cnezsoft.com>
|
||||
* @package repo
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<style>
|
||||
#dropMenu .tree li {padding: 3px 0 0 10px;}
|
||||
#dropMenu .col-left {padding: 0;}
|
||||
#dropMenu .label {margin-left: 3px;}
|
||||
#dropMenu .hide-in-search {padding-left: 8px;}
|
||||
#dropMenu .hide-in-search .hidden {display: block !important; visibility: inherit !important;}
|
||||
#dropMenuRepo > div.table-row > div > div > ul > li > div {padding-left: 10px;}
|
||||
#dropMenu .tree li.has-list.open:before {border-left: 0px;}
|
||||
#dropMenu ul.tree-angles {margin-bottom: 0;}
|
||||
#dropMenu {margin: 0;}
|
||||
#dropMenu ul > li > ul > li > a:hover {color: white; background-color: #0c64eb; text-decoration: none;}
|
||||
#dropMenu .tree li > a {max-width: 100%;}
|
||||
#dropMenu .tree li > a {line-height: 20px; border-radius: 2px;}
|
||||
li > a.selected {color: #3123ae !important; background: #f2eafc !important; line-height: 20px; border-radius: 5px;}
|
||||
.search-list .list-group {padding: 7px 10px;}
|
||||
#swapper li>div.hide-in-search>a:focus, #swapper li>div.hide-in-search>a:hover {color: #838a9d; cursor: default;}
|
||||
#dropMenu .label-type {margin: 1px 10px;}
|
||||
</style>
|
||||
<div class="table-row">
|
||||
<div class="table-col col-left">
|
||||
<div class="list-group" id="repoList">
|
||||
<ul class='tree tree-angles' data-ride='tree' data-idx='0'>
|
||||
<?php foreach($repoGroup as $groupName => $group):?>
|
||||
<?php if(empty($group)) continue;?>
|
||||
<li data-idx='$groupName' data-id='<?php echo $groupName?>' class='has-list open in'>
|
||||
<i class='list-toggle icon'></i>
|
||||
<div class='label-type'>
|
||||
<a class='text-muted not-list-item'><?php echo $groupName;?></a>
|
||||
<span class='label label-outline'><?php echo $this->lang->repo->type;?></span>
|
||||
</div>
|
||||
<ul data-idx='<?php echo $groupName;?>'>
|
||||
<?php foreach($group as $id => $repoName):?>
|
||||
<?php $isSelected = $id == $repoID ? 'selected' : '';?>
|
||||
<?php $repoName = trim($repoName);?>
|
||||
<li data-idx='<?php echo $repoName;?>' data-id='<?php echo $groupName . '-' . $repoName;?>'>
|
||||
<a href='<?php echo sprintf($link, $id);?>' id='<?php echo $groupName. '-' . $repoName?>' class='<?php echo $isSelected;?> text-ellipsis' title='<?php echo $repoName;?>' data-key='<?php echo $repoName;?>' data-app='<?php echo $this->app->tab;?>'><?php echo $repoName;?></a>
|
||||
</li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('.tree').tree();
|
||||
</script>
|
||||
Reference in New Issue
Block a user