Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into importExport
This commit is contained in:
@@ -143,6 +143,7 @@ zentaoxx:
|
||||
sed -i "s#\$this->app->getModuleRoot() . 'im/apischeme.json'#\$this->app->getExtensionRoot() . 'xuan/im/apischeme.json'#g" zentaoxx/extension/xuan/im/model.php
|
||||
sed -i "s/'..\/..\/common\/view\/header.html.php'/\$$app->getModuleRoot() . 'common\/view\/header.html.php'/g" zentaoxx/extension/xuan/conference/view/admin.html.php
|
||||
sed -i "s/'..\/..\/common\/view\/footer.html.php'/\$$app->getModuleRoot() . 'common\/view\/footer.html.php'/g" zentaoxx/extension/xuan/conference/view/admin.html.php
|
||||
sed -i "s/\$$this->im->userGetChangedPassword()/array()/" zentaoxx/extension/xuan/im/control.php
|
||||
echo "ALTER TABLE \`zt_user\` ADD \`pinyin\` varchar(255) NOT NULL DEFAULT '' AFTER \`realname\`;" >> zentaoxx/db/xuanxuan.sql
|
||||
mkdir zentaoxx/tools; cp tools/cn2tw.php zentaoxx/tools; cd zentaoxx/tools; php cn2tw.php
|
||||
cp tools/en2other.php zentaoxx/tools; cd zentaoxx/tools; php en2other.php ../
|
||||
|
||||
+13
-1
@@ -12,15 +12,26 @@ class Gitea
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
* @param string $encoding
|
||||
* @param object $repo
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($client, $root, $username, $password, $encoding = 'UTF-8')
|
||||
public function __construct($client, $root, $username, $password, $encoding = 'UTF-8', $repo = null)
|
||||
{
|
||||
putenv('LC_CTYPE=en_US.UTF-8');
|
||||
|
||||
$this->client = $client;
|
||||
$this->root = rtrim($root, DIRECTORY_SEPARATOR);
|
||||
if(!realpath($this->root) and !empty($repo))
|
||||
{
|
||||
global $app;
|
||||
$project = $app->control->loadModel('gitea')->apiGetSingleProject($repo->serviceHost, $repo->serviceProject);
|
||||
if(isset($project->tokenCloneUrl))
|
||||
{
|
||||
$cmd = 'git clone --progress -v "' . $project->tokenCloneUrl . '" "' . $this->root . '"';
|
||||
exec($cmd);
|
||||
}
|
||||
}
|
||||
|
||||
$branch = isset($_COOKIE['repoBranch']) ? $_COOKIE['repoBranch'] : '';
|
||||
if($branch)
|
||||
@@ -51,6 +62,7 @@ class Gitea
|
||||
chdir($this->root);
|
||||
if(!empty($path)) $sub = ":$path";
|
||||
if(!empty($this->branch))$revision = $this->branch;
|
||||
execCmd(escapeCmd("$this->client pull"));
|
||||
$cmd = escapeCmd("$this->client ls-tree -l $revision$sub");
|
||||
$list = execCmd($cmd . ' 2>&1', 'array', $result);
|
||||
if($result) return array();
|
||||
|
||||
@@ -7,15 +7,16 @@ class gitlab
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
* @param string $client gitlab api url.
|
||||
* @param string $root id of gitlab project.
|
||||
* @param string $username null
|
||||
* @param string $password token of gitlab api.
|
||||
* @param string $encoding
|
||||
* @param string $client gitlab api url.
|
||||
* @param string $root id of gitlab project.
|
||||
* @param string $username null
|
||||
* @param string $password token of gitlab api.
|
||||
* @param string $encoding
|
||||
* @param object $repo
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($client, $root, $username, $password, $encoding = 'UTF-8')
|
||||
public function __construct($client, $root, $username, $password, $encoding = 'UTF-8', $repo = null)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->root = rtrim($root, '/') . '/';
|
||||
|
||||
@@ -12,10 +12,11 @@ class GitRepo
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
* @param string $encoding
|
||||
* @param object $repo
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($client, $root, $username, $password, $encoding = 'UTF-8')
|
||||
public function __construct($client, $root, $username, $password, $encoding = 'UTF-8', $repo = null)
|
||||
{
|
||||
putenv('LC_CTYPE=en_US.UTF-8');
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class scm
|
||||
$className = $repo->SCM;
|
||||
if($className == 'Git') $className = 'GitRepo';
|
||||
if(!class_exists($className)) require(strtolower($className) . '.class.php');
|
||||
$this->engine = new $className($repo->client, $repo->path, $repo->account, $repo->password, $repo->encoding);
|
||||
$this->engine = new $className($repo->client, $repo->path, $repo->account, $repo->password, $repo->encoding, $repo);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,10 +18,11 @@ class Subversion
|
||||
* @param string $account
|
||||
* @param string $password
|
||||
* @param string $encoding
|
||||
* @param object $repo
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($client, $root, $account, $password, $encoding = 'UTF-8')
|
||||
public function __construct($client, $root, $account, $password, $encoding = 'UTF-8', $repo = null)
|
||||
{
|
||||
putenv('LC_CTYPE=en_US.UTF-8');
|
||||
$this->root = str_replace(array('%3A', '%2F', '+'), array(':', '/', ' '), urlencode(rtrim($root, '/')));
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<th></th>
|
||||
<td colspan='2'>
|
||||
<i class="icon icon-exclamation-sign"></i>
|
||||
<span style='color:#5E626D;font-weight:bold;font-size:13px;'><i class="icon icon-exclamation-sign"></i><?php echo $lang->admin->safe->modeRuleList[2] . $lang->admin->safe->noticeStrong;?></span>
|
||||
<span style='color:#5E626D;font-weight:bold;font-size:13px;'><?php echo $lang->admin->safe->modeRuleList[2] . $lang->admin->safe->noticeStrong;?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -185,11 +185,11 @@ $(function()
|
||||
<table class='status-count'>
|
||||
<tr>
|
||||
<td class='text-right'><?php echo $lang->bug->allBugs;?> :</td>
|
||||
<td class='text-left'><?php echo empty($execution->totalBugs) ? 0 : html::a($this->createLink('execution', 'bug', "executionID={$execution->id}&productID=0&orderBy=status,id_desc&build=0&type=all"), $execution->totalBugs);?></td>
|
||||
<td class='text-left'><?php echo empty($execution->totalBugs) ? 0 : html::a($this->createLink('execution', 'bug', "executionID={$execution->id}&productID=0&branch=0&orderBy=status,id_desc&build=0&type=all"), $execution->totalBugs);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-right'><?php echo $lang->bug->unResolved;?> :</td>
|
||||
<td class='text-left'><?php echo empty($execution->activeBugs) ? 0 : html::a($this->createLink('execution', 'bug', "executionID={$execution->id}&productID=0&orderBy=status,id_desc&build=0&type=unresolved"), $execution->activeBugs);?></td>
|
||||
<td class='text-left'><?php echo empty($execution->activeBugs) ? 0 : html::a($this->createLink('execution', 'bug', "executionID={$execution->id}&productID=0&branch=0&orderBy=status,id_desc&build=0&type=unresolved"), $execution->activeBugs);?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -2254,12 +2254,13 @@ class bug extends control
|
||||
* AJAX: get all users as assignedTo list.
|
||||
*
|
||||
* @param string $selectedUser
|
||||
* @param string $params noletter|noempty|nodeleted|noclosed|withguest|pofirst|devfirst|qafirst|pmfirst|realname|outside|inside|all, can be sets of theme
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxLoadAllUsers($selectedUser = '')
|
||||
public function ajaxLoadAllUsers($selectedUser = '', $params = 'devfirst|noclosed')
|
||||
{
|
||||
$allUsers = $this->loadModel('user')->getPairs('devfirst|noclosed');
|
||||
$allUsers = $this->loadModel('user')->getPairs($params);
|
||||
|
||||
return print(html::select('assignedTo', $allUsers, $selectedUser, 'class="form-control"'));
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
.main-table {height: 600px !important}
|
||||
.main-table {height: 80% !important}
|
||||
#mainContent {min-height: 400px;}
|
||||
|
||||
+11
-4
@@ -60,14 +60,21 @@ function loadAll(productID)
|
||||
*/
|
||||
function loadAllUsers()
|
||||
{
|
||||
var link = createLink('bug', 'ajaxLoadAllUsers', 'selectedUser=' + $('#assignedTo').val());
|
||||
isClosedBug = typeof isClosedBug == 'undefined' ? false : isClosedBug;
|
||||
|
||||
var params = isClosedBug ? '¶ms=devfirst' : '';
|
||||
var link = createLink('bug', 'ajaxLoadAllUsers', 'selectedUser=' + $('#assignedTo').val() + params);
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(data)
|
||||
{
|
||||
var moduleID = $('#module').val();
|
||||
var productID = $('#product').val();
|
||||
setAssignedTo(moduleID, productID);
|
||||
if(!isClosedBug)
|
||||
{
|
||||
var moduleID = $('#module').val();
|
||||
var productID = $('#product').val();
|
||||
setAssignedTo(moduleID, productID);
|
||||
}
|
||||
|
||||
$('#assignedTo').replaceWith(data);
|
||||
$('#assignedTo_chosen').remove();
|
||||
$('#assignedTo').chosen();
|
||||
|
||||
@@ -1790,6 +1790,8 @@ class bugModel extends model
|
||||
->andWhere('project')->eq((int)$projectID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF($excludeBugs)->andWhere('id')->notIN($excludeBugs)->fi()
|
||||
->beginIF(!empty($productID) and strpos($bugQuery, 'product') === false and strpos($bugQuery, '`product` IN') === false)->andWhere('product')->eq($productID)->fi()
|
||||
->beginIF(!empty($productID) and strpos($bugQuery, 'product') === false and strpos($bugQuery, '`product` IN') === false)->andWhere('branch')->eq($branchID)->fi()
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
@@ -1801,7 +1803,7 @@ class bugModel extends model
|
||||
->where('t1.deleted')->eq(0)
|
||||
->beginIF(empty($build))->andWhere('t1.project')->eq($projectID)->fi()
|
||||
->beginIF(!empty($productID))->andWhere('t1.product')->eq($productID)->fi()
|
||||
->andWhere('t1.branch')->eq($branchID)
|
||||
->beginIF(!empty($productID))->andWhere('t1.branch')->eq($branchID)->fi()
|
||||
->beginIF($type == 'unresolved')->andWhere('t1.status')->eq('active')->fi()
|
||||
->beginIF($type == 'noclosed')->andWhere('t1.status')->ne('closed')->fi()
|
||||
->beginIF($type == 'assignedtome')->andWhere('t1.assignedTo')->eq($this->app->user->account)->fi()
|
||||
@@ -1856,6 +1858,8 @@ class bugModel extends model
|
||||
->andWhere('execution')->eq((int)$executionID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF($excludeBugs)->andWhere('id')->notIN($excludeBugs)->fi()
|
||||
->beginIF(!empty($productID) and strpos($bugQuery, 'product') === false and strpos($bugQuery, '`product` IN') === false)->andWhere('product')->eq($productID)->fi()
|
||||
->beginIF(!empty($productID) and $branchID !== 'all' and strpos($bugQuery, 'product') === false and strpos($bugQuery, '`product` IN') === false)->andWhere('branch')->eq($branchID)->fi()
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
@@ -1865,7 +1869,7 @@ class bugModel extends model
|
||||
$bugs = $this->dao->select('t1.*')->from(TABLE_BUG)->alias('t1')
|
||||
->leftJoin(TABLE_MODULE)->alias('t2')->on('t1.module=t2.id')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->beginIF($branchID != 'all')->andWhere('t1.branch')->eq($branchID)->fi()
|
||||
->beginIF(!empty($productID) and $branchID !== 'all')->andWhere('t1.branch')->eq($branchID)->fi()
|
||||
->beginIF(empty($build))->andWhere('t1.execution')->eq($executionID)->fi()
|
||||
->beginIF(!empty($productID))->andWhere('t1.product')->eq($productID)->fi()
|
||||
->beginIF($type == 'unresolved')->andWhere('t1.status')->eq('active')->fi()
|
||||
|
||||
@@ -28,6 +28,7 @@ js::set('systemMode' , $config->systemMode);
|
||||
js::set('confirmUnlinkBuild' , sprintf($lang->bug->confirmUnlinkBuild, zget($resolvedBuilds, $bug->resolvedBuild)));
|
||||
js::set('tab' , $this->app->tab);
|
||||
js::set('bugBranch' , $bug->branch);
|
||||
js::set('isClosedBug' , $bug->status == 'closed');
|
||||
if($this->app->tab == 'execution') js::set('objectID', $bug->execution);
|
||||
if($this->app->tab == 'project') js::set('objectID', $bug->project);
|
||||
?>
|
||||
|
||||
@@ -5,3 +5,4 @@
|
||||
.page-title .text>a {font-weight: 700;}
|
||||
|
||||
.body-modal #mainContent {min-height: 200px;}
|
||||
td.article-content{overflow:auto !important;}
|
||||
|
||||
@@ -568,7 +568,7 @@ class buildModel extends model
|
||||
|
||||
$menu .= $this->buildMenu('testtask', 'create', "product=$build->product&execution={$executionID}&build=$build->id&projectID=$build->project", $build, $type, 'bullhorn', '', '', '', $testtaskApp);
|
||||
|
||||
if($tab == 'execution' and !empty($execution->type) and $execution->type != 'kanban') $menu .= $this->buildMenu('execution', 'bug', "execution={$extraParams['executionID']}&productID={$extraParams['productID']}&orderBy=status&build=$build->id", $build, $type, '', '', '', '', $this->lang->execution->viewBug);
|
||||
if($tab == 'execution' and !empty($execution->type) and $execution->type != 'kanban') $menu .= $this->buildMenu('execution', 'bug', "execution={$extraParams['executionID']}&productID={$extraParams['productID']}&branchID=all&orderBy=status&build=$build->id", $build, $type, '', '', '', '', $this->lang->execution->viewBug);
|
||||
if($tab == 'project' or empty($execution->type) or $execution->type == 'kanban') $menu .= $this->buildMenu('build', 'view', "{$params}&type=generatedBug", $build, $type, 'bug', '', '', '', "data-app='$tab'", $this->lang->project->bug);
|
||||
|
||||
$menu .= $this->buildMenu('build', 'edit', $params, $build, $type);
|
||||
|
||||
@@ -344,7 +344,7 @@ tbody tr td:first-child input {display: none;}
|
||||
<?php $this->printExtendFields($build, 'table', 'inForm=0');?>
|
||||
<tr>
|
||||
<th style="vertical-align:top"><?php echo $lang->build->desc;?></th>
|
||||
<td>
|
||||
<td class='article-content'>
|
||||
<?php if($build->desc):?>
|
||||
<?php echo $build->desc;?>
|
||||
<?php else:?>
|
||||
|
||||
@@ -373,6 +373,7 @@ $lang->error->companyNotFound = "The domain %s cannot be found!";
|
||||
$lang->error->length = array("『%s』Length Error. It should be『%s』", "『%s』length should be <=『%s』and >『%s』.");
|
||||
$lang->error->reg = "『%s』Format Error. It should be『%s』.";
|
||||
$lang->error->unique = "『%s』『%s』existed. Please go to Admin->System->Data->Recycle to restore it, if you are sure it is deleted.";
|
||||
$lang->error->repeat = "『%s』『%s』exists.";
|
||||
$lang->error->gt = "『%s』should be >『%s』.";
|
||||
$lang->error->ge = "『%s』should be >=『%s』.";
|
||||
$lang->error->lt = "『%s』should be <『%s』。";
|
||||
|
||||
@@ -373,6 +373,7 @@ $lang->error->companyNotFound = "The domain %s cannot be found!";
|
||||
$lang->error->length = array("『%s』length error. It should be『%s』", "『%s』length should be <=『%s』and >『%s』.");
|
||||
$lang->error->reg = "『%s』format error. It should be『%s』.";
|
||||
$lang->error->unique = "『%s』『%s』exists. Go to Admin->System->Data->Recycle Bin to restore it, if you are sure it is deleted.";
|
||||
$lang->error->repeat = "『%s』『%s』exists.";
|
||||
$lang->error->gt = "『%s』should be >『%s』.";
|
||||
$lang->error->ge = "『%s』should be >=『%s』.";
|
||||
$lang->error->lt = "『%s』should be <『%s』。";
|
||||
|
||||
@@ -373,6 +373,7 @@ $lang->error->companyNotFound = "Le domaine %s ne peut être trouvé !";
|
||||
$lang->error->length = array("『 %s 』erreur de longueur. Il devrait être『%s』", "La longueur de 『%s』devrait être <=『%s』et >『%s』.");
|
||||
$lang->error->reg = "『 %s 』erreur de format. Il devrait être『%s』.";
|
||||
$lang->error->unique = "『 %s 』『 %s 』existes. Allez à Admin->System->Data->Recycle Bin pour le restaurer, si vous êtes sûr qu'il est supprimé.";
|
||||
$lang->error->repeat = "『 %s 』『 %s 』existes.";
|
||||
$lang->error->gt = "『 %s 』devrait être > 『 %s 』.";
|
||||
$lang->error->ge = "『 %s 』devrait être >= 『 %s 』.";
|
||||
$lang->error->lt = "『%s』should be <『%s』。";
|
||||
|
||||
@@ -373,6 +373,7 @@ $lang->error->companyNotFound = "您访问的域名 %s 没有对应的公司。"
|
||||
$lang->error->length = array("『%s』长度错误,应当为『%s』", "『%s』长度应当不超过『%s』,且大于『%s』。");
|
||||
$lang->error->reg = "『%s』不符合格式,应当为:『%s』。";
|
||||
$lang->error->unique = "『%s』已经有『%s』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。";
|
||||
$lang->error->repeat = "『%s』已经有『%s』这条记录了。";
|
||||
$lang->error->gt = "『%s』应当大于『%s』。";
|
||||
$lang->error->ge = "『%s』应当不小于『%s』。";
|
||||
$lang->error->lt = "『%s』应当小于『%s』。";
|
||||
|
||||
@@ -47,7 +47,7 @@ class compileModel extends model
|
||||
*/
|
||||
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')
|
||||
return $this->dao->select('t1.id, t1.name, t1.job, t1.status, DATE_FORMAT(t1.createdDate, "%m-%d %H:%i") AS 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')
|
||||
->leftJoin(TABLE_REPO)->alias('t3')->on('t2.repo=t3.id')
|
||||
->leftJoin(TABLE_PIPELINE)->alias('t4')->on('t2.server=t4.id')
|
||||
|
||||
@@ -28,22 +28,22 @@
|
||||
<form class='main-table' id='ajaxForm' method='post'>
|
||||
<table id='buildList' class='table has-sort-head table-fixed'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<?php $vars = "jobID={$jobID}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<tr>
|
||||
<?php $vars = "repoID=$repoID&jobID={$jobID}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->compile->id);?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->compile->name);?></th>
|
||||
<th class='c-build-type text-left'><?php echo $lang->compile->buildType;?></th>
|
||||
<th class='c-repo text-left'><?php echo $lang->job->repo;?></th>
|
||||
<th class='text-left'><?php echo $lang->job->triggerType;?></th>
|
||||
<th class='c-status text-center'><?php common::printOrderLink('status', $orderBy, $vars, $lang->compile->status);?></th>
|
||||
<th class='c-date text-center'><?php common::printOrderLink('createdDate', $orderBy, $vars, $lang->compile->time);?></th>
|
||||
<th class='c-actions'><?php echo $lang->actions;?></th>
|
||||
<th class='text'><?php common::printOrderLink('name', $orderBy, $vars, $lang->compile->name);?></th>
|
||||
<th class='c-build-type'><?php echo $lang->compile->buildType;?></th>
|
||||
<th class='c-repo'><?php echo $lang->job->repo;?></th>
|
||||
<th class='text'><?php echo $lang->job->triggerType;?></th>
|
||||
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->compile->status);?></th>
|
||||
<th class='c-date'><?php common::printOrderLink('createdDate', $orderBy, $vars, $lang->compile->time);?></th>
|
||||
<th class='c-actions-2'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='text-left'>
|
||||
<?php foreach($buildList as $id => $build):?>
|
||||
<tr>
|
||||
<td class='text-center'><?php echo $id;?></td>
|
||||
<td class='text'><?php echo $id;?></td>
|
||||
<td class='c-name' title='<?php echo $build->name;?>'><?php echo common::hasPriv('job', 'view') ? html::a($this->createLink('job', 'view', "jobID={$build->job}&compileID={$build->id}", 'html', true), $build->name, '', "class='iframe' data-width='90%'") : $build->name;?></td>
|
||||
<td title='<?php echo $build->engine;?>'><?php echo $build->engine;?></td>
|
||||
<td title='<?php echo $build->repoName;?>'><?php echo $build->repoName;?></td>
|
||||
@@ -51,7 +51,7 @@
|
||||
<?php $triggerConfig = $this->loadModel('job')->getTriggerConfig($build);?>
|
||||
<td title='<?php echo $triggerConfig;?>'><?php echo $triggerConfig;?></td>
|
||||
<?php $buildStatus = zget($lang->compile->statusList, $build->status);?>
|
||||
<td class='text-center' title='<?php echo $buildStatus;?>'><?php echo $buildStatus;?></td>
|
||||
<td class='text' title='<?php echo $buildStatus;?>'><?php echo $buildStatus;?></td>
|
||||
<td title='<?php echo $build->createdDate;?>'><?php echo $build->createdDate;?></td>
|
||||
<td class='c-actions text-left'>
|
||||
<?php
|
||||
|
||||
@@ -609,7 +609,7 @@ class custom extends control
|
||||
if($this->config->edition != 'max') $this->loadModel('setting')->setItem('system.custom.hourPoint', $this->post->hourPoint);
|
||||
|
||||
$this->app->loadLang('common');
|
||||
$locate = $this->config->systemMode == 'new' ? inlink('flow') : 'top';
|
||||
$locate = $this->config->systemMode == 'new' ? 'parent' : 'top';
|
||||
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<?php foreach($design->tasks as $task):?>
|
||||
<tr class='text-center'>
|
||||
<td><?php $task->id?></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), $task->name, '_blank');?></td>;
|
||||
<td class='text-left'><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), $task->name, '_blank');?></td>
|
||||
<td><?php echo zget($users, $task->assignedTo);?></td>
|
||||
<td><span class='status-task status-<?php echo $task->status;?>'><?php $this->processStatus('task', $task);?></span></td>
|
||||
<td><?php echo $task->consumed;?></td>
|
||||
|
||||
@@ -34,6 +34,15 @@ function loadDocLibs(type)
|
||||
$('#lib').replaceWith(data);
|
||||
$('#lib_chosen').remove();
|
||||
$('#lib').chosen();
|
||||
|
||||
if($('#lib').find('option').length == 0)
|
||||
{
|
||||
$('#submit').attr('disabled', 'disabled');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#submit').removeAttr('disabled');
|
||||
}
|
||||
})
|
||||
|
||||
$('#docType').toggleClass('hidden', type == 'api');
|
||||
|
||||
@@ -94,7 +94,7 @@ if(empty($type)) $type = 'product';
|
||||
foreach($this->lang->doc->typeList as $typeKey => $typeName)
|
||||
{
|
||||
$icon = zget($this->config->doc->iconList, $typeKey);
|
||||
$class = strpos($this->config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';
|
||||
$class = (strpos($this->config->doc->officeTypes, $typeKey) !== false or strpos($this->config->doc->textTypes, $typeKey) !== false) ? 'iframe' : '';
|
||||
$html .= "<li>";
|
||||
$html .= html::a(helper::createLink('doc', 'create', "objectType=$type&objectID=$objectID&libID=$libID&moduleID=0&type=$typeKey", '', $class ? true : false), "<i class='icon-$icon text-muted'></i> " . $typeName, '', "class='$class' data-app='{$this->app->tab}'");
|
||||
$html .= "</li>";
|
||||
|
||||
@@ -143,7 +143,7 @@ function loadBranches(product)
|
||||
var projectID = (typeof(systemMode) != 'undefined' && systemMode == 'new') ? $('#project').val() : 0;
|
||||
|
||||
var index = $inputgroup.find('select:first').attr('id').replace('products' , '');
|
||||
$.get(createLink('branch', 'ajaxGetBranches', "productID=" + $(product).val() + "&oldBranch=0¶m=active&projectID=" + projectID + "&withMainBranch="), function(data)
|
||||
$.get(createLink('branch', 'ajaxGetBranches', "productID=" + $(product).val() + "&oldBranch=¶m=active&projectID=" + projectID + "&withMainBranch="), function(data)
|
||||
{
|
||||
if(data)
|
||||
{
|
||||
|
||||
@@ -391,6 +391,7 @@ class executionModel extends model
|
||||
$this->lang->project->code = $this->lang->execution->execCode;
|
||||
}
|
||||
|
||||
$this->lang->error->unique = $this->lang->error->repeat;
|
||||
$sprintProject = isset($sprint->project) ? $sprint->project : '0';
|
||||
$this->dao->insert(TABLE_EXECUTION)->data($sprint)
|
||||
->autoCheck($skipFields = 'begin,end')
|
||||
@@ -540,6 +541,7 @@ class executionModel extends model
|
||||
}
|
||||
|
||||
/* Update data. */
|
||||
$this->lang->error->unique = $this->lang->error->repeat;
|
||||
$executionProject = isset($execution->project) ? $execution->project : '0';
|
||||
$this->dao->update(TABLE_EXECUTION)->data($execution)
|
||||
->autoCheck($skipFields = 'begin,end')
|
||||
@@ -2611,9 +2613,13 @@ class executionModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
$projectID = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch('project');
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
$projectID = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch('project');
|
||||
$this->session->set('project', $projectID);
|
||||
$this->linkStory($projectID, $planStories, $planProducts);
|
||||
}
|
||||
$this->linkStory($executionID, $planStories, $planProducts);
|
||||
if($this->config->systemMode == 'new') $this->linkStory($projectID, $planStories, $planProducts);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,8 +33,9 @@
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
$buildName = $build ? " <span class='label label-danger'>Build:{$build->name}</span>" : '';
|
||||
echo html::a($this->inlink('bug', "executionID={$execution->id}&productID={$productID}&branch={$branchID}&orderBy=status,id_desc&build=$buildID&type=all"), "<span class='text'>{$lang->bug->allBugs}</span>" . ($type == 'all' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a($this->inlink('bug', "executionID={$execution->id}&productID={$productID}&branch={$branchID}&orderBy=status,id_desc&build=$buildID&type=unresolved"), "<span class='text'>{$lang->bug->unResolved}</span>" . ($type == 'unresolved' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='unresolvedTab' class='btn btn-link" . ('unresolved' == $type ? ' btn-active-text' : '') . "'");
|
||||
$module = $type != 'bysearch' ? "¶m=$param" : '';
|
||||
echo html::a($this->inlink('bug', "executionID={$execution->id}&productID={$productID}&branch={$branchID}&orderBy=status,id_desc&build=$buildID&type=all$module"), "<span class='text'>{$lang->bug->allBugs}</span>" . ($type == 'all' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a($this->inlink('bug', "executionID={$execution->id}&productID={$productID}&branch={$branchID}&orderBy=status,id_desc&build=$buildID&type=unresolved$module"), "<span class='text'>{$lang->bug->unResolved}</span>" . ($type == 'unresolved' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='unresolvedTab' class='btn btn-link" . ('unresolved' == $type ? ' btn-active-text' : '') . "'");
|
||||
?>
|
||||
<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> <?php echo $lang->bug->search;?></a>
|
||||
</div>
|
||||
|
||||
@@ -226,6 +226,15 @@
|
||||
<td colspan='13'>
|
||||
<div class="table-row segments-list">
|
||||
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->execution->memberHours, zget($users, $task->assignedTo), $members[$task->assignedTo]->totalHours);?>
|
||||
<?php if($groupBy == 'assignedTo' and empty($task->assignedTo)):?>
|
||||
<div class="table-col">
|
||||
<div class="clearfix segments">
|
||||
<div class="segment">
|
||||
<div class="segment-title"><?php echo $groupName;?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php printf($lang->execution->countSummary, $groupSum, $groupDoing, $groupWait);?>
|
||||
<?php printf($lang->execution->timeSummary, $groupEstimate . $lang->execution->workHourUnit, $groupConsumed . $lang->execution->workHourUnit, $groupLeft . $lang->execution->workHourUnit);?>
|
||||
</div>
|
||||
|
||||
@@ -19,9 +19,11 @@
|
||||
<div class="btn-toolbar pull-left">
|
||||
<span class='btn btn-link btn-active-text'><span class='text'><?php echo $lang->execution->linkStory;?></span></span>
|
||||
</div>
|
||||
<?php if(!isonlybody()):?>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div id="mainContent">
|
||||
<div class="cell space-sm">
|
||||
|
||||
+4
-32
@@ -384,6 +384,10 @@ class giteaModel extends model
|
||||
$project->path_with_namespace = $project->full_name;
|
||||
$project->http_url_to_repo = $project->html_url;
|
||||
$project->name_with_namespace = $project->full_name;
|
||||
|
||||
$gitea = $this->getByID($giteaID);
|
||||
$oauth = "oauth2:{$gitea->token}@";
|
||||
$project->tokenCloneUrl = preg_replace('/(http(s)?:\/\/)/', "\$1$oauth", $project->html_url);
|
||||
}
|
||||
|
||||
return $project;
|
||||
@@ -600,36 +604,4 @@ class giteaModel extends model
|
||||
|
||||
return $newBranches;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check remote url.
|
||||
*
|
||||
* @param int $giteaID
|
||||
* @param string $project
|
||||
* @param string $client
|
||||
* @param string $path
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function checkRemoteUrl($giteaID, $project, $client, $path)
|
||||
{
|
||||
if(chdir($path))
|
||||
{
|
||||
$url = new stdclass();
|
||||
$remote = execCmd(escapeCmd("$client remote -v"), 'array');
|
||||
$pregHttp = '/http(s)?:\/\/(www\.)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:\d+)*(\/\w+)*\.git/';
|
||||
$pregSSH = '/ssh:\/\/git@[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:\d+)*(\/\w+)*\.git/';
|
||||
|
||||
if(preg_match($pregHttp, $remote[0], $matches)) $url->http = $matches[0];
|
||||
if(preg_match($pregSSH, $remote[0], $matches)) $url->ssh = $matches[0];
|
||||
|
||||
$project = $this->apiGetSingleProject($giteaID, $project);
|
||||
if(isset($project->clone_url))
|
||||
{
|
||||
if($project->clone_url == $url->http or $project->ssh_url == $url->ssh) return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<th class='c-name'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitlab->project->name);?></th>
|
||||
<th class='text'></th>
|
||||
<th class='text'><?php echo $lang->gitlab->lastUpdate;?></th>
|
||||
<th class='c-actions-8 text-center'><?php echo $lang->actions;?></th>
|
||||
<th class='c-actions-9 text-center'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -60,6 +60,8 @@
|
||||
<td class='text' title='<?php echo substr($gitlabProject->last_activity_at, 0, 10);?>'><?php echo substr($gitlabProject->last_activity_at, 0, 10);?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
echo common::buildIconButton('gitlab', 'browseBranch', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'treemap', '', '', false, '', $this->lang->gitlab->browseBranch, 0, $gitlabProject->default_branch);
|
||||
echo common::buildIconButton('gitlab', 'browseTag', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'tag', '', '', false, '', $this->lang->gitlab->browseTag, 0, $gitlabProject->default_branch);
|
||||
echo common::buildIconButton('gitlab', 'manageBranchPriv', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'branch-lock', '', '', false, '', $this->lang->gitlab->browseBranchPriv, 0, ($gitlabProject->isMaintainer and $gitlabProject->default_branch));
|
||||
echo common::buildIconButton('gitlab', 'manageTagPriv', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'tag-lock', '', '', false, '', $this->lang->gitlab->browseTagPriv, 0, ($gitlabProject->isMaintainer and $gitlabProject->default_branch));
|
||||
echo common::buildIconButton('gitlab', 'manageProjectMembers', 'repoID=' . zget($repoPairs, $gitlabProject->id), '', 'list', 'team', '', '', false, '', '', 0, isset($repoPairs[$gitlabProject->id]));
|
||||
|
||||
@@ -91,6 +91,7 @@ class group extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->update($groupID);
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
if(isonlybody()) return print(js::closeModal('parent.parent', 'this'));
|
||||
return print(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
@@ -191,8 +192,8 @@ class group extends control
|
||||
if($type == 'byModule') $result = $this->group->updatePrivByModule();
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
if($type == 'byGroup') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('managePriv', "type=byGroup¶m=$param&menu=$menu&version=$version")));
|
||||
if($type == 'byModule') return print(js::alert($this->lang->saveSuccess) . js::execute('window.parent.location.reload()'));
|
||||
if($type == 'byGroup') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
|
||||
if($type == 'byModule') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'window.parent.location.reload()'));
|
||||
}
|
||||
|
||||
if($type == 'byGroup')
|
||||
|
||||
@@ -46,6 +46,7 @@ $lang->group->group = 'Group';
|
||||
$lang->group->more = 'More';
|
||||
$lang->group->allCheck = 'All';
|
||||
$lang->group->noGroup = 'No group';
|
||||
$lang->group->repeat = "『%s』『%s』exists.Please adjust it and try again.";
|
||||
|
||||
global $config;
|
||||
if($config->systemMode == 'new') $lang->group->noneProject = 'No Project';
|
||||
|
||||
@@ -46,6 +46,7 @@ $lang->group->group = 'Group';
|
||||
$lang->group->more = 'More';
|
||||
$lang->group->allCheck = 'All';
|
||||
$lang->group->noGroup = 'No group';
|
||||
$lang->group->repeat = "『%s』『%s』exists.Please adjust it and try again.";
|
||||
|
||||
global $config;
|
||||
if($config->systemMode == 'new') $lang->group->noneProject = 'No Project';
|
||||
|
||||
@@ -46,6 +46,7 @@ $lang->group->group = 'Group';
|
||||
$lang->group->more = 'More';
|
||||
$lang->group->allCheck = 'All';
|
||||
$lang->group->noGroup = 'Aucun groupe';
|
||||
$lang->group->repeat = "『%s』『%s』exists.Please adjust it and try again.";
|
||||
|
||||
global $config;
|
||||
if($config->systemMode == 'new') $lang->group->noneProject = 'No Project';
|
||||
|
||||
@@ -46,6 +46,7 @@ $lang->group->group = '分组';
|
||||
$lang->group->more = '更多';
|
||||
$lang->group->allCheck = '全部';
|
||||
$lang->group->noGroup = '暂时没有分组。';
|
||||
$lang->group->repeat = "『%s』已经有『%s』这条记录了,请调整后再试。";
|
||||
|
||||
global $config;
|
||||
if($config->systemMode == 'new') $lang->group->noneProject = '暂时没有项目';
|
||||
|
||||
@@ -27,7 +27,8 @@ class groupModel extends model
|
||||
unset($group->limited);
|
||||
$group->role = 'limited';
|
||||
}
|
||||
$this->dao->insert(TABLE_GROUP)->data($group)->batchCheck($this->config->group->create->requiredFields, 'notempty')->exec();
|
||||
$this->lang->error->unique = $this->lang->group->repeat;
|
||||
$this->dao->insert(TABLE_GROUP)->data($group)->batchCheck($this->config->group->create->requiredFields, 'notempty')->check('name', 'unique')->exec();
|
||||
return $this->dao->lastInsertId();
|
||||
}
|
||||
|
||||
@@ -41,7 +42,8 @@ class groupModel extends model
|
||||
public function update($groupID)
|
||||
{
|
||||
$group = fixer::input('post')->get();
|
||||
return $this->dao->update(TABLE_GROUP)->data($group)->batchCheck($this->config->group->edit->requiredFields, 'notempty')->where('id')->eq($groupID)->exec();
|
||||
$this->lang->error->unique = $this->lang->group->repeat;
|
||||
return $this->dao->update(TABLE_GROUP)->data($group)->batchCheck($this->config->group->edit->requiredFields, 'notempty')->check('name', 'unique', "id != {$groupID}")->where('id')->eq($groupID)->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -54,6 +56,7 @@ class groupModel extends model
|
||||
public function copy($groupID)
|
||||
{
|
||||
$group = fixer::input('post')->remove('options')->get();
|
||||
$this->lang->error->unique = $this->lang->group->repeat;
|
||||
$this->dao->insert(TABLE_GROUP)->data($group)->check('name', 'unique')->check('name', 'notempty')->exec();
|
||||
if($this->post->options == false) return;
|
||||
if(!dao::isError())
|
||||
@@ -315,9 +318,9 @@ class groupModel extends model
|
||||
|
||||
/**
|
||||
* Get admins by object id list.
|
||||
*
|
||||
* @param int $idList
|
||||
* @param string $field
|
||||
*
|
||||
* @param int $idList
|
||||
* @param string $field
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<form class="load-indicator main-form form-ajax" id="managePrivForm" method="post" target='hiddenwin'>
|
||||
<form class="load-indicator main-form form-ajax" id="managePrivForm" method="post">
|
||||
<table class='table table-hover table-striped table-bordered'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
|
||||
@@ -120,3 +120,5 @@ body.menu-hide {padding-left: 0;}
|
||||
{
|
||||
#upgradeContent{width: 85%;}
|
||||
}
|
||||
#searchbox .dropdown-menu > li.search-type-all{max-width: 250px}
|
||||
#searchbox .dropdown-menu > li.search-type-all a{width: 100%; overflow: hidden; text-overflow: ellipsis;}
|
||||
|
||||
+17
-17
@@ -139,16 +139,16 @@ class job extends control
|
||||
/**
|
||||
* Edit a job.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $jobID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function edit($id)
|
||||
public function edit($jobID)
|
||||
{
|
||||
$job = $this->job->getByID($id);
|
||||
$job = $this->job->getByID($jobID);
|
||||
if($_POST)
|
||||
{
|
||||
$this->job->update($id);
|
||||
$this->job->update($jobID);
|
||||
if(dao::isError())
|
||||
{
|
||||
$errors = dao::getError();
|
||||
@@ -174,7 +174,7 @@ class job extends control
|
||||
return $this->send(array('result' => 'fail', 'message' => $errors));
|
||||
}
|
||||
|
||||
$this->loadModel('action')->create('job', $id, 'edited');
|
||||
$this->loadModel('action')->create('job', $jobID, 'edited');
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse', "repoID={$job->repo}")));
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ class job extends control
|
||||
foreach($repoList as $repo)
|
||||
{
|
||||
if(empty($repo->synced)) continue;
|
||||
$repoPairs[$repo->id] = $repo->name;
|
||||
$repoPairs[$repo->id] = "[{$repo->SCM}] {$repo->name}";
|
||||
$repoTypes[$repo->id] = $repo->SCM;
|
||||
if(strtolower($repo->SCM) == 'gitlab') $gitlabRepos[$repo->id] = $repo->name;
|
||||
}
|
||||
@@ -221,15 +221,15 @@ class job extends control
|
||||
/**
|
||||
* Delete a job.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $jobID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function delete($id, $confirm = 'no')
|
||||
public function delete($jobID, $confirm = 'no')
|
||||
{
|
||||
if($confirm != 'yes') return print(js::confirm($this->lang->job->confirmDelete, inlink('delete', "jobID=$id&confirm=yes")));
|
||||
if($confirm != 'yes') return print(js::confirm($this->lang->job->confirmDelete, inlink('delete', "jobID=$jobID&confirm=yes")));
|
||||
|
||||
$this->job->delete(TABLE_JOB, $id);
|
||||
$this->job->delete(TABLE_JOB, $jobID);
|
||||
echo js::reload('parent');
|
||||
}
|
||||
|
||||
@@ -317,27 +317,27 @@ class job extends control
|
||||
/**
|
||||
* Exec a job.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $jobID
|
||||
* @param string $showForm
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function exec($id)
|
||||
public function exec($jobID)
|
||||
{
|
||||
$job = $this->job->getByID($id);
|
||||
$job = $this->job->getByID($jobID);
|
||||
if(strtolower($job->engine) == 'gitlab')
|
||||
{
|
||||
if(!isset($job->reference) or !$job->reference)
|
||||
{
|
||||
return $this->send(array('result' => 'fail', 'message' => $this->lang->job->setReferenceTips, 'locate' => inlink('edit', "id=$id")));
|
||||
return $this->send(array('result' => 'fail', 'message' => $this->lang->job->setReferenceTips, 'locate' => inlink('edit', "id=$jobID")));
|
||||
}
|
||||
}
|
||||
|
||||
$compile = $this->job->exec($id);
|
||||
$compile = $this->job->exec($jobID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$this->app->loadLang('compile');
|
||||
$this->loadModel('action')->create('job', $id, 'executed');
|
||||
$this->loadModel('action')->create('job', $jobID, 'executed');
|
||||
return $this->send(array('result' => 'success', 'message' => sprintf($this->lang->job->sendExec, zget($this->lang->compile->statusList, $compile->status))));
|
||||
}
|
||||
|
||||
@@ -409,7 +409,7 @@ class job extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$repoPairs[$repo->id] = $repo->name;
|
||||
$repoPairs[$repo->id] = "[{$repo->SCM}] {$repo->name}";
|
||||
}
|
||||
}
|
||||
echo html::select('repo', $repoPairs, '', "class='form-control chosen'");
|
||||
|
||||
@@ -46,7 +46,7 @@ class jobModel extends model
|
||||
*/
|
||||
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')
|
||||
return $this->dao->select('t1.*, DATE_FORMAT(t1.lastExec, "%m-%d %H:%i") AS lastExec, 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')
|
||||
@@ -182,7 +182,7 @@ class jobModel extends model
|
||||
$repo = $this->loadModel('repo')->getRepoByID($job->repo);
|
||||
$project = zget($repo, 'project');
|
||||
|
||||
$job->server = (int)zget($repo, 'gitlab', 0);
|
||||
$job->server = (int)zget($repo, 'serviceHost', 0);
|
||||
$job->pipeline = json_encode(array('project' => $project, 'reference' => $this->post->reference));
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ class jobModel extends model
|
||||
$project = zget($repo, 'project');
|
||||
|
||||
$job->repo = $job->gitlabRepo;
|
||||
$job->server = (int)zget($repo, 'gitlab', 0);
|
||||
$job->server = (int)zget($repo, 'serviceHost', 0);
|
||||
$job->pipeline = json_encode(array('project' => $project, 'reference' => $this->post->reference));
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<td><?php if($job->lastStatus) echo $job->lastExec;?></td>
|
||||
<td class='c-actions text-center'>
|
||||
<?php
|
||||
common::printIcon('compile', 'browse', "jobID=$id", '', 'list', 'history');
|
||||
common::printIcon('compile', 'browse', "repoID={$job->repo}&jobID=$id", '', 'list', 'history');
|
||||
common::printIcon('job', 'edit', "jobID=$id", '', 'list', 'edit');
|
||||
common::printIcon('job', 'exec', "jobID=$id", '', 'list', 'play');
|
||||
if(common::hasPriv('job', 'delete')) echo html::a($this->createLink('job', 'delete', "jobID=$id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->job->delete}' class='btn'");
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</tr>
|
||||
<tr class='commonRepo'>
|
||||
<th><?php echo $lang->job->repo; ?></th>
|
||||
<td><?php echo html::select('repo', $repoPairs, $job->repo, "class='form-control'"); ?></td>
|
||||
<td><?php echo html::select('repo', $repoPairs, $job->repo, "class='form-control chosen'"); ?></td>
|
||||
</tr>
|
||||
<tr class='gitlabRepo hide'>
|
||||
<th><?php echo $lang->job->repo; ?></th>
|
||||
|
||||
@@ -1512,7 +1512,7 @@ class kanban extends control
|
||||
$this->loadModel($objectType)->delete(constant($table), $objectID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$kanbanID = $regionID ? $this->kanban->getKanbanIDByregion($regionID) : $this->session->execution;
|
||||
$kanbanID = $regionID ? $this->kanban->getKanbanIDByRegion($regionID) : $this->session->execution;
|
||||
$browseType = $this->config->vision == 'lite' ? 'task' : $this->session->execLaneType;
|
||||
$groupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
|
||||
$kanbanGroup = $this->kanban->getRDKanban($kanbanID, $browseType, 'id_desc', 0, $groupBy);
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th class='columnWidth'><?php echo $lang->kanban->columnWidth;?></th>
|
||||
<td><?php echo nl2br(html::radio('fluidBoard', $lang->kanbancolumn->fluidBoardList, isset($copyKanban->fluidBoard) ? $copyKanban->fluidBoard : 0));?></td>
|
||||
<td colspan='2'><?php echo nl2br(html::radio('fluidBoard', $lang->kanbancolumn->fluidBoardList, isset($copyKanban->fluidBoard) ? $copyKanban->fluidBoard : 0));?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan='2'><?php echo $lang->kanban->import?></th>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th class='columnWidth'><?php echo $lang->kanban->columnWidth;?></th>
|
||||
<td><?php echo nl2br(html::radio('fluidBoard', $lang->kanbancolumn->fluidBoardList, $kanban->fluidBoard));?></td>
|
||||
<td colspan='2'><?php echo nl2br(html::radio('fluidBoard', $lang->kanbancolumn->fluidBoardList, $kanban->fluidBoard));?></td>
|
||||
</tr>
|
||||
<?php if($laneCount > 1):?>
|
||||
<tr>
|
||||
|
||||
@@ -54,8 +54,9 @@ class mr extends control
|
||||
/* Check whether Mr is linked with the product. */
|
||||
foreach($MRList as $MR)
|
||||
{
|
||||
$product = $this->mr->getMRProduct($MR);
|
||||
$MR->linkButton = empty($product) ? false : true;
|
||||
$product = $this->mr->getMRProduct($MR);
|
||||
$MR->linkButton = empty($product) ? false : true;
|
||||
$MR->createdDate = date('m-d H:i', strtotime($MR->createdDate));
|
||||
}
|
||||
|
||||
/* Load lang from compile module */
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
#repoList .tree li > a {line-height: 20px; border-radius: 2px;}
|
||||
|
||||
.c-id {width: 60px;}
|
||||
.c-title {min-width: 120px;}
|
||||
.c-branch {width: 240px;}
|
||||
.c-title {width: 150px;}
|
||||
.c-branch {width: 200px;}
|
||||
.c-status {width: 120px;}
|
||||
.c-author {width: 100px;}
|
||||
.c-date {width: 140px;}
|
||||
.c-author {width: 80px;}
|
||||
.c-date {width: 100px;}
|
||||
[lang^='zh-'] .c-status {width: 100px;}
|
||||
|
||||
@@ -121,6 +121,7 @@ $lang->mr->apiErrorMap[4] = "403 Forbidden";
|
||||
$lang->mr->apiErrorMap[5] = "/(pull request already exists for these targets).*/";
|
||||
$lang->mr->apiErrorMap[6] = "Invalid PullRequest: There are no changes between the head and the base";
|
||||
$lang->mr->apiErrorMap[7] = "/(user doesn't have access to repo).*/";
|
||||
$lang->mr->apiErrorMap[8] = "/(git apply).*/";
|
||||
|
||||
$lang->mr->errorLang[1] = 'The source project branch cannot be the same as the target project branch';
|
||||
$lang->mr->errorLang[2] = 'Another open merge request already exists for this source branch: ID%u';
|
||||
@@ -129,6 +130,7 @@ $lang->mr->errorLang[4] = 'Permission denied';
|
||||
$lang->mr->errorLang[5] = 'Another open merge request already exists for this source branch';
|
||||
$lang->mr->errorLang[6] = 'The source project branch cannot be the same as the target project branch';
|
||||
$lang->mr->errorLang[7] = "user doesn't have access to repo";
|
||||
$lang->mr->errorLang[8] = 'The source branch and target branch cannot be merged';
|
||||
|
||||
$lang->mr->from = "from";
|
||||
$lang->mr->to = "to";
|
||||
|
||||
@@ -121,6 +121,7 @@ $lang->mr->apiErrorMap[4] = "403 Forbidden";
|
||||
$lang->mr->apiErrorMap[5] = "/(pull request already exists for these targets).*/";
|
||||
$lang->mr->apiErrorMap[6] = "Invalid PullRequest: There are no changes between the head and the base";
|
||||
$lang->mr->apiErrorMap[7] = "/(user doesn't have access to repo).*/";
|
||||
$lang->mr->apiErrorMap[8] = "/(git apply).*/";
|
||||
|
||||
$lang->mr->errorLang[1] = 'The source project branch cannot be the same as the target project branch';
|
||||
$lang->mr->errorLang[2] = 'Another open merge request already exists for this source branch: ID%u';
|
||||
@@ -129,6 +130,7 @@ $lang->mr->errorLang[4] = 'Permission denied';
|
||||
$lang->mr->errorLang[5] = 'Another open merge request already exists for this source branch';
|
||||
$lang->mr->errorLang[6] = 'The source project branch cannot be the same as the target project branch';
|
||||
$lang->mr->errorLang[7] = "user doesn't have access to repo";
|
||||
$lang->mr->errorLang[8] = 'The source branch and target branch cannot be merged';
|
||||
|
||||
$lang->mr->from = "from";
|
||||
$lang->mr->to = "to";
|
||||
|
||||
@@ -121,6 +121,7 @@ $lang->mr->apiErrorMap[4] = "403 Forbidden";
|
||||
$lang->mr->apiErrorMap[5] = "/(pull request already exists for these targets).*/";
|
||||
$lang->mr->apiErrorMap[6] = "Invalid PullRequest: There are no changes between the head and the base";
|
||||
$lang->mr->apiErrorMap[7] = "/(user doesn't have access to repo).*/";
|
||||
$lang->mr->apiErrorMap[8] = "/(git apply).*/";
|
||||
|
||||
$lang->mr->errorLang[1] = 'The source project branch cannot be the same as the target project branch';
|
||||
$lang->mr->errorLang[2] = 'Another open merge request already exists for this source branch: ID%u';
|
||||
@@ -129,6 +130,7 @@ $lang->mr->errorLang[4] = 'Permission denied';
|
||||
$lang->mr->errorLang[5] = 'Another open merge request already exists for this source branch';
|
||||
$lang->mr->errorLang[6] = 'The source project branch cannot be the same as the target project branch';
|
||||
$lang->mr->errorLang[7] = "user doesn't have access to repo";
|
||||
$lang->mr->errorLang[8] = 'The source branch and target branch cannot be merged';
|
||||
|
||||
$lang->mr->from = "from";
|
||||
$lang->mr->to = "to";
|
||||
|
||||
@@ -121,6 +121,7 @@ $lang->mr->apiErrorMap[4] = "403 Forbidden";
|
||||
$lang->mr->apiErrorMap[5] = "/(pull request already exists for these targets).*/";
|
||||
$lang->mr->apiErrorMap[6] = "Invalid PullRequest: There are no changes between the head and the base";
|
||||
$lang->mr->apiErrorMap[7] = "/(user doesn't have access to repo).*/";
|
||||
$lang->mr->apiErrorMap[8] = "/(git apply).*/";
|
||||
|
||||
$lang->mr->errorLang[1] = 'The source project branch cannot be the same as the target project branch';
|
||||
$lang->mr->errorLang[2] = 'Another open merge request already exists for this source branch: ID%u';
|
||||
@@ -129,6 +130,7 @@ $lang->mr->errorLang[4] = 'Permission denied';
|
||||
$lang->mr->errorLang[5] = 'Another open merge request already exists for this source branch';
|
||||
$lang->mr->errorLang[6] = 'The source project branch cannot be the same as the target project branch';
|
||||
$lang->mr->errorLang[7] = "user doesn't have access to repo";
|
||||
$lang->mr->errorLang[8] = 'The source branch and target branch cannot be merged';
|
||||
|
||||
$lang->mr->from = "from";
|
||||
$lang->mr->to = "to";
|
||||
|
||||
@@ -121,6 +121,7 @@ $lang->mr->apiErrorMap[4] = "403 Forbidden";
|
||||
$lang->mr->apiErrorMap[5] = "/(pull request already exists for these targets).*/";
|
||||
$lang->mr->apiErrorMap[6] = "Invalid PullRequest: There are no changes between the head and the base";
|
||||
$lang->mr->apiErrorMap[7] = "/(user doesn't have access to repo).*/";
|
||||
$lang->mr->apiErrorMap[8] = "/(git apply).*/";
|
||||
|
||||
$lang->mr->errorLang[1] = '源项目分支与目标项目分支不能相同';
|
||||
$lang->mr->errorLang[2] = '存在另外一个同样的合并请求在源项目分支中: ID%u';
|
||||
@@ -129,6 +130,7 @@ $lang->mr->errorLang[4] = '权限不足';
|
||||
$lang->mr->errorLang[5] = '存在另外一个同样的合并请求在源项目分支中';
|
||||
$lang->mr->errorLang[6] = '源项目分支与目标项目分支不能相同';
|
||||
$lang->mr->errorLang[7] = '您无权合并改版本库';
|
||||
$lang->mr->errorLang[8] = '当前源分支和目标分支无法合并';
|
||||
|
||||
$lang->mr->from = "从";
|
||||
$lang->mr->to = "合并到";
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<td><?php echo empty($MR->approvalStatus) ? $lang->mr->approvalStatusList['notReviewed'] : $lang->mr->approvalStatusList[$MR->approvalStatus];?></td>
|
||||
<?php endif;?>
|
||||
<td class='text' title='<?php echo zget($users, $MR->createdBy);?>'><?php echo zget($users, $MR->createdBy);?></td>
|
||||
<td class='text' title='<?php echo zget($users, $MR->createdDate);?>'><?php echo zget($users, $MR->createdDate);?></td>
|
||||
<td class='text' title='<?php echo $MR->createdDate;?>'><?php echo $MR->createdDate;?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
$canDelete = ($app->user->admin or (isset($projects[$MR->hostID][$MR->sourceProject]->owner->id) and $projects[$MR->hostID][$MR->sourceProject]->owner->id == $openIDList[$MR->hostID])) ? '' : 'disabled';
|
||||
|
||||
@@ -1270,7 +1270,7 @@ EOF;
|
||||
{
|
||||
if(empty($data->newList))
|
||||
{
|
||||
dao::$errors['newList'] = sprintf($this->lang->error->notempty, $this->lang->user->contacts->listName);
|
||||
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->user->contacts->listName);
|
||||
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
.c-dept {overflow:hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
.c-dept, .c-role {overflow:hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
.c-phone {width: 120px;}
|
||||
.c-email {width: 200px;}
|
||||
.c-role {width: 105px;}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</td>
|
||||
<td><?php echo $user->realname;?></td>
|
||||
<td class='c-dept' title="<?php echo zget($depts, $user->dept);?>"><?php echo zget($depts, $user->dept);?></td>
|
||||
<td><?php echo zget($lang->user->roleList, $user->role);?></td>
|
||||
<td title="<?php echo zget($lang->user->roleList, $user->role)?>"><?php echo zget($lang->user->roleList, $user->role);?></td>
|
||||
<td title="<?php echo $user->phone;?>"><?php echo $user->phone;?></td>
|
||||
<td title="<?php echo $user->qq;?>"><?php echo $user->qq;?></td>
|
||||
<td title="<?php echo $user->weixin;?>"><?php echo $user->weixin;?></td>
|
||||
|
||||
@@ -671,6 +671,7 @@ class productModel extends model
|
||||
->remove('uid,newLine,lineName,contactListMenu')
|
||||
->get();
|
||||
|
||||
$this->lang->error->unique = $this->lang->error->repeat;
|
||||
$product = $this->loadModel('file')->processImgURL($product, $this->config->product->editor->create['id'], $this->post->uid);
|
||||
$programID = isset($product->program) ? $product->program : 0;
|
||||
$this->dao->insert(TABLE_PRODUCT)->data($product)->autoCheck()
|
||||
@@ -763,6 +764,7 @@ class productModel extends model
|
||||
->remove('uid,changeProjects,contactListMenu')
|
||||
->get();
|
||||
|
||||
$this->lang->error->unique = $this->lang->error->repeat;
|
||||
$product = $this->loadModel('file')->processImgURL($product, $this->config->product->editor->edit['id'], $this->post->uid);
|
||||
$programID = isset($product->program) ? $product->program : '';
|
||||
$this->dao->update(TABLE_PRODUCT)->data($product)->autoCheck()
|
||||
|
||||
@@ -278,7 +278,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
$datatableId = $this->moduleName . ucfirst($this->methodName);
|
||||
$useDatatable = (isset($config->datatable->$datatableId->mode) and $config->datatable->$datatableId->mode == 'datatable');
|
||||
$vars = "productID=$productID&branch=$branch&browseType=$browseType¶m=$param&storyType=$storyType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";
|
||||
if($from == 'project') $vars = "projectID=$projectID&productID=$productID&branch=$branch&browseType=$browseType¶m=$param&storyType=$storyType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";
|
||||
if($from == 'project' and !empty($projectID)) $vars = "projectID=$projectID&productID=$productID&branch=$branch&browseType=$browseType¶m=$param&storyType=$storyType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";
|
||||
|
||||
if($useDatatable) include '../../common/view/datatable.html.php';
|
||||
$setting = $this->datatable->getSetting('product');
|
||||
|
||||
@@ -753,6 +753,7 @@ class programModel extends model
|
||||
if(isset($this->lang->program->$field)) $this->lang->project->$field = $this->lang->program->$field;
|
||||
}
|
||||
|
||||
$this->lang->error->unique = $this->lang->error->repeat;
|
||||
$program = $this->loadModel('file')->processImgURL($program, $this->config->program->editor->create['id'], $this->post->uid);
|
||||
$this->dao->insert(TABLE_PROGRAM)->data($program)
|
||||
->autoCheck()
|
||||
@@ -860,6 +861,7 @@ class programModel extends model
|
||||
if(isset($this->lang->program->$field)) $this->lang->project->$field = $this->lang->program->$field;
|
||||
}
|
||||
|
||||
$this->lang->error->unique = $this->lang->error->repeat;
|
||||
$this->dao->update(TABLE_PROGRAM)->data($program)
|
||||
->autoCheck($skipFields = 'begin,end')
|
||||
->batchcheck($this->config->program->edit->requiredFields, 'notempty')
|
||||
|
||||
@@ -1072,7 +1072,7 @@ class project extends control
|
||||
foreach($teamMembers as $key => $member) $memberPairs[$key] = $member->realname;
|
||||
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('project', 'bug', "projectID=$projectID&productID=$productID&orderBy=$orderBy&build=$build&type=bysearch&queryID=myQueryID");
|
||||
$actionURL = $this->createLink('project', 'bug', "projectID=$projectID&productID=$productID&branchID=$branchID&orderBy=$orderBy&build=$build&type=bysearch&queryID=myQueryID");
|
||||
$this->loadModel('execution')->buildBugSearchForm($products, $queryID, $actionURL, 'project');
|
||||
|
||||
$showBranch = false;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
.c-limited {width: 100px;}
|
||||
[lang^=de] .c-limited {width: 175px !important;}
|
||||
.c-actions-1 {width: 80px;}
|
||||
@@ -1190,6 +1190,7 @@ class projectModel extends model
|
||||
if(isset($this->lang->project->$field)) $this->lang->project->$field = $this->lang->project->$field;
|
||||
}
|
||||
|
||||
$this->lang->error->unique = $this->lang->error->repeat;
|
||||
$project = $this->loadModel('file')->processImgURL($project, $this->config->project->editor->create['id'], $this->post->uid);
|
||||
$this->dao->insert(TABLE_PROJECT)->data($project)
|
||||
->autoCheck()
|
||||
@@ -1436,6 +1437,7 @@ class projectModel extends model
|
||||
if(isset($this->lang->project->$field)) $this->lang->project->$field = $this->lang->project->$field;
|
||||
}
|
||||
|
||||
$this->lang->error->unique = $this->lang->error->repeat;
|
||||
$this->dao->update(TABLE_PROJECT)->data($project)
|
||||
->autoCheck($skipFields = 'begin,end')
|
||||
->batchcheck($requiredFields, 'notempty')
|
||||
|
||||
@@ -33,8 +33,9 @@
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
$buildName = $build ? " <span class='label label-danger'>Build:{$build->name}</span>" : '';
|
||||
echo html::a($this->inlink('bug', "projectID={$project->id}&productID={$productID}&branch=$branchID&orderBy=status,id_desc&build=$buildID&type=all"), "<span class='text'>{$lang->bug->allBugs}</span>" . ($type == 'all' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a($this->inlink('bug', "projectID={$project->id}&productID={$productID}&branch=$branchID&orderBy=status,id_desc&build=$buildID&type=unresolved"), "<span class='text'>{$lang->bug->unResolved}</span>" . ($type == 'unresolved' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='unresolvedTab' class='btn btn-link" . ('unresolved' == $type ? ' btn-active-text' : '') . "'");
|
||||
$module = $type != 'bysearch' ? "¶m=$param" : '';
|
||||
echo html::a($this->inlink('bug', "projectID={$project->id}&productID={$productID}&branch=$branchID&orderBy=status,id_desc&build=$buildID&type=all$module"), "<span class='text'>{$lang->bug->allBugs}</span>" . ($type == 'all' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a($this->inlink('bug', "projectID={$project->id}&productID={$productID}&branch=$branchID&orderBy=status,id_desc&build=$buildID&type=unresolved$module"), "<span class='text'>{$lang->bug->unResolved}</span>" . ($type == 'unresolved' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='unresolvedTab' class='btn btn-link" . ('unresolved' == $type ? ' btn-active-text' : '') . "'");
|
||||
?>
|
||||
<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> <?php echo $lang->bug->search;?></a>
|
||||
</div>
|
||||
|
||||
@@ -58,9 +58,9 @@
|
||||
<th><?php echo $lang->team->days;?></th>
|
||||
<th><?php echo $lang->team->hours;?></th>
|
||||
<th><?php echo $lang->team->totalHours;?></th>
|
||||
<th class='w-100px text-center'><?php echo $lang->team->limited;?></th>
|
||||
<th class='c-limited text-center'><?php echo $lang->team->limited;?></th>
|
||||
<?php if($canBeChanged):?>
|
||||
<th class='c-actions-1 w-80px text-center'><?php echo $lang->actions;?></th>
|
||||
<th class='c-actions-1 text-center'><?php echo $lang->actions;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -86,9 +86,9 @@
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
<div class='table-footer'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -79,7 +79,8 @@ function scmChanged(scm)
|
||||
$('tr.service').toggle(true);
|
||||
if(scm == 'Gitea')
|
||||
{
|
||||
$('tr.hide-service').toggle(true);
|
||||
$('tr.hide-service:not(".hide-gitea")').toggle(true);
|
||||
$('tr.hide-gitea').toggle(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -63,7 +63,8 @@ function scmChanged(scm, isFirstRequest = false)
|
||||
$('tr.service').toggle(true);
|
||||
if(scm == 'Gitea')
|
||||
{
|
||||
$('tr.hide-service').toggle(true);
|
||||
$('tr.hide-service:not(".hide-gitea")').toggle(true);
|
||||
$('tr.hide-gitea').toggle(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -199,7 +199,7 @@ $lang->repo->error->linkedJob = "Deletion of the repository failed. The curr
|
||||
$lang->repo->error->clientPath = "The client installation directory cannot have spaces!";
|
||||
$lang->repo->error->notFound = "The repository %s’s URL %s does not exist. Please confirm if this repository has been deleted from the local server.";
|
||||
$lang->repo->error->noWritable = '%s is not writable! Please check the privilege, or download will not be done.';
|
||||
$lang->repo->error->unconnected = 'The directory does not match the repository';
|
||||
$lang->repo->error->noCloneAddr = 'The repository clone address was not found';
|
||||
|
||||
$lang->repo->syncTips = '<strong>You may find the reference about how to set Git sync from <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">here</a>.</strong>';
|
||||
$lang->repo->encodingsTips = "The encodings of comments can be comma separated values, e.g. utf-8.";
|
||||
|
||||
@@ -199,7 +199,7 @@ $lang->repo->error->linkedJob = "Deletion of the repository failed. The curr
|
||||
$lang->repo->error->clientPath = "The client installation directory cannot have spaces!";
|
||||
$lang->repo->error->notFound = "The repository %s’s URL %s does not exist. Please confirm if this repository has been deleted from the local server.";
|
||||
$lang->repo->error->noWritable = '%s is not writable! Please check the privilege, or download will not be done.';
|
||||
$lang->repo->error->unconnected = 'The directory does not match the repository';
|
||||
$lang->repo->error->noCloneAddr = 'The repository clone address was not found';
|
||||
|
||||
$lang->repo->syncTips = '<strong>You may find the reference about how to set Git sync from <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">here</a>.</strong>';
|
||||
$lang->repo->encodingsTips = "The encodings of comments can be comma separated values, e.g. utf-8.";
|
||||
|
||||
@@ -199,7 +199,7 @@ $lang->repo->error->linkedJob = "Deletion of the repository failed. The curr
|
||||
$lang->repo->error->clientPath = "The client installation directory cannot have spaces!";
|
||||
$lang->repo->error->notFound = "The repository %s’s URL %s does not exist. Please confirm if this repository has been deleted from the local server.";
|
||||
$lang->repo->error->noWritable = '%s is not writable! Please check the privilege, or download will not be done.';
|
||||
$lang->repo->error->unconnected = 'The directory does not match the repository';
|
||||
$lang->repo->error->noCloneAddr = 'The repository clone address was not found';
|
||||
|
||||
$lang->repo->syncTips = '<strong>Vous pouvez trouver la référence sur la façon de définir la synchronisation Git à partir de la page se trouvant <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">ici</a>.</strong>';
|
||||
$lang->repo->encodingsTips = "Les encodages des commentaires de validation peuvent être des valeurs séparées par des virgules,ex: utf-8";
|
||||
|
||||
@@ -199,7 +199,7 @@ $lang->repo->error->linkedJob = "Deletion of the repository failed. The curr
|
||||
$lang->repo->error->clientPath = "The client installation directory cannot have spaces!";
|
||||
$lang->repo->error->notFound = "The repository %s’s URL %s does not exist. Please confirm if this repository has been deleted from the local server.";
|
||||
$lang->repo->error->noWritable = '%s is not writable! Please check the privilege, or download will not be done.';
|
||||
$lang->repo->error->unconnected = 'The directory does not match the repository';
|
||||
$lang->repo->error->noCloneAddr = 'The repository clone address was not found';
|
||||
|
||||
$lang->repo->syncTips = '<strong>Bạn có thể tìm tham khảo làm sao thiết lập đồng bộ Git từ <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">here</a>.</strong>';
|
||||
$lang->repo->encodingsTips = "The encodings of commit comments, can be comma separated values,ví dụ: utf-8";
|
||||
|
||||
@@ -199,7 +199,7 @@ $lang->repo->error->linkedJob = "删除代码库失败,当前代码库与
|
||||
$lang->repo->error->clientPath = "客户端安装目录不能有空格!";
|
||||
$lang->repo->error->notFound = "代码库『%s』路径 %s 不存在,请确认此代码库是否已在本地服务器被删除";
|
||||
$lang->repo->error->noWritable = '%s 不可写!请检查该目录权限,否则无法下载。';
|
||||
$lang->repo->error->unconnected = '目录地址与仓库不匹配';
|
||||
$lang->repo->error->noCloneAddr = '该项目克隆地址未找到';
|
||||
|
||||
$lang->repo->syncTips = '请参照<a target="_blank" href="https://www.zentao.net/book/zentaopmshelp/207.html">这里</a>,设置代码库定时同步。';
|
||||
$lang->repo->encodingsTips = "提交日志的编码,可以用逗号连接起来的多个,比如utf-8。";
|
||||
|
||||
+23
-10
@@ -221,15 +221,6 @@ class repoModel extends model
|
||||
|
||||
$data->acl = empty($data->acl) ? '' : json_encode($data->acl);
|
||||
|
||||
if($data->SCM == 'Gitea')
|
||||
{
|
||||
$relation = $this->loadModel('gitea')->checkRemoteUrl($data->serviceHost, $data->serviceProject, $data->client, $data->path);
|
||||
if(!$relation)
|
||||
{
|
||||
dao::$errors['path'] = $this->lang->repo->error->unconnected;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if($data->SCM == 'Subversion')
|
||||
{
|
||||
$scm = $this->app->loadClass('scm');
|
||||
@@ -1424,7 +1415,29 @@ class repoModel extends model
|
||||
return false;
|
||||
}
|
||||
}
|
||||
elseif(in_array($scm, array('Git', 'Gitea')))
|
||||
elseif($scm == 'Gitea')
|
||||
{
|
||||
if($this->post->name != '' and $this->post->serviceProject != '')
|
||||
{
|
||||
$project = $this->loadModel('gitea')->apiGetSingleProject($this->post->serviceHost, $this->post->serviceProject);
|
||||
if(isset($project->tokenCloneUrl))
|
||||
{
|
||||
$path = dirname(dirname(dirname(__FILE__))) . '/tmp/repo/' . $this->post->name . '_gitea';
|
||||
if(!realpath($path))
|
||||
{
|
||||
$cmd = 'git clone --progress -v "' . $project->tokenCloneUrl . '" "' . $path . '"';
|
||||
exec($cmd);
|
||||
}
|
||||
$_POST['path'] = $path;
|
||||
}
|
||||
else
|
||||
{
|
||||
dao::$errors['serviceProject'] = $this->lang->repo->error->noCloneAddr;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($scm == 'Git')
|
||||
{
|
||||
if(!is_dir($path))
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ $pathInfo = '&root=' . $this->repo->encodePath(empty($path) ? '/' : $path);
|
||||
if(isset($entry)) $pathInfo .= '&type=file';
|
||||
?>
|
||||
<?php js::set('paramsBase', "repoID=$repoID&path=" . $this->repo->encodePath($path) . "&objectID=$objectID&type=$logType");?>
|
||||
<form id='logForm' class='main-table' method='post' onsubmit='logsubmit()'>
|
||||
<form id='logForm' class='main-table not-watch' method='post' onsubmit='logsubmit()'>
|
||||
<table class='table table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<td class='required'><?php echo html::input('name', '', "class='form-control'"); ?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class='hide-service'>
|
||||
<tr class='hide-service hide-gitea'>
|
||||
<th><?php echo $lang->repo->path; ?></th>
|
||||
<td class='required'><?php echo html::input('path', '', "class='form-control'"); ?></td>
|
||||
<td class='muted'>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<td class='required'><?php echo html::input('name', $repo->name, "class='form-control'"); ?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class='hide-service'>
|
||||
<tr class='hide-service hide-gitea'>
|
||||
<th><?php echo $lang->repo->path; ?></th>
|
||||
<td class='required'><?php echo html::input('path', $repo->path, "class='form-control'"); ?></td>
|
||||
<td class='muted'>
|
||||
|
||||
@@ -85,10 +85,12 @@ $typeInfo = $type == 'file' ? '&type=file' : '';
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!isonlybody()):?>
|
||||
<div id="mainActions" class='main-actions'>
|
||||
<nav class="container">
|
||||
<?php if(!empty($preAndNext->pre)) echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=$objectID&revision={$preAndNext->pre}" . $pathInfo . $typeInfo, 'html'), "<i class='icon-pre icon-chevron-left'></i>", '', "data-app='{$app->tab}' id='prevPage' class='btn btn-info' title='{$preAndNext->pre}'");?>
|
||||
<?php if(!empty($preAndNext->next)) echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=$objectID&revision={$preAndNext->next}" . $pathInfo . $typeInfo, 'html'), "<i class='icon-pre icon-chevron-right'></i>", '', "data-app='{$app->tab}' id='nextPage' class='btn btn-info' title='{$preAndNext->next}'");?>
|
||||
</nav>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1049,10 +1049,11 @@ class story extends control
|
||||
* Change a story.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param string $from
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function change($storyID)
|
||||
public function change($storyID, $from = '')
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
@@ -1095,7 +1096,7 @@ class story extends control
|
||||
$kanbanData = json_encode($kanbanData);
|
||||
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
|
||||
}
|
||||
else
|
||||
if($from == 'taskkanban')
|
||||
{
|
||||
$taskSearchValue = $this->session->taskSearchValue ? $this->session->taskSearchValue : '';
|
||||
$kanbanData = $this->loadModel('kanban')->getExecutionKanban($execution->id, $execLaneType, $execGroupBy, $taskSearchValue);
|
||||
@@ -1385,7 +1386,7 @@ class story extends control
|
||||
$kanbanData = json_encode($kanbanData);
|
||||
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
|
||||
}
|
||||
else
|
||||
if($from == 'taskkanban')
|
||||
{
|
||||
$taskSearchValue = $this->session->taskSearchValue ? $this->session->taskSearchValue : '';
|
||||
$kanbanData = $this->loadModel('kanban')->getExecutionKanban($this->session->execution, $execLaneType, $execGroupBy, $taskSearchValue);
|
||||
|
||||
@@ -1221,6 +1221,8 @@ class treeModel extends model
|
||||
$moduleName = strpos(',project,execution,', ",{$this->app->tab},") !== false ? $this->app->tab : 'bug';
|
||||
$methodName = strpos(',project,execution,', ",{$this->app->tab},") !== false ? 'bug' : 'browse';
|
||||
$param = "root={$module->root}&branch=&type=byModule¶m={$module->id}";
|
||||
|
||||
$extra['type'] = (isset($extra['type']) and $extra['type'] != 'bysearch') ? $extra['type'] : 'all';
|
||||
if($this->app->tab == 'execution') $param = "execuitonID={$extra['executionID']}&productID={$module->root}&branch={$extra['branchID']}&orderBy={$extra['orderBy']}&build={$extra['build']}&type={$extra['type']}¶m={$module->id}";
|
||||
if($this->app->tab == 'project') $param = "projectID={$extra['projectID']}&productID={$module->root}&branch={$extra['branchID']}&orderBy={$extra['orderBy']}&build={$extra['build']}&type={$extra['type']}¶m={$module->id}";
|
||||
return html::a(helper::createLink($moduleName, $methodName, $param), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
|
||||
|
||||
@@ -398,7 +398,7 @@ class userModel extends model
|
||||
$users = fixer::input('post')->get();
|
||||
$data = array();
|
||||
$accounts = array();
|
||||
for($i = 1; $i < $this->config->user->batchCreate; $i++)
|
||||
for($i = 1; $i <= $this->config->user->batchCreate; $i++)
|
||||
{
|
||||
$users->account[$i] = trim($users->account[$i]);
|
||||
if($users->account[$i] != '')
|
||||
|
||||
@@ -1 +1 @@
|
||||
#bindForm .c-bind{width: 128px;}
|
||||
#bindForm .c-bind{width: 148px;}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
+274
-272
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 257 KiB |
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user