* Finish task #46526.
This commit is contained in:
@@ -778,6 +778,28 @@ class doc extends control
|
||||
$this->doc->saveDraft($docID);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param int $doclibID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetWhitelist($doclibID)
|
||||
{
|
||||
$account = $this->app->user->account;
|
||||
$doclib = $this->doc->getById($doclibID);
|
||||
|
||||
if($doclib->acl != 'custom' and !empty($doclib->project))
|
||||
{
|
||||
$project = $this->loadModel('project')->getById($doclib->project);
|
||||
$projectTeams = $this->loadModel('user')->getTeamMemberPairs($doclib->project);
|
||||
$stakeholders = $this->loadModel('stakeholder')->getStakeHolderPairs($doclib->project);
|
||||
|
||||
return print(html::select('users[]', $users, $lib->users, "class='form-control chosen' multiple"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show files.
|
||||
*
|
||||
|
||||
@@ -41,6 +41,16 @@ function toggleAcl(acl, type)
|
||||
var libType = $('input[name="type"]:checked').val();
|
||||
var notice = typeof(noticeAcl[libType][acl]) != 'undefined' ? noticeAcl[libType][acl] : '';
|
||||
$('#noticeAcl').html(notice);
|
||||
|
||||
if(typeof(doclibID) != 'undefined')
|
||||
{
|
||||
link = createLink('doc', 'ajaxGetWhitelist', 'doclibID=' + doclibID);
|
||||
$.get(link, function(users)
|
||||
{
|
||||
$('#users').replaceWith(users);
|
||||
$('#users' + '_chosen').remove();
|
||||
})
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -206,7 +206,9 @@ $lang->doc->selectLibType = 'Please select a type of doc library.';
|
||||
$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product can access it.';
|
||||
$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project can access it.';
|
||||
$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['project']['open'] = 'Users who can access the selected project can access it.';
|
||||
$lang->doc->noticeAcl['lib']['project']['private'] = 'Users who can access the selected project or users in the whiltelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users in the whiltelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['execution']['default'] = "Users who can access the selected {$lang->executionCommon} can access it.";
|
||||
$lang->doc->noticeAcl['lib']['execution']['custom'] = "Users who can access the selected {$lang->executionCommon} or users in the whiltelist can access it.";
|
||||
$lang->doc->noticeAcl['lib']['custom']['open'] = 'All users can access it.';
|
||||
|
||||
@@ -206,7 +206,9 @@ $lang->doc->selectLibType = '请选择文档库类型';
|
||||
$lang->doc->noticeAcl['lib']['product']['default'] = '有所选产品访问权限的用户可以访问。';
|
||||
$lang->doc->noticeAcl['lib']['product']['custom'] = '有所选产品访问权限或白名单里的用户可以访问。';
|
||||
$lang->doc->noticeAcl['lib']['project']['default'] = "有所选项目访问权限的用户可以访问。";
|
||||
$lang->doc->noticeAcl['lib']['project']['custom'] = "有所选项目访问权限或白名单里的用户可以访问。";
|
||||
$lang->doc->noticeAcl['lib']['project']['open'] = "有所选项目访问权限的用户可以访问。";
|
||||
$lang->doc->noticeAcl['lib']['project']['private'] = "有所选项目访问权限或白名单里的用户可以访问。";
|
||||
$lang->doc->noticeAcl['lib']['project']['custom'] = "白名单的用户可以访问。";
|
||||
$lang->doc->noticeAcl['lib']['execution']['default'] = "有所选{$lang->executionCommon}访问权限的用户可以访问。";
|
||||
$lang->doc->noticeAcl['lib']['execution']['custom'] = "有所选{$lang->executionCommon}访问权限或白名单里的用户可以访问。";
|
||||
$lang->doc->noticeAcl['lib']['custom']['open'] = '所有人都可以访问。';
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/chosen.html.php';?>
|
||||
<?php js::set('doclibID', $lib->id);?>
|
||||
<?php if($lib->type == 'product'):?>
|
||||
<style> .chosen-container .chosen-results {max-height: 180px;}</style>
|
||||
<?php else:?>
|
||||
|
||||
Reference in New Issue
Block a user