* Optimize page style.

This commit is contained in:
caoyanyi
2021-12-09 06:04:33 +00:00
parent a8abcb6c9f
commit f7e55495be
4 changed files with 10 additions and 3 deletions
+2
View File
@@ -727,6 +727,7 @@ class gitlab extends control
{
$keyword = fixer::input('post')->setDefault('keyword', '')->get('keyword');
$branches = $this->gitlab->apiGetBranchPrivs($gitlabID, $projectID, $keyword, $orderBy);
$project = $this->gitlab->apiGetSingleProject($gitlabID, $projectID);
/* Pager. */
$this->app->loadClass('pager', $static = true);
@@ -740,6 +741,7 @@ class gitlab extends control
$this->view->levelLang = $this->lang->gitlab->branch->branchCreationLevelList;
$this->view->gitlabID = $gitlabID;
$this->view->projectID = $projectID;
$this->view->project = $project;
$this->view->orderBy = $orderBy;
$this->view->branchList = empty($branchList) ? $branchList: $branchList[$pageID - 1];
$this->display();
+2
View File
@@ -0,0 +1,2 @@
.text-c-counts > span {margin-left: 5px;}
#mainMenu .pull-left {margin-right: 15px;}
+1 -1
View File
@@ -2311,7 +2311,7 @@ class gitlabModel extends model
$newBranches = array();
foreach($branches as $branch)
{
if(empty($keyword) || stristr($branch->name, $keyword)) $newBranches[$branch->$order[0]] = $branch;
if(empty($keyword) || stristr($branch->name, $keyword)) $newBranches[$branch->{$order[0]}] = $branch;
}
if($order[1] == 'asc') ksort($newBranches);
+5 -2
View File
@@ -15,6 +15,9 @@
<div class='pull-left'>
<?php echo html::a($this->createLink('gitlab', 'browseProject', "gitlabID=$gitlabID"), "<i class='icon icon-back icon-sm'></i> " . $lang->goback, '', "class='btn btn-secondary'");?>
</div>
<div id="sidebarHeader">
<div class="title"><?php echo $project->name_with_namespace; ?></div>
</div>
<div class="btn-toolbar pull-left">
<div>
<form id='branchPrivForm' method='post'>
@@ -51,8 +54,8 @@
</thead>
<tbody>
<?php foreach ($branchList as $id => $branch): ?>
<?php $branch->merge_access_level = count($branch->merge_access_levels) > 1 ? 40 : $branch->merge_access_levels[0]->access_level; ?>
<?php $branch->push_access_level = count($branch->push_access_levels) > 1 ? 40 : $branch->push_access_levels[0]->access_level; ?>
<?php $branch->merge_access_level = $this->gitlab->checkAccessLevel($branch->merge_access_levels); ?>
<?php $branch->push_access_level = $this->gitlab->checkAccessLevel($branch->push_access_levels); ?>
<tr class='text'>
<td class='text-c-name' title='<?php echo $branch->name;?>'><?php echo $branch->name;?></td>
<td class-'text' title="<?php echo $levelLang[$branch->merge_access_level];?>"><?php echo $levelLang[$branch->merge_access_level];?></td>