* Optimize pages.

This commit is contained in:
caoyanyi
2022-07-22 13:35:54 +08:00
parent c14a618dec
commit 94a3dea3f7
35 changed files with 51 additions and 66 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>
+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>
+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');
+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;}
+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;}
+1
View File
@@ -190,3 +190,4 @@ h3 {font-size: 16px;}
.header-btn .btn > .text {text-overflow: unset !important;}
#repoPageSize {right: 90px;}
.dropdown-menu li > a.selected {color: #3123ae !important; background: #f2eafc !important; line-height: 20px; border-radius: 5px;}
+3 -1
View File
@@ -9,7 +9,7 @@ table.diff {margin-bottom: 0px;}
.diff .line-new, .diff .line-new {background: #CFC;}
.diff .line-old, .diff .line-old {background: #FCC;}
.diff .line-all, .diff .line-all {background: #FFF;}
.diff .w-num {width: 25px; border-right: 1px solid #E4E4E4; color: #999; border-left: 1px solid #E4E4E4; color: #999; font-weight: normal;}
.diff .w-num {width: 25px; border-right: 1px solid #E4E4E4; color: #999; border-left: 1px solid #E4E4E4; color: #999; font-weight: normal; line-height: 2.5;}
.repoCode .diff tr .comment-btn .icon-wrapper {left: -23px;}
.repoCode .diff tr.over td.line-all, .repoCode .diff tr.over td.line-all {background: #f8eec7;}
@@ -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>
+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>