* Adjust bind user page style to be consistent with gitlab page.
This commit is contained in:
@@ -175,10 +175,11 @@ class gitea extends control
|
||||
* Bind gitea user to zentao users.
|
||||
*
|
||||
* @param int $giteaID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function bindUser($giteaID)
|
||||
public function bindUser($giteaID, $type = 'all')
|
||||
{
|
||||
$zentaoUsers = $this->dao->select('account,email,realname')->from(TABLE_USER)->fetchAll('account');
|
||||
$userPairs = $this->loadModel('user')->getPairs('noclosed|noletter');
|
||||
@@ -190,11 +191,42 @@ class gitea extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->server->http_referer));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->gitea->bindUser;
|
||||
$this->view->userPairs = $userPairs;
|
||||
$this->view->giteaUsers = $this->gitea->apiGetUsers($giteaID);
|
||||
$this->view->bindedUsers = $this->gitea->getUserAccountIdPairs($giteaID);
|
||||
$this->view->matchedResult = $this->gitea->getMatchedUsers($giteaID, $this->view->giteaUsers, $zentaoUsers);
|
||||
$giteaUsers = $this->gitea->apiGetUsers($giteaID);
|
||||
$bindedUsers = $this->gitea->getUserAccountIdPairs($giteaID);
|
||||
$matchedResult = $this->gitea->getMatchedUsers($giteaID, $giteaUsers, $zentaoUsers);
|
||||
|
||||
foreach($giteaUsers as $userID => &$user)
|
||||
{
|
||||
$user->binded = 0;
|
||||
$user->zentaoUsers = array('' => '');
|
||||
$user->zentaoAccount = isset($matchedResult[$user->id]) ? $matchedResult[$user->id]->zentaoAccount : '';
|
||||
if($user->zentaoAccount)
|
||||
{
|
||||
$user->zentaoUsers += array($user->zentaoAccount => zget($userPairs, $user->zentaoAccount));
|
||||
if(isset($bindedUsers[$user->zentaoAccount]) && $bindedUsers[$user->zentaoAccount] == $user->id)
|
||||
{
|
||||
$user->binded = 1;
|
||||
if(!isset($bindedUsers[$user->zentaoAccount])) $user->binded = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if($type == 'notBind' && $user->binded > 0)
|
||||
{
|
||||
unset($giteaUsers[$userID]);
|
||||
}
|
||||
elseif($type == 'binded' && $user->binded == 0)
|
||||
{
|
||||
unset($giteaUsers[$userID]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->gitea->bindUser;
|
||||
$this->view->userPairs = array('' => '') + $userPairs;
|
||||
$this->view->giteaUsers = $giteaUsers;
|
||||
$this->view->giteaID = $giteaID;
|
||||
$this->view->type = $type;
|
||||
$this->view->zentaoUsers = $zentaoUsers;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('.gitlab-user-bind').change(function()
|
||||
{
|
||||
var user = zentaoUsers[$(this).val()];
|
||||
if(user !== undefined)
|
||||
{
|
||||
$(this).parent().parent().find('.email').text(user.email)
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.zentao-users .chosen-container', function()
|
||||
{
|
||||
var $obj = $(this).prev('select');
|
||||
var value = $obj.val();
|
||||
if($obj.hasClass('filled')) return false;
|
||||
|
||||
$obj.empty();
|
||||
$obj.append($('#userList').html());
|
||||
$obj.val(value);
|
||||
$obj.addClass('filled');
|
||||
$obj.trigger("chosen:updated");
|
||||
})
|
||||
});
|
||||
@@ -342,8 +342,8 @@ class giteaModel extends model
|
||||
{
|
||||
if(isset($bindedUsers[$giteaUser->account]))
|
||||
{
|
||||
$giteaUser->zentaoAccount = $bindedUsers[$giteaUser->account];
|
||||
$matchedUsers[] = $giteaUser;
|
||||
$giteaUser->zentaoAccount = $bindedUsers[$giteaUser->account];
|
||||
$matchedUsers[$giteaUser->id] = $giteaUser;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -355,8 +355,8 @@ class giteaModel extends model
|
||||
$matchedZentaoUsers = array_unique($matchedZentaoUsers);
|
||||
if(count($matchedZentaoUsers) == 1)
|
||||
{
|
||||
$giteaUser->zentaoAccount = current($matchedZentaoUsers);
|
||||
$matchedUsers[] = $giteaUser;
|
||||
$giteaUser->zentaoAccount = current($matchedZentaoUsers);
|
||||
$matchedUsers[$giteaUser->id] = $giteaUser;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,60 +11,66 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php $browseLink = $this->createLink('gitea', 'browse', ""); ?>
|
||||
<?php js::set('zentaoUsers', $zentaoUsers);?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->gitea->bindUser;?></h2>
|
||||
<div class="main-header gitea-bind">
|
||||
<?php
|
||||
echo html::linkButton('<i class="icon icon-back icon-sm"></i> ' . $lang->goback, $browseLink, 'self', "data-app='{$app->tab}'", 'btn btn-secondary');
|
||||
|
||||
$allLink = $this->createLink('gitea', 'binduser', "giteaID={$giteaID}&type=all");
|
||||
$bindedLink = $this->createLink('gitea', 'binduser', "giteaID={$giteaID}&type=binded");
|
||||
$notBindLink = $this->createLink('gitea', 'binduser', "giteaID={$giteaID}&type=notBind");
|
||||
if($type == 'all')
|
||||
{
|
||||
echo html::linkButton('' . $lang->gitea->all . "<span class='gitea-bind-all'>" . count($giteaUsers) . "</span>", $allLink, 'self', "data-app='{$app->tab}'", 'btn btn-info active');
|
||||
echo html::linkButton('' . $lang->gitea->notBind, $notBindLink, 'self', "data-app='{$app->tab}'", 'btn btn-info');
|
||||
echo html::linkButton('' . $lang->gitea->binded, $bindedLink, 'self', "data-app='{$app->tab}'", 'btn btn-info');
|
||||
}
|
||||
else if($type == 'binded')
|
||||
{
|
||||
echo html::linkButton('' . $lang->gitea->all, $allLink, 'self', "data-app='{$app->tab}'", 'btn btn-info');
|
||||
echo html::linkButton('' . $lang->gitea->notBind, $notBindLink, 'self', "data-app='{$app->tab}'", 'btn btn-info');
|
||||
echo html::linkButton('' . $lang->gitea->binded . "<span class='gitea-bind-all'>" . count($giteaUsers) . "</span>", $bindedLink, 'self', "data-app='{$app->tab}'", 'btn btn-info active');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::linkButton('' . $lang->gitea->all, $allLink, 'self', "data-app='{$app->tab}'", 'btn btn-info');
|
||||
echo html::linkButton('' . $lang->gitea->notBind . "<span class='gitea-bind-all'>" . count($giteaUsers) . "</span>", $notBindLink, 'self', "data-app='{$app->tab}'", 'btn btn-info active');
|
||||
echo html::linkButton('' . $lang->gitea->binded, $bindedLink, 'self', "data-app='{$app->tab}'", 'btn btn-info');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<form method='post' class='load-indicator main-form form-ajax' enctype='multipart/form-data'>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless w-800px">
|
||||
<table class="table table-borderless">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-60px'><?php echo $lang->gitea->giteaAvatar;?></th>
|
||||
<th><?php echo $lang->gitea->giteaAccount;?></th>
|
||||
<th><?php echo $lang->gitea->giteaEmail;?></th>
|
||||
<th class='w-150px'><?php echo $lang->gitea->zentaoAccount;?></th>
|
||||
<th><?php echo $lang->gitea->zentaoEmail;?></th>
|
||||
<th class="w-400px"><?php echo $lang->gitea->zentaoAccount;?> <span class="gitea-account-desc"><?php echo $lang->gitea->accountDesc;?></span></th>
|
||||
<th><?php echo $lang->gitea->bindingStatus;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($giteaUsers as $giteaUser):?>
|
||||
<?php if(isset($giteaUser->zentaoAccount)) continue;?>
|
||||
<?php echo html::hidden("giteaUserNames[$giteaUser->account]", $giteaUser->realname);?>
|
||||
<?php echo html::hidden("giteaUserNames[$giteaUser->id]", $giteaUser->realname);?>
|
||||
<tr>
|
||||
<td><?php echo html::image($giteaUser->avatar, "height=40");?></td>
|
||||
<td class='text-left'>
|
||||
<strong><?php echo $giteaUser->realname;?></strong>
|
||||
<br>
|
||||
<?php echo $giteaUser->account;?>
|
||||
<td>
|
||||
<?php echo html::image($giteaUser->avatar, "height=20 width=20 class='img-circle'");?>
|
||||
<?php echo $giteaUser->realname . '@' . $giteaUser->account;?>
|
||||
</td>
|
||||
<td><?php echo $giteaUser->email;?></td>
|
||||
<td><?php echo html::select("zentaoUsers[$giteaUser->account]", $userPairs, '', "class='form-control select chosen'" );?></td>
|
||||
<td><?php echo $lang->gitea->notBind;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php foreach($giteaUsers as $giteaUser):?>
|
||||
<?php if(!isset($giteaUser->zentaoAccount)) continue;?>
|
||||
<?php echo html::hidden("giteaUserNames[$giteaUser->account]", $giteaUser->realname);?>
|
||||
<tr>
|
||||
<td><?php echo html::image($giteaUser->avatar, "height=40");?></td>
|
||||
<td class="email"><?php echo !empty($giteaUser->zentaoAccount) ? $zentaoUsers[$giteaUser->zentaoAccount]->email : '';?></td>
|
||||
<td class='zentao-users'><?php echo html::select("zentaoUsers[$giteaUser->id]", $giteaUser->zentaoUsers, $giteaUser->zentaoAccount, "class='form-control select chosen gitea-user-bind'" );?></td>
|
||||
<td>
|
||||
<strong><?php echo $giteaUser->realname;?></strong>
|
||||
<br>
|
||||
<?php echo $giteaUser->account;?>
|
||||
</td>
|
||||
<td><?php echo $giteaUser->email;?></td>
|
||||
<td><?php echo html::select("zentaoUsers[$giteaUser->account]", $userPairs, $giteaUser->zentaoAccount, "class='form-control select chosen'" );?></td>
|
||||
<td>
|
||||
<?php if(isset($bindedUsers[$giteaUser->zentaoAccount])):?>
|
||||
<?php $zentaoAccount = zget($userPairs, $giteaUser->zentaoAccount, '');?>
|
||||
<?php if(!empty($zentaoAccount)):?>
|
||||
<?php if($giteaUser->binded === 1):?>
|
||||
<?php echo $lang->gitea->binded;?>
|
||||
<?php else:?>
|
||||
<?php elseif($giteaUser->binded === 2):?>
|
||||
<?php echo '<span class="text-red">' . $lang->gitea->bindedError . '</span>';?>
|
||||
<?php endif;?>
|
||||
<?php else:?>
|
||||
<?php echo $lang->gitea->notBind;?>
|
||||
<?php echo '<span class="text-red">' . $lang->gitea->notBind . '</span>';?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -82,4 +88,12 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="userList" class="hidden">
|
||||
<?php
|
||||
foreach($userPairs as $account => $realname)
|
||||
{
|
||||
echo "<option value='$account' title='$realname'>$realname</option>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
+38
-6
@@ -174,10 +174,11 @@ class gogs extends control
|
||||
* Bind gogs user to zentao users.
|
||||
*
|
||||
* @param int $gogsID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function bindUser($gogsID)
|
||||
public function bindUser($gogsID, $type = 'all')
|
||||
{
|
||||
$zentaoUsers = $this->dao->select('account,email,realname')->from(TABLE_USER)->fetchAll('account');
|
||||
$userPairs = $this->loadModel('user')->getPairs('noclosed|noletter');
|
||||
@@ -189,11 +190,42 @@ class gogs extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->server->http_referer));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->gogs->bindUser;
|
||||
$this->view->userPairs = $userPairs;
|
||||
$this->view->gogsUsers = $this->gogs->apiGetUsers($gogsID);
|
||||
$this->view->bindedUsers = $this->gogs->getUserAccountIdPairs($gogsID);
|
||||
$this->view->matchedResult = $this->gogs->getMatchedUsers($gogsID, $this->view->gogsUsers, $zentaoUsers);
|
||||
$gogsUsers = $this->gogs->apiGetUsers($gogsID);
|
||||
$bindedUsers = $this->gogs->getUserAccountIdPairs($gogsID);
|
||||
$matchedResult = $this->gogs->getMatchedUsers($gogsID, $gogsUsers, $zentaoUsers);
|
||||
|
||||
foreach($gogsUsers as $userID => &$user)
|
||||
{
|
||||
$user->binded = 0;
|
||||
$user->zentaoUsers = array('' => '');
|
||||
$user->zentaoAccount = isset($matchedResult[$user->id]) ? $matchedResult[$user->id]->zentaoAccount : '';
|
||||
if($user->zentaoAccount)
|
||||
{
|
||||
$user->zentaoUsers += array($user->zentaoAccount => zget($userPairs, $user->zentaoAccount));
|
||||
if(isset($bindedUsers[$user->zentaoAccount]) && $bindedUsers[$user->zentaoAccount] == $user->id)
|
||||
{
|
||||
$user->binded = 1;
|
||||
if(!isset($bindedUsers[$user->zentaoAccount])) $user->binded = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if($type == 'notBind' && $user->binded > 0)
|
||||
{
|
||||
unset($gogsUsers[$userID]);
|
||||
}
|
||||
elseif($type == 'binded' && $user->binded == 0)
|
||||
{
|
||||
unset($gogsUsers[$userID]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->gogs->bindUser;
|
||||
$this->view->userPairs = array('' => '') + $userPairs;
|
||||
$this->view->gogsUsers = $gogsUsers;
|
||||
$this->view->gogsID = $gogsID;
|
||||
$this->view->type = $type;
|
||||
$this->view->zentaoUsers = $zentaoUsers;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('.gitlab-user-bind').change(function()
|
||||
{
|
||||
var user = zentaoUsers[$(this).val()];
|
||||
if(user !== undefined)
|
||||
{
|
||||
$(this).parent().parent().find('.email').text(user.email)
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.zentao-users .chosen-container', function()
|
||||
{
|
||||
var $obj = $(this).prev('select');
|
||||
var value = $obj.val();
|
||||
if($obj.hasClass('filled')) return false;
|
||||
|
||||
$obj.empty();
|
||||
$obj.append($('#userList').html());
|
||||
$obj.val(value);
|
||||
$obj.addClass('filled');
|
||||
$obj.trigger("chosen:updated");
|
||||
})
|
||||
});
|
||||
@@ -298,8 +298,8 @@ class gogsModel extends model
|
||||
{
|
||||
if(isset($bindedUsers[$gogsUser->account]))
|
||||
{
|
||||
$gogsUser->zentaoAccount = $bindedUsers[$gogsUser->account];
|
||||
$matchedUsers[] = $gogsUser;
|
||||
$gogsUser->zentaoAccount = $bindedUsers[$gogsUser->account];
|
||||
$matchedUsers[$giteaUser->id] = $gogsUser;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -311,8 +311,8 @@ class gogsModel extends model
|
||||
$matchedZentaoUsers = array_unique($matchedZentaoUsers);
|
||||
if(count($matchedZentaoUsers) == 1)
|
||||
{
|
||||
$gogsUser->zentaoAccount = current($matchedZentaoUsers);
|
||||
$matchedUsers[] = $gogsUser;
|
||||
$gogsUser->zentaoAccount = current($matchedZentaoUsers);
|
||||
$matchedUsers[$giteaUser->id] = $gogsUser;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,60 +11,66 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php $browseLink = $this->createLink('gogs', 'browse', ""); ?>
|
||||
<?php js::set('zentaoUsers', $zentaoUsers);?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->gogs->bindUser;?></h2>
|
||||
<div class="main-header gogs-bind">
|
||||
<?php
|
||||
echo html::linkButton('<i class="icon icon-back icon-sm"></i> ' . $lang->goback, $browseLink, 'self', "data-app='{$app->tab}'", 'btn btn-secondary');
|
||||
|
||||
$allLink = $this->createLink('gogs', 'binduser', "gogsID={$gogsID}&type=all");
|
||||
$bindedLink = $this->createLink('gogs', 'binduser', "gogsID={$gogsID}&type=binded");
|
||||
$notBindLink = $this->createLink('gogs', 'binduser', "gogsID={$gogsID}&type=notBind");
|
||||
if($type == 'all')
|
||||
{
|
||||
echo html::linkButton('' . $lang->gogs->all . "<span class='gogs-bind-all'>" . count($gogsUsers) . "</span>", $allLink, 'self', "data-app='{$app->tab}'", 'btn btn-info active');
|
||||
echo html::linkButton('' . $lang->gogs->notBind, $notBindLink, 'self', "data-app='{$app->tab}'", 'btn btn-info');
|
||||
echo html::linkButton('' . $lang->gogs->binded, $bindedLink, 'self', "data-app='{$app->tab}'", 'btn btn-info');
|
||||
}
|
||||
else if($type == 'binded')
|
||||
{
|
||||
echo html::linkButton('' . $lang->gogs->all, $allLink, 'self', "data-app='{$app->tab}'", 'btn btn-info');
|
||||
echo html::linkButton('' . $lang->gogs->notBind, $notBindLink, 'self', "data-app='{$app->tab}'", 'btn btn-info');
|
||||
echo html::linkButton('' . $lang->gogs->binded . "<span class='gogs-bind-all'>" . count($gogsUsers) . "</span>", $bindedLink, 'self', "data-app='{$app->tab}'", 'btn btn-info active');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::linkButton('' . $lang->gogs->all, $allLink, 'self', "data-app='{$app->tab}'", 'btn btn-info');
|
||||
echo html::linkButton('' . $lang->gogs->notBind . "<span class='gogs-bind-all'>" . count($gogsUsers) . "</span>", $notBindLink, 'self', "data-app='{$app->tab}'", 'btn btn-info active');
|
||||
echo html::linkButton('' . $lang->gogs->binded, $bindedLink, 'self', "data-app='{$app->tab}'", 'btn btn-info');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<form method='post' class='load-indicator main-form form-ajax' enctype='multipart/form-data'>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless w-800px">
|
||||
<table class="table table-borderless">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-60px'><?php echo $lang->gogs->gogsAvatar;?></th>
|
||||
<th><?php echo $lang->gogs->gogsAccount;?></th>
|
||||
<th><?php echo $lang->gogs->gogsEmail;?></th>
|
||||
<th class='w-150px'><?php echo $lang->gogs->zentaoAccount;?></th>
|
||||
<th><?php echo $lang->gogs->zentaoEmail;?></th>
|
||||
<th class="w-400px"><?php echo $lang->gogs->zentaoAccount;?> <span class="gogs-account-desc"><?php echo $lang->gogs->accountDesc;?></span></th>
|
||||
<th><?php echo $lang->gogs->bindingStatus;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($gogsUsers as $gogsUser):?>
|
||||
<?php if(isset($gogsUser->zentaoAccount)) continue;?>
|
||||
<?php echo html::hidden("gogsUserNames[$gogsUser->account]", $gogsUser->realname);?>
|
||||
<?php echo html::hidden("gogsUserNames[$gogsUser->id]", $gogsUser->realname);?>
|
||||
<tr>
|
||||
<td><?php echo html::image($gogsUser->avatar, "height=40");?></td>
|
||||
<td class='text-left'>
|
||||
<strong><?php echo $gogsUser->realname;?></strong>
|
||||
<br>
|
||||
<?php echo $gogsUser->account;?>
|
||||
<td>
|
||||
<?php echo html::image($gogsUser->avatar, "height=20 width=20 class='img-circle'");?>
|
||||
<?php echo $gogsUser->realname . '@' . $gogsUser->account;?>
|
||||
</td>
|
||||
<td><?php echo $gogsUser->email;?></td>
|
||||
<td><?php echo html::select("zentaoUsers[$gogsUser->account]", $userPairs, '', "class='form-control select chosen'" );?></td>
|
||||
<td><?php echo $lang->gogs->notBind;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php foreach($gogsUsers as $gogsUser):?>
|
||||
<?php if(!isset($gogsUser->zentaoAccount)) continue;?>
|
||||
<?php echo html::hidden("gogsUserNames[$gogsUser->account]", $gogsUser->realname);?>
|
||||
<tr>
|
||||
<td><?php echo html::image($gogsUser->avatar, "height=40");?></td>
|
||||
<td class="email"><?php echo !empty($gogsUser->zentaoAccount) ? $zentaoUsers[$gogsUser->zentaoAccount]->email : '';?></td>
|
||||
<td class='zentao-users'><?php echo html::select("zentaoUsers[$gogsUser->id]", $gogsUser->zentaoUsers, $gogsUser->zentaoAccount, "class='form-control select chosen gogs-user-bind'" );?></td>
|
||||
<td>
|
||||
<strong><?php echo $gogsUser->realname;?></strong>
|
||||
<br>
|
||||
<?php echo $gogsUser->account;?>
|
||||
</td>
|
||||
<td><?php echo $gogsUser->email;?></td>
|
||||
<td><?php echo html::select("zentaoUsers[$gogsUser->account]", $userPairs, $gogsUser->zentaoAccount, "class='form-control select chosen'" );?></td>
|
||||
<td>
|
||||
<?php if(isset($bindedUsers[$gogsUser->zentaoAccount])):?>
|
||||
<?php $zentaoAccount = zget($userPairs, $gogsUser->zentaoAccount, '');?>
|
||||
<?php if(!empty($zentaoAccount)):?>
|
||||
<?php if($gogsUser->binded === 1):?>
|
||||
<?php echo $lang->gogs->binded;?>
|
||||
<?php else:?>
|
||||
<?php elseif($gogsUser->binded === 2):?>
|
||||
<?php echo '<span class="text-red">' . $lang->gogs->bindedError . '</span>';?>
|
||||
<?php endif;?>
|
||||
<?php else:?>
|
||||
<?php echo $lang->gogs->notBind;?>
|
||||
<?php echo '<span class="text-red">' . $lang->gogs->notBind . '</span>';?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -82,4 +88,12 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="userList" class="hidden">
|
||||
<?php
|
||||
foreach($userPairs as $account => $realname)
|
||||
{
|
||||
echo "<option value='$account' title='$realname'>$realname</option>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user