* Add gitlab user avatar

This commit is contained in:
zenggang
2021-11-08 06:25:03 +00:00
parent cc14a18799
commit 7ee8e8dbef
7 changed files with 40 additions and 4 deletions
+2 -2
View File
@@ -49,8 +49,8 @@
$disabled = !empty($gitlab->isAdminToken) ? '' : 'disabled';
common::printLink('gitlab', 'projectBrowse', "gitlabID=$id", "<i class='icon icon-project'></i> ", '',"title={$lang->gitlab->browseProject} class='btn btn-primary'");
common::printLink('gitlab', 'edit', "gitlabID=$id", "<i class='icon icon-edit'></i> ", '',"title={$lang->gitlab->edit} class='btn btn-primary'");
common::printLink('gitlab', 'userBrowse', "gitlabID=$id", "<i class='icon icon-group'></i> ", '', "title={$lang->gitlab->browseUser} class='btn {$disabled}' ,'disabled'");
common::printLink('gitlab', 'bindUser', "id=$id", "<i class='icon icon-group'></i> ", '', "title={$lang->gitlab->bindUser} class='btn {$disabled}' ,'disabled'");
common::printLink('gitlab', 'userBrowse', "gitlabID=$id", "<i class='icon icon-team'></i> ", '', "title={$lang->gitlab->browseUser} class='btn {$disabled}' ,'disabled'");
common::printLink('gitlab', 'bindUser', "id=$id", "<i class='icon icon-link'></i> ", '', "title={$lang->gitlab->bindUser} class='btn {$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>
+14 -2
View File
@@ -18,7 +18,7 @@
<div class='main-header'>
<h2><?php echo $lang->gitlab->user->create;?></h2>
</div>
<form id='gitlabForm' method='post' class='form-ajax'>
<form id='gitlabForm' method='post' class='form-ajax' enctype="multipart/form-data">
<table class='table table-form'>
<tr>
<th><?php echo $lang->gitlab->user->name;?></th>
@@ -68,6 +68,18 @@
<th><?php echo $lang->gitlab->user->bind;?></th>
<td><?php echo html::select('bind', $userPairs, '', "class='form-control chosen'");?></td>
</tr>
<?php if(function_exists('curl_file_create')):?>
<tr>
<th><?php echo $lang->gitlab->user->avatar;?></th>
<td>
<div id="avatarUpload" class="text-center">
<?php echo html::avatar(array('avatar'=>' ', 'account'=>''), 50); ?>
<input type="file" name="avatar" id="files" class="form-control hidden">
<?php echo html::a('javascript:void(0);', '<i class="icon icon-pencil icon-2x"></i>', '', "class='btn-avatar' id='avatarUploadBtn' data-toggle='tooltip' data-container='body' data-placement='bottom' title='{$lang->gitlab->user->avatar}'");?>
</div>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->gitlab->user->skype;?></th>
<td><?php echo html::input('skype', '', "class='form-control' placeholder='{$lang->gitlab->user->skype}'");?></td>
@@ -92,7 +104,7 @@
<th></th>
<td class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php if(!isonlybody()) echo html::a(inlink('projectbrowse', "gitlabID=$gitlabID"), $lang->goback, '', 'class="btn btn-wide"');?>
<?php if(!isonlybody()) echo html::a(inlink('userbrowse', "gitlabID=$gitlabID"), $lang->goback, '', 'class="btn btn-wide"');?>
</td>
</tr>
</table>