+ complete task #343:optimize group users.
This commit is contained in:
@@ -122,8 +122,8 @@ class group extends control
|
||||
}
|
||||
$group = $this->group->getById($groupID);
|
||||
$groupUsers = $this->group->getUserPairs($groupID);
|
||||
$groupUsers = join(',', array_keys($groupUsers));
|
||||
$allUsers = $this->user->getPairs('noclosed|noempty|noletter');
|
||||
$otherUsers = array_diff_assoc($allUsers, $groupUsers);
|
||||
|
||||
$header['title'] = $this->lang->company->common . $this->lang->colon . $group->name . $this->lang->colon . $this->lang->group->manageMember;
|
||||
$position[] = $group->name . $this->lang->colon . $this->lang->group->manageMember;
|
||||
@@ -132,7 +132,7 @@ class group extends control
|
||||
$this->view->position = $position;
|
||||
$this->view->group = $group;
|
||||
$this->view->groupUsers = $groupUsers;
|
||||
$this->view->allUsers = $allUsers;
|
||||
$this->view->otherUsers = $otherUsers;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ $lang->group->method = 'Method';
|
||||
$lang->group->priv = 'Priviledge';
|
||||
$lang->group->checkall = 'Select all';
|
||||
$lang->group->option = 'Option';
|
||||
$lang->group->inside = 'Group users';
|
||||
$lang->group->outside = 'Other users';
|
||||
|
||||
$lang->group->copyOptions['copyPriv'] = 'Copy priviledge';
|
||||
$lang->group->copyOptions['copyUser'] = 'Copy user';
|
||||
|
||||
@@ -31,6 +31,8 @@ $lang->group->method = '方法';
|
||||
$lang->group->priv = '权限';
|
||||
$lang->group->checkall = '全选';
|
||||
$lang->group->option = '选项';
|
||||
$lang->group->inside = '组内用户';
|
||||
$lang->group->outside = '组外用户';
|
||||
|
||||
$lang->group->copyOptions['copyPriv'] = '复制权限';
|
||||
$lang->group->copyOptions['copyUser'] = '复制用户';
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
*/
|
||||
?>
|
||||
<script language="Javascript">
|
||||
function checkall(checker)
|
||||
function checkall(checker, id)
|
||||
{
|
||||
$('input').each(function()
|
||||
$('#' + id + ' input').each(function()
|
||||
{
|
||||
$(this).attr("checked", checker.checked)
|
||||
});
|
||||
@@ -26,8 +26,22 @@ function checkall(checker)
|
||||
<table align='center' class='table-1 a-left'>
|
||||
<caption><?php echo $group->name . $lang->colon . $lang->group->manageMember;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->checkall;?><input type='checkbox' onclick='checkall(this);'></th>
|
||||
<td id='users'><?php foreach($allUsers as $account => $realname) echo '<span>' . html::checkbox('members', array($account => $realname), $groupUsers) . '</span>';?></td>
|
||||
<th class='rowhead'><?php echo $lang->group->inside;?><input type='checkbox' onclick='checkall(this, "group");'></th>
|
||||
<td id='group' class='f-14px pv-10px'><?php $i = 1;?>
|
||||
<?php foreach($groupUsers as $account => $realname):?>
|
||||
<div class='w-p10 f-left'><?php echo '<span>' . html::checkbox('members', array($account => $realname), $account) . '</span>';?></div>
|
||||
<?php if(($i % 8) == 0) echo "<div class='c-both'></div>"; $i ++;?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->outside;?><input type='checkbox' onclick='checkall(this, "other");'></th>
|
||||
<td id='other' class='f-14px pv-10px'><?php $i = 1;?>
|
||||
<?php foreach($otherUsers as $account => $realname):?>
|
||||
<div class='w-p10 f-left'><?php echo '<span>' . html::checkbox('members', array($account => $realname), '') . '</span>';?></div>
|
||||
<?php if(($i % 8) == 0) echo "<div class='c-both'></div>"; $i ++;?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'></th>
|
||||
|
||||
Reference in New Issue
Block a user