Merge branch 'cyy_optimize' into 'master'

Cyy optimize

See merge request easycorp/zentaopms!4637
This commit is contained in:
王怡栋
2022-07-22 08:02:13 +00:00
48 changed files with 88 additions and 92 deletions
+1 -1
View File
@@ -72,7 +72,7 @@
</tbody>
<tfoot>
<tr>
<td colspan="3" class="text-center form-actions">
<td colspan="5" class="text-center form-actions">
<?php echo html::submitButton();?>
<?php if(!isonlybody()) echo html::a(inlink('browse', ""), $lang->goback, '', 'class="btn btn-wide"');?>
</td>
+5 -5
View File
@@ -35,16 +35,16 @@
<thead>
<tr>
<?php $vars = "orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<th class='c-id text-center'><?php common::printOrderLink('id', $orderBy, $vars, $lang->gitea->id);?></th>
<th class='c-name text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitea->name);?></th>
<th class='text-left'><?php common::printOrderLink('url', $orderBy, $vars, $lang->gitea->url);?></th>
<th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->gitea->id);?></th>
<th class='c-name w-300px'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitea->name);?></th>
<th class='text'><?php common::printOrderLink('url', $orderBy, $vars, $lang->gitea->url);?></th>
<th class='c-actions-3'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach ($giteaList as $id => $gitea): ?>
<tr class='text'>
<td class='text-center'><?php echo $id;?></td>
<td class='text'><?php echo $id;?></td>
<td class='text-c-name' title='<?php echo $gitea->name;?>'>
<?php if(common::hasPriv('gitea', 'view')):?>
<a class="iframe" href="<?php echo $this->createLink('gitea', 'view', "giteaID=$id", '', true); ?>"><?php echo $gitea->name;?></a>
@@ -53,7 +53,7 @@
<?php endif;?>
</td>
<td class='text' title='<?php echo $gitea->url;?>'><?php echo html::a($gitea->url, $gitea->url, '_target');?></td>
<td class='c-actions text-left'>
<td class='c-actions'>
<?php
common::printIcon('gitea', 'edit', "giteaID=$id", '', 'list', 'edit');
echo common::buildIconButton('gitea', 'bindUser', "giteaID=$id", '', 'list', 'link', '', '', false, '', '', 0, $gitea->isBindUser);
+1 -2
View File
@@ -33,8 +33,7 @@
<td><?php echo html::input('token', '', "class='form-control'");?></td>
</tr>
<tr>
<th></th>
<td class='text-center form-actions'>
<td colspan='2' class='text-center form-actions'>
<?php echo html::submitButton();?>
</td>
</tr>
+1 -2
View File
@@ -33,8 +33,7 @@
<td><?php echo html::input('token', isset($gitea->token) ? $gitea->token : '', "class='form-control'");?></td>
</tr>
<tr>
<th></th>
<td class='text-center form-actions'>
<td colspan='2' class='text-center form-actions'>
<?php echo html::submitButton();?>
</td>
</tr>
+1 -1
View File
@@ -72,7 +72,7 @@
</tbody>
<tfoot>
<tr>
<td colspan="3" class="text-center form-actions">
<td colspan="5" class="text-center form-actions">
<?php echo html::submitButton();?>
<?php if(!isonlybody()) echo html::a(inlink('browse', ""), $lang->goback, '', 'class="btn btn-wide"');?>
</td>
+4 -4
View File
@@ -35,8 +35,8 @@
<thead>
<tr>
<?php $vars = "orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<th class='c-id text-center'><?php common::printOrderLink('id', $orderBy, $vars, $lang->gitlab->id);?></th>
<th class='c-name text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitlab->name);?></th>
<th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->gitlab->id);?></th>
<th class='c-name w-300px'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitlab->name);?></th>
<th class='text-left'><?php common::printOrderLink('url', $orderBy, $vars, $lang->gitlab->url);?></th>
<th class='c-actions-3'><?php echo $lang->actions;?></th>
</tr>
@@ -44,7 +44,7 @@
<tbody>
<?php foreach ($gitlabList as $id => $gitlab): ?>
<tr class='text'>
<td class='text-center'><?php echo $id;?></td>
<td class='text'><?php echo $id;?></td>
<td class='text-c-name' title='<?php echo $gitlab->name;?>'>
<?php if(common::hasPriv('gitlab', 'browseProject')):?>
<a href="<?php echo $this->createLink('gitlab', 'browseProject', "gitlabID=$id"); ?>"><?php echo $gitlab->name;?></a>
@@ -53,7 +53,7 @@
<?php endif;?>
</td>
<td class='text' title='<?php echo $gitlab->url;?>'><?php echo html::a($gitlab->url, $gitlab->url, '_target');?></td>
<td class='c-actions text-left'>
<td class='c-actions'>
<?php
$disabled = $gitlab->isBindUser ? true : false;
common::printIcon('gitlab', 'edit', "gitlabID=$id", '', 'list', 'edit');
+1 -1
View File
@@ -37,7 +37,7 @@
<?php $vars = "gitlabID={$gitlabID}&projectID={$projectID}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<thead>
<tr>
<th class='c-name text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitlab->branch->name);?></th>
<th class='c-name text'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitlab->branch->name);?></th>
<th class='text-left'><?php echo $lang->gitlab->branch->lastCommitter;?></th>
<th class='text-left'><?php common::printOrderLink('lastCommittedDate', $orderBy, $vars, $lang->gitlab->branch->lastCommittedDate);?></th>
</tr>
+1 -1
View File
@@ -49,7 +49,7 @@
<tbody>
<?php foreach ($gitlabGroupList as $id => $gitlabGroup): ?>
<tr class='text'>
<td class='text-center'><?php echo $gitlabGroup->id;?></td>
<td class='text'><?php echo $gitlabGroup->id;?></td>
<td class='text-c-name' title='<?php echo $gitlabGroup->full_name;?>'>
<?php $groupName = current(common::convert2Pinyin(array($gitlabGroup->name))); ?>
<?php echo html::avatar(array('avatar' => $gitlabGroup->avatar_url, 'account' => $groupName), 20); ?>
+5 -5
View File
@@ -42,23 +42,23 @@
<thead>
<tr>
<th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->gitlab->id);?></th>
<th class='c-name text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitlab->project->name);?></th>
<th class='text-left'></th>
<th class='text-left'><?php echo $lang->gitlab->lastUpdate;?></th>
<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'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach ($gitlabProjectList as $id => $gitlabProject): ?>
<tr class='text'>
<td class='text-center'><?php echo $gitlabProject->id;?></td>
<td class='text'><?php echo $gitlabProject->id;?></td>
<td class='text-c-name' title='<?php echo $gitlabProject->name;?>'><?php echo $gitlabProject->name_with_namespace;?></td>
<td class='text text-c-counts'>
<span title="<?php echo $lang->gitlab->project->star;?>"><i class="icon icon-star"></i> <?php echo $gitlabProject->star_count;?></span>
<span title="<?php echo $lang->gitlab->project->fork;?>"><i class="icon icon-code-fork"></i> <?php echo $gitlabProject->forks_count;?></span>
</td>
<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 text-left'>
<td class='c-actions'>
<?php
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));
+5 -5
View File
@@ -38,17 +38,17 @@
<tr>
<?php $vars = "gitlabID=$gitlabID&orderBy=%s";?>
<th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->gitlab->user->id);?></th>
<th class='c-name text-left w-60px'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitlab->user->name);?></th>
<th class='c-name text-left'></th>
<th class='text-left'><?php echo $lang->gitlab->user->createOn;?></th>
<th class='text-left'><?php echo $lang->gitlab->user->lastActivity;?></th>
<th class='c-name text w-60px'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitlab->user->name);?></th>
<th class='c-name text w-400px'></th>
<th class='text'><?php echo $lang->gitlab->user->createOn;?></th>
<th class='text'><?php echo $lang->gitlab->user->lastActivity;?></th>
<th class='c-actions-4'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach ($gitlabUserList as $id => $gitlabUser): ?>
<tr>
<td class='text-center'><?php echo $gitlabUser->id;?></td>
<td class='text'><?php echo $gitlabUser->id;?></td>
<td class='w-60px'><?php echo html::image($gitlabUser->avatar, "height=40");?></td>
<td class='text-left'>
<strong><?php echo $gitlabUser->realname;?></strong>
+1 -2
View File
@@ -34,8 +34,7 @@
<td><?php echo html::input('token', '', "class='form-control' placeholder='{$lang->gitlab->placeholder->token}'");?></td>
</tr>
<tr>
<th></th>
<td class='text-center form-actions'>
<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"');?>
</td>
+1 -2
View File
@@ -69,8 +69,7 @@
<td><?php echo html::select('subgroup_creation_level', $lang->gitlab->group->subgroupCreationLevelList, 'maintainer', "class='form-control'");?></td>
</tr>
<tr>
<th></th>
<td class='text-center form-actions'>
<td colspan="2" class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php if(!isonlybody()) echo html::a(inlink('browseGroup', "gitlabID=$gitlabID"), $lang->goback, '', 'class="btn btn-wide"');?>
</td>
+1 -2
View File
@@ -52,8 +52,7 @@
<td colspan='2'><?php echo nl2br(html::radio('visibility', $lang->gitlab->project->visibilityList, 'private', "", 'block'));?></td>
</tr>
<tr>
<th></th>
<td class='text-center form-actions'>
<td colspan="2" class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php if(!isonlybody()) echo html::a(inlink('browseProject', "gitlabID=$gitlabID"), $lang->goback, '', 'class="btn btn-wide"');?>
</td>
+1 -2
View File
@@ -81,8 +81,7 @@
</tr>
<?php endif;?>
<tr>
<th></th>
<td class='text-center form-actions'>
<td colspan="2" class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php if(!isonlybody()) echo html::a(inlink('browseUser', "gitlabID=$gitlabID"), $lang->goback, '', 'class="btn btn-wide"');?>
</td>
+1 -2
View File
@@ -33,8 +33,7 @@
<td><?php echo html::input('token', isset($gitlab->token) ? $gitlab->token : '', "class='form-control' placeholder='{$lang->gitlab->placeholder->token}'");?></td>
</tr>
<tr>
<th></th>
<td class='text-center form-actions'>
<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"');?>
</td>
+1 -2
View File
@@ -72,8 +72,7 @@
<td><?php echo html::select('subgroup_creation_level', $lang->gitlab->group->subgroupCreationLevelList, $group->subgroup_creation_level, "class='form-control'");?></td>
</tr>
<tr>
<th></th>
<td class='text-center form-actions'>
<td colspan="2" class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php if(!isonlybody()) echo html::a(inlink('browseGroup', "gitlabID=$gitlabID"), $lang->goback, '', 'class="btn btn-wide"');?>
</td>
+1 -2
View File
@@ -40,8 +40,7 @@
<td colspan='2'><?php echo nl2br(html::radio('visibility', $lang->gitlab->project->visibilityList, $project->visibility, "", 'block'));?></td>
</tr>
<tr>
<th></th>
<td class='text-center form-actions'>
<td colspan="2" class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php if(!isonlybody()) echo html::a(inlink('browseProject', "gitlabID=$gitlabID"), $lang->goback, '', 'class="btn btn-wide"');?>
</td>
+1 -2
View File
@@ -81,8 +81,7 @@
</tr>
<?php endif;?>
<tr>
<th></th>
<td class='text-center form-actions'>
<td colspan="2" class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php if(!isonlybody()) echo html::a(inlink('browseUser', "gitlabID=$gitlabID"), $lang->goback, '', 'class="btn btn-wide"');?>
</td>
+1 -1
View File
@@ -47,7 +47,7 @@
</tbody>
<tfoot>
<tr>
<td colspan='4' class='text-center form-actions'>
<td colspan='3' class='text-center form-actions'>
<?php
echo html::submitButton('', '', 'hidden btn btn-wide btn-primary');
echo html::commonButton($lang->save, 'onclick="savePriv()" id="saveBtn"', 'btn btn-wide btn-primary');
+4 -4
View File
@@ -36,18 +36,18 @@
<tr>
<?php $vars = "orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"; ?>
<th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->jenkins->id); ?></th>
<th class='c-name text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->jenkins->name); ?></th>
<th class='text-left'><?php common::printOrderLink('url', $orderBy, $vars, $lang->jenkins->url); ?></th>
<th class='c-name w-300px'><?php common::printOrderLink('name', $orderBy, $vars, $lang->jenkins->name); ?></th>
<th class='text'><?php common::printOrderLink('url', $orderBy, $vars, $lang->jenkins->url); ?></th>
<th class='c-actions-2'><?php echo $lang->actions; ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($jenkinsList as $id => $jenkins): ?>
<tr>
<td class='text-center'><?php echo $id; ?></td>
<td class='text'><?php echo $id; ?></td>
<td class='text' title='<?php echo $jenkins->name; ?>'><?php echo $jenkins->name; ?></td>
<td class='text' title='<?php echo $jenkins->url; ?>'><?php echo html::a($jenkins->url, $jenkins->url, '_blank'); ?></td>
<td class='c-actions text-left'>
<td class='c-actions'>
<?php
common::printIcon('jenkins', 'edit', "jenkinsID=$id", '', 'list', 'edit');
if(common::hasPriv('jenkins', 'delete')) echo html::a($this->createLink('jenkins', 'delete', "jenkinsID=$id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->jenkins->delete}' class='btn'");
+1 -2
View File
@@ -44,8 +44,7 @@
<td><?php echo $lang->jenkins->tips;?></td>
</tr>
<tr>
<th></th>
<td class='text-center form-actions'>
<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"');?>
</td>
+1 -2
View File
@@ -44,8 +44,7 @@
<td><?php echo $lang->jenkins->tips;?></td>
</tr>
<tr>
<th></th>
<td class='text-center form-actions'>
<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"');?>
</td>
+1 -2
View File
@@ -139,8 +139,7 @@
</td>
</tr>
<tr>
<th></th>
<td class='text-center form-actions'>
<td colspan="3" class='text-center form-actions'>
<?php echo html::submitButton(); ?>
<?php if(!isonlybody()) echo html::a(inlink('browse', ""), $lang->goback, '', 'class="btn btn-wide"');?>
<?php echo html::hidden('repoType');?>
+1 -2
View File
@@ -187,8 +187,7 @@
</td>
</tr>
<tr>
<th></th>
<td colspan="2" class='text-center form-actions'>
<td colspan="3" class='text-center form-actions'>
<?php echo html::submitButton();?>
<?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'));?>
+1
View File
@@ -10,3 +10,4 @@
box-shadow: 0 1px 1px rgba(0,0,0,.05),0 2px 6px 0 rgba(0,0,0,.045)
}
.side-col{padding-top:5px;}
.detail-content .btn-active-text {padding-top: 5px;}
+2
View File
@@ -162,6 +162,8 @@ $(function()
}
$.get(url, function(response)
{
if(response == "<option value=''></option>" && confirm(mrLang.addForApp) == true) window.open(hosts[hostID].url);
$('#sourceProject').html('').append(response);
if(repo.project)
{
+1
View File
@@ -199,3 +199,4 @@ $lang->mr->unlinkedTasks = 'Task not linked';
$lang->mr->confirmUnlinkTask = "Are you sure to remove this task?";
$lang->mr->taskSummary = "There are <strong>%s</strong> tasks on this page";
$lang->mr->notDelbranch = "The source branch cannot be deleted when it is a protected branch";
$lang->mr->addForApp = "There are no projects under this server, do you want to go to add?";
+1
View File
@@ -199,3 +199,4 @@ $lang->mr->unlinkedTasks = 'Task not linked';
$lang->mr->confirmUnlinkTask = "Are you sure to remove this task?";
$lang->mr->taskSummary = "There are <strong>%s</strong> tasks on this page";
$lang->mr->notDelbranch = "The source branch cannot be deleted when it is a protected branch";
$lang->mr->addForApp = "There are no projects under this server, do you want to go to add?";
+1
View File
@@ -199,3 +199,4 @@ $lang->mr->unlinkedTasks = 'Task not linked';
$lang->mr->confirmUnlinkTask = "Are you sure to remove this task?";
$lang->mr->taskSummary = "There are <strong>%s</strong> tasks on this page";
$lang->mr->notDelbranch = "The source branch cannot be deleted when it is a protected branch";
$lang->mr->addForApp = "There are no projects under this server, do you want to go to add?";
+1
View File
@@ -199,3 +199,4 @@ $lang->mr->unlinkedTasks = 'Task not linked';
$lang->mr->confirmUnlinkTask = "Are you sure to remove this task?";
$lang->mr->taskSummary = "There are <strong>%s</strong> tasks on this page";
$lang->mr->notDelbranch = "The source branch cannot be deleted when it is a protected branch";
$lang->mr->addForApp = "There are no projects under this server, do you want to go to add?";
+1
View File
@@ -199,3 +199,4 @@ $lang->mr->unlinkedTasks = '未关联任务';
$lang->mr->confirmUnlinkTask = "您确认移除该任务吗?";
$lang->mr->taskSummary = "本页共 <strong>%s</strong> 个任务";
$lang->mr->notDelbranch = "源分支为受保护分支时不可删除";
$lang->mr->addForApp = "该服务器下没有项目,是否前往添加?";
+3 -8
View File
@@ -996,15 +996,8 @@ class mrModel extends model
if($MR and $MR->removeSourceBranch == '1') $data['delete_branch_after_merge'] = true;
$rowMR = json_decode(commonModel::http($url, $data, array(), array(), 'json', 'POST'));
if(!isset($rowMR->massage))
{
$rowMR = $this->apiGetSingleMR($hostID, $projectID, $MRID);
if(!isset($rowMR->massage)) $rowMR = $this->apiGetSingleMR($hostID, $projectID, $MRID);
$this->dao->update(TABLE_MR)->data(array('status' => 'merged'))
->where('id')->eq($MRID)
->autoCheck()
->exec();
}
return $rowMR;
}
}
@@ -1892,6 +1885,8 @@ class mrModel extends model
{
$this->action->create('task', $task->id, 'mergedmr', '', helper::createLink('mr', 'view', "mr={$MR->id}"));
}
return $this->dao->update(TABLE_MR)->data(array('status' => 'merged'))->where('id')->eq($MR->id)->exec();
}
/**
+1
View File
@@ -13,6 +13,7 @@
<?php js::import($jsRoot . 'misc/base64.js');?>
<?php js::set('hosts', $hosts);?>
<?php js::set('repo', $repo);?>
<?php js::set('mrLang', $lang->mr);?>
<?php js::set('branchPrivs', array());?>
<div id='mainContent' class='main-row'>
<div class='main-col main-content'>
+4 -4
View File
@@ -93,8 +93,8 @@
<?php if($arrange == 'inline'):?>
<?php foreach($content->lines as $line):?>
<tr data-line='<?php echo $line->newlc ?>'>
<th class='w-num text-right'><?php if($line->type != 'new') echo $line->oldlc?></th>
<th class='w-num text-left'><?php if($line->type != 'old') echo $line->newlc?></th>
<th class='w-num text-center'><?php if($line->type != 'new') echo $line->oldlc?></th>
<th class='w-num text-center'><?php if($line->type != 'old') echo $line->newlc?></th>
<td class='line-<?php echo $line->type?> code'><?php
echo $line->type == 'old' ? preg_replace('/^\-/', '&ndash;', $line->line) : ($line->type == 'new' ? $line->line : ' ' . $line->line);
?></td>
@@ -121,12 +121,12 @@
if(!isset($content->new[$newlc])) continue;
}
?>
<th class='w-num text-right'><?php echo $oldlc?></th>
<th class='w-num text-center'><?php echo $oldlc?></th>
<td class='w-code line-<?php if($line->type != 'new')echo $line->type?> <?php if($line->type == 'custom') echo "line-old"?> code'><?php
if(!isset($content->old[$oldlc])) $content->old[$oldlc] = '';
if(!empty($oldlc)) echo $line->type != 'all' ? preg_replace('/^\-/', '&ndash;', $content->old[$oldlc]) : ' ' . $content->old[$oldlc];
?></td>
<th class='w-num text-right'><?php echo $newlc?></th>
<th class='w-num text-center'><?php echo $newlc?></th>
<td class='w-code line-<?php if($line->type != 'old') echo $line->type?> <?php if($line->type == 'custom') echo "line-new"?> code'><?php
if(!isset($content->new[$newlc])) $content->new[$newlc] = '';
if(!empty($newlc)) echo $line->type != 'all' ? $content->new[$newlc] : ' ' . $content->new[$newlc];
-1
View File
@@ -80,7 +80,6 @@ class repo extends control
{
$repoID = $this->repo->saveState(0, $objectID);
if($this->viewType !== 'json') $this->commonAction($repoID, $objectID);
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'");
$repoList = $this->repo->getList(0, '', $orderBy);
$sonarRepoList = $this->loadModel('job')->getSonarqubeByRepo(array_keys($repoList));
+1
View File
@@ -31,3 +31,4 @@
.popover-content {padding: 0;}
.download-popover .table {margin-bottom: 0;}
.download-popover .table td {padding-right: 0;}
.download-popover .popover-title {padding: 8px;}
+2 -1
View File
@@ -189,4 +189,5 @@ h3 {font-size: 16px;}
.header-btn .btn > .text {text-overflow: unset !important;}
#repoPageSize {right: 90px;}
#repoPageSize {right: 90px; padding: 8px 5px 6px 10px;}
.dropdown-menu li > a.selected {color: #3123ae !important; background: #f2eafc !important; line-height: 20px; border-radius: 5px;}
+2
View File
@@ -22,3 +22,5 @@ table.diff {margin-bottom: 0px;}
.btn-download {border-right: none;}
.body-modal .repo-diff {display: none;}
.body-modal #mainMenu {padding-bottom: 40px;}
.repoCode td.code {white-space: inherit;}
+2 -2
View File
@@ -36,7 +36,7 @@ function getCloneHtml(cloneLang, url)
{
var content = '';
content += "<tr>";
content += "<th>" + cloneLang + "</th>";
content += "<td>" + cloneLang + "</td>";
content += "</tr>";
content += "<tr>";
content += "<td><input type='input' class='form-control' value='" + url + "' readonly></td>";
@@ -53,7 +53,7 @@ $(function()
content: getDownload(),
html: true,
placement: 'bottom',
template: '<div class="popover"><h3 class="popover-title"></h3><div class="popover-content"></div></div',
template: '<div class="popover"><h3 class="popover-title strong repo-popover"></h3><div class="popover-content"></div></div',
tipClass: 'download-popover',
trigger: 'manual'
};
@@ -23,7 +23,6 @@
#dropMenu {margin: 0;}
#dropMenu ul > li > ul > li > a:hover {color: white; background-color: #0c64eb; text-decoration: none;}
#dropMenu .tree .has-list > ul > li {padding-top: 0;}
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;}
+1 -1
View File
@@ -20,7 +20,7 @@ if(isset($entry)) $pathInfo .= '&type=file';
<thead>
<tr>
<?php if($repo->SCM != 'Gitea'):?>
<th class='c-checkbox'></th>
<th class='c-checkbox w-40px'></th>
<?php endif;?>
<th class='c-version'><?php echo $lang->repo->revisionA?></th>
<?php if($repo->SCM != 'Subversion'):?>
+1 -2
View File
@@ -97,8 +97,7 @@
<td colspan='2'><?php echo html::textarea('desc', '', "rows='3' class='form-control'"); ?></td>
</tr>
<tr>
<th></th>
<td colspan='2' class='text-center form-actions'>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton(); ?>
<?php if(!isonlybody()) echo html::a(inlink('maintain', ""), $lang->goback, '', 'class="btn btn-wide"');?>
</td>
+5 -5
View File
@@ -101,8 +101,8 @@
<?php if($arrange == 'inline'):?>
<?php foreach($content->lines as $line):?>
<tr data-line='<?php echo $line->newlc ?>'>
<th class='w-num text-right'><?php if($line->type != 'new') echo $line->oldlc?></th>
<th class='w-num text-left'><?php if($line->type != 'old') echo $line->newlc?></th>
<th class='w-num text'><?php if($line->type != 'new' and $line->oldlc) echo $line->oldlc?></th>
<th class='w-num text'><?php if($line->type != 'old' and $line->newlc) echo $line->newlc?></th>
<td class='line-<?php echo $line->type?> code'><?php
$line->line = $repo->SCM == 'Subversion' ? htmlSpecialString($line->line) : $line->line;
echo $line->type == 'old' ? preg_replace('/^\-/', '&ndash;', $line->line) : ($line->type == 'new' ? $line->line : ' ' . $line->line);
@@ -125,18 +125,18 @@
}
else
{
$oldlc = $line->oldlc;
$oldlc = $line->oldlc > 0 ? $line->oldlc : ' ';
$newlc = $line->newlc;
if(!isset($content->new[$newlc])) continue;
}
?>
<th class='w-num text-right'><?php echo $oldlc?></th>
<th class='w-num text-center'><?php echo $oldlc?></th>
<td class='w-code line-<?php if($line->type != 'new')echo $line->type?> <?php if($line->type == 'custom') echo "line-old"?> code'><?php
if(!isset($content->old[$oldlc])) $content->old[$oldlc] = '';
$content->old[$oldlc] = $repo->SCM == 'Subversion' ? htmlSpecialString($content->old[$oldlc]) : $content->old[$oldlc];
if(!empty($oldlc)) echo $line->type != 'all' ? preg_replace('/^\-/', '&ndash;', $content->old[$oldlc]) : ' ' . $content->old[$oldlc];
?></td>
<th class='w-num text-right'><?php echo $newlc?></th>
<th class='w-num text-center'><?php echo $newlc?></th>
<td class='w-code line-<?php if($line->type != 'old') echo $line->type?> <?php if($line->type == 'custom') echo "line-new"?> code'><?php
if(!isset($content->new[$newlc])) $content->new[$newlc] = '';
$content->new[$newlc] = $repo->SCM == 'Subversion' ? htmlSpecialString($content->new[$newlc]) : $content->new[$newlc];
+1 -2
View File
@@ -102,8 +102,7 @@
<td colspan='2'><?php echo html::textarea('desc', $repo->desc, "rows='3' class='form-control'"); ?></td>
</tr>
<tr>
<th></th>
<td colspan='2' class='text-center form-actions'>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton(); ?>
<?php if(!isonlybody()) echo html::a(inlink('maintain', ""), $lang->goback, '', 'class="btn btn-wide"'); ?>
</td>
+8
View File
@@ -11,6 +11,14 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php echo html::a($this->createLink('repo', 'browse'), "<span class='text'>{$lang->repo->maintain}</span>", '', "class='btn btn-link btn-active-text'");?>
</div>
<div class='btn-toolbar pull-right'>
<?php if(common::hasPriv('repo', 'create')) echo html::a(helper::createLink('repo', 'create'), "<i class='icon icon-plus'></i> " . $this->lang->repo->create, '', "class='btn btn-primary'");?>
</div>
</div>
<div id='mainContent'>
<form class='main-table' id='ajaxForm' method='post'>
<table id='repoList' class='table has-sort-head table-fixed'>
+5 -5
View File
@@ -35,19 +35,19 @@
<thead>
<tr>
<?php $vars = "orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<th class='c-id text-center'><?php common::printOrderLink('id', $orderBy, $vars, $lang->sonarqube->id);?></th>
<th class='c-name text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->sonarqube->name);?></th>
<th class='text-left'><?php common::printOrderLink('url', $orderBy, $vars, $lang->sonarqube->url);?></th>
<th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->sonarqube->id);?></th>
<th class='c-name w-300px'><?php common::printOrderLink('name', $orderBy, $vars, $lang->sonarqube->name);?></th>
<th class='text'><?php common::printOrderLink('url', $orderBy, $vars, $lang->sonarqube->url);?></th>
<th class='c-actions-3'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach ($sonarqubeList as $id => $sonarqube): ?>
<tr class='text'>
<td class='text-center'><?php echo $id;?></td>
<td class='text'><?php echo $id;?></td>
<td class='text-c-name' title='<?php echo $sonarqube->name;?>'><?php echo $sonarqube->name;?></td>
<td class='text' title='<?php echo $sonarqube->url;?>'><?php echo html::a($sonarqube->url, $sonarqube->url, '_blank');?></td>
<td class='c-actions text-left'>
<td class='c-actions'>
<?php
common::printLink('sonarqube', 'browseProject', "sonarqubeID=$id", "<i class='icon icon-list-box'></i> ", '',"title='{$lang->sonarqube->browseProject}' class='btn btn-primary'");
common::printLink('sonarqube', 'edit', "sonarqubeID=$id", "<i class='icon icon-edit'></i> ", '',"title='{$lang->sonarqube->edit}' class='btn btn-primary'");
+1 -2
View File
@@ -37,8 +37,7 @@
<td><?php echo html::password('password', '', "class='form-control'");?></td>
</tr>
<tr>
<th></th>
<td class='text-center form-actions'>
<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"');?>
</td>
+1 -2
View File
@@ -37,8 +37,7 @@
<td><?php echo html::password('password', isset($sonarqube->password) ? $sonarqube->password : '', "class='form-control'");?></td>
</tr>
<tr>
<th></th>
<td class='text-center form-actions'>
<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"');?>
</td>