* Adjust gitlab code.
This commit is contained in:
@@ -33,7 +33,6 @@ class gitlab extends control
|
||||
foreach($gitlabList as $gitlab)
|
||||
{
|
||||
$token = $this->gitlab->apiGetCurrentUser($gitlab->url,$gitlab->token);
|
||||
|
||||
$gitlab->isAdminToken = isset($token->is_admin) ? $token->is_admin : 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<?php if(common::hasPriv('gitlab', 'create')) common::printLink('gitlab', 'create', "", "<i class='icon icon-plus'></i> " . $lang->gitlab->create, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!empty($gitlabList)):?>
|
||||
<?php if(empty($gitlabList)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->noData;?></span>
|
||||
@@ -43,13 +43,12 @@
|
||||
<tr>
|
||||
<td class='text-center'><?php echo $id;?></td>
|
||||
<td class='text c-name' title='<?php echo $gitlab->name;?>'><?php echo $gitlab->name;?></td>
|
||||
<td class='text' title='<?php if(!empty($gitlab->isAdminToken)) {echo $gitlab->url;} else {echo $lang->gitlab->tokenLimit;}?>'><?php echo $gitlab->url;?></td>
|
||||
<td class='c-actions text-left'>
|
||||
<td class='text' title='<?php echo $gitlab->url;?>'><?php echo $gitlab->url;?></td>
|
||||
<td class='c-actions text-left' title='<?php if(empty($gitlab->isAdminToken)) {echo $lang->gitlab->tokenLimit;} else {echo $lang->gitlab->tokenLimit;}?>'>
|
||||
<?php
|
||||
$disabled = !empty($gitlab->isAdminToken) ? '' : 'disabled';
|
||||
$bindUserLang = !empty($gitlab->isAdminToken) ? $lang->gitlab->bindUser : $lang->gitlab->tokenError;
|
||||
$disabled = !empty($gitlab->isAdminToken) ? '' : 'disabled';
|
||||
common::printLink('gitlab', 'edit', "gitlabID=$id", "<i class='icon icon-edit'></i> ", '',"title={$lang->gitlab->edit} class='btn btn-primary'");
|
||||
common::printLink('gitlab', 'bindUser', "id=$id", "<i class='icon icon-group'></i> ", '', "title={$bindUserLang} class='btn btn-primary {$disabled}' ,'disabled'");
|
||||
common::printLink('gitlab', 'bindUser', "id=$id", "<i class='icon icon-group'></i> ", '', "title={$lang->gitlab->bindUser} class='btn btn-primary {$disabled}' ,'disabled'");
|
||||
if(common::hasPriv('gitlab', 'delete')) echo html::a($this->createLink('gitlab', 'delete', "gitlabID=$id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->gitlab->delete}' class='btn'");
|
||||
?>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user