* Code for task#45500

This commit is contained in:
zenggang
2021-12-08 02:39:08 +00:00
parent 0de19226e5
commit 131a9ef165
5 changed files with 12 additions and 10 deletions
+7 -2
View File
@@ -724,7 +724,7 @@ class gitlab extends control
* @access public
* @return void
*/
public function browseBranch($gitlabID, $projectID, $orderBy = 'name_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
public function browseBranch($gitlabID, $projectID, $orderBy = 'name_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->session->set('gitlabBranchList', $this->app->getURI(true));
@@ -742,7 +742,12 @@ class gitlab extends control
/* Data sort. */
list($order, $sort) = explode('_', $orderBy);
array_multisort(array_column($branchList, $order), $sort == 'desc' ? SORT_DESC : SORT_ASC, $branchList);
$orderList = array();
foreach($branchList as $branch)
{
$orderList[] = $branch->$order;
}
array_multisort($orderList, $sort == 'desc' ? SORT_DESC : SORT_ASC, $branchList);
/* Pager. */
$this->app->loadClass('pager', $static = true);
+1 -1
View File
@@ -30,7 +30,7 @@ $lang->gitlab->gitlabProject = "GitLab Project";
$lang->gitlab->browseProject = "GitLab Project List";
$lang->gitlab->browseUser = "User List";
$lang->gitlab->browseGroup = "Group List";
$lang->gitlab->browseBranch = "Branch List";
$lang->gitlab->browseBranch = "GitLab Branch List";
$lang->gitlab->gitlabIssue = "GitLab Issue";
$lang->gitlab->zentaoProduct = 'Zentao Product';
$lang->gitlab->objectType = 'Type'; // task, bug, story
+1 -1
View File
@@ -30,7 +30,7 @@ $lang->gitlab->gitlabProject = "{$lang->gitlab->common}项目";
$lang->gitlab->browseProject = "{$lang->gitlab->common}项目列表";
$lang->gitlab->browseUser = "用户列表";
$lang->gitlab->browseGroup = "群组列表";
$lang->gitlab->browseBranch = "分支列表";
$lang->gitlab->browseBranch = "GitLab分支列表";
$lang->gitlab->gitlabIssue = "{$lang->gitlab->common} issue";
$lang->gitlab->zentaoProduct = '禅道产品';
$lang->gitlab->objectType = '类型'; // task, bug, story
+2 -5
View File
@@ -15,7 +15,7 @@
<?php js::set('gitlabID', $gitlabID)?>
<div id="mainMenu" class="clearfix">
<div class='pull-left'>
<?php echo html::backButton('<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', 'btn btn-secondary');?>
<?php echo html::linkButton('<i class="icon icon-back icon-sm"></i> ' . $lang->goback, $this->createLink('gitlab', 'browseProject', "gitlabID=$gitlabID"), 'self', '','btn btn-secondary');?>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::hasPriv('gitlab', 'createBranch')) common::printLink('gitlab', 'createBranch', "gitlabID=$gitlabID&projectID=$projectID", "<i class='icon icon-plus'></i> " . $lang->gitlab->createBranch, '', "class='btn btn-primary'");?>
@@ -26,7 +26,7 @@
<p>
<span class="text-muted"><?php echo $lang->noData;?></span>
<?php if(empty($keyword) and common::hasPriv('gitlab', 'createBranch')):?>
<?php echo html::a($this->createLink('gitlab', 'createBranch', "gitlabID=$gitlabID"), "<i class='icon icon-plus'></i> " . $lang->gitlab->createBranch, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('gitlab', 'createBranch', "gitlabID=$gitlabID&projectID=$projectID"), "<i class='icon icon-plus'></i> " . $lang->gitlab->createBranch, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
@@ -40,7 +40,6 @@
<th class='c-name text-left'><?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>
<th class='c-actions-4'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
@@ -49,8 +48,6 @@
<td class='text-c-name' title='<?php echo $gitlabBranch->name;?>'><?php echo $gitlabBranch->name;?></td>
<td class='text'><?php echo $gitlabBranch->lastCommitter;?></td>
<td class='text'><?php echo $gitlabBranch->lastCommittedDate?></td>
<td class='c-actions text-left'>
</td>
</tr>
<?php endforeach;?>
</tbody>
+1 -1
View File
@@ -62,7 +62,7 @@
<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-treemap"></i> <?php echo $gitlabProject->forks_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'>