* Finish task#45500

This commit is contained in:
zenggang
2021-12-07 08:15:04 +00:00
parent 3d1d34e383
commit b4685be3de
6 changed files with 125 additions and 0 deletions
+64
View File
@@ -0,0 +1,64 @@
<?php
/**
* The browse view file of gitlab module of ZenTaoPMS.
*
* @copyright Copyright 2009-2017 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Gang Liu <liugang@cnezsoft.com>
* @package gitlab
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('vars', "keyword=%s&orderBy=id_desc&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID=1")?>
<?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');?>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::hasPriv('gitlab', 'createBranch')) common::printLink('gitlab', 'createBranch', "gitlabID=$gitlabID", "<i class='icon icon-plus'></i> " . $lang->gitlab->createBranch, '', "class='btn btn-primary'");?>
</div>
</div>
<?php if(empty($gitlabBranchList)):?>
<div class="table-empty-tip">
<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 endif;?>
</p>
</div>
<?php else:?>
<div id='mainContent' class='main-row'>
<form class='main-table' id='ajaxForm' method='post'>
<table id='gitlabBranchList' class='table has-sort-head table-fixed'>
<?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->branchName);?></th>
<th class='text-left'><?php echo $lang->gitlab->branchLastCommitter;?></th>
<th class='text-left'><?php common::printOrderLink('lastCommittedDate', $orderBy, $vars, $lang->gitlab->branchLastCommittedDate);?></th>
<th class='c-actions-4'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach ($gitlabBranchList as $id => $gitlabBranch): ?>
<tr class='text'>
<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>
</table>
<?php if($gitlabBranchList):?>
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
<?php endif;?>
</form>
</div>
<?php endif;?>
<?php include '../../common/view/footer.html.php';?>
@@ -67,6 +67,7 @@
<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'>
<?php
common::printLink('gitlab', 'browseBranch', "gitlabID=$gitlabID&projectID=$gitlabProject->id", "<i class='icon icon-treemap'></i> ", '', "title={$lang->gitlab->browseBranch} class='btn btn-primary'");
common::printLink('gitlab', 'editProject', "gitlabID=$gitlabID&projectID=$gitlabProject->id", "<i class='icon icon-edit'></i> ", '', "title={$lang->gitlab->project->edit} class='btn btn-primary'");
if(common::hasPriv('gitlab', 'delete')) echo html::a($this->createLink('gitlab', 'deleteProject', "gitlabID=$gitlabID&projectID=$gitlabProject->id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->gitlab->deleteProject}' class='btn'");
?>