* Project add whitelist function.
This commit is contained in:
@@ -74,9 +74,10 @@ $lang->project->menuOrder[25] = 'story';
|
||||
$lang->project->menuOrder[30] = 'qa';
|
||||
$lang->project->menuOrder[35] = 'doc';
|
||||
$lang->project->menuOrder[40] = 'team';
|
||||
$lang->project->menuOrder[45] = 'action';
|
||||
$lang->project->menuOrder[50] = 'product';
|
||||
$lang->project->menuOrder[55] = 'view';
|
||||
$lang->project->menuOrder[45] = 'whitelist';
|
||||
$lang->project->menuOrder[50] = 'action';
|
||||
$lang->project->menuOrder[55] = 'product';
|
||||
$lang->project->menuOrder[60] = 'view';
|
||||
$lang->task->menuOrder = $lang->project->menuOrder;
|
||||
$lang->build->menuOrder = $lang->project->menuOrder;
|
||||
|
||||
|
||||
@@ -314,17 +314,18 @@ $lang->story->menu = $lang->product->menu;
|
||||
$lang->project = new stdclass();
|
||||
$lang->project->menu = new stdclass();
|
||||
|
||||
$lang->project->menu->task = array('link' => '任务|project|task|projectID=%s', 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
|
||||
$lang->project->menu->kanban = array('link' => '看板|project|kanban|projectID=%s');
|
||||
$lang->project->menu->burn = array('link' => '燃尽图|project|burn|projectID=%s');
|
||||
$lang->project->menu->list = array('link' => '更多|project|grouptask|projectID=%s', 'alias' => 'grouptask,tree', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->project->menu->story = array('link' => "{$lang->storyCommon}|project|story|projectID=%s", 'subModule' => 'story', 'alias' => 'linkstory,storykanban');
|
||||
$lang->project->menu->qa = array('link' => '测试|project|bug|projectID=%s', 'subModule' => 'bug,build,testtask', 'alias' => 'build,testtask', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->project->menu->doc = array('link' => '文档|doc|objectLibs|type=project&objectID=%s&from=project', 'subModule' => 'doc');
|
||||
$lang->project->menu->action = array('link' => '动态|project|dynamic|projectID=%s', 'subModule' => 'dynamic', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->project->menu->product = $lang->productCommon . '|project|manageproducts|projectID=%s';
|
||||
$lang->project->menu->team = array('link' => '团队|project|team|projectID=%s', 'alias' => 'managemembers');
|
||||
$lang->project->menu->view = array('link' => '概况|project|view|projectID=%s', 'alias' => 'edit,start,suspend,putoff,close');
|
||||
$lang->project->menu->task = array('link' => '任务|project|task|projectID=%s', 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
|
||||
$lang->project->menu->kanban = array('link' => '看板|project|kanban|projectID=%s');
|
||||
$lang->project->menu->burn = array('link' => '燃尽图|project|burn|projectID=%s');
|
||||
$lang->project->menu->list = array('link' => '更多|project|grouptask|projectID=%s', 'alias' => 'grouptask,tree', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->project->menu->story = array('link' => "{$lang->storyCommon}|project|story|projectID=%s", 'subModule' => 'story', 'alias' => 'linkstory,storykanban');
|
||||
$lang->project->menu->qa = array('link' => '测试|project|bug|projectID=%s', 'subModule' => 'bug,build,testtask', 'alias' => 'build,testtask', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->project->menu->doc = array('link' => '文档|doc|objectLibs|type=project&objectID=%s&from=project', 'subModule' => 'doc');
|
||||
$lang->project->menu->action = array('link' => '动态|project|dynamic|projectID=%s', 'subModule' => 'dynamic', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->project->menu->product = $lang->productCommon . '|project|manageproducts|projectID=%s';
|
||||
$lang->project->menu->team = array('link' => '团队|project|team|projectID=%s', 'alias' => 'managemembers');
|
||||
$lang->project->menu->view = array('link' => '概况|project|view|projectID=%s', 'alias' => 'edit,start,suspend,putoff,close');
|
||||
$lang->project->menu->whitelist = array('link' => '白名单|project|whitelist|projectID=%s', 'alias' => 'addwhitelist', 'subModule' => 'personnel');
|
||||
|
||||
$lang->project->subMenu = new stdclass();
|
||||
$lang->project->subMenu->list = new stdclass();
|
||||
|
||||
@@ -530,7 +530,6 @@ class commonModel extends model
|
||||
if(common::hasPriv($currentModule, $currentMethod)) echo "<li class=$active>" . html::a(helper::createLink($currentModule, $currentMethod, $vars), $title) . '</li>';
|
||||
if(($lastMenu != $nav) && strpos($lang->dividerMenu, ",{$group},") !== false) echo "<li class='divider'></li>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -793,7 +793,7 @@ class product extends control
|
||||
* Get white list personnel.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $branch
|
||||
* @param string $module
|
||||
* @param string $browsetype
|
||||
* @param string $orderby
|
||||
* @param int $recTotal
|
||||
@@ -802,13 +802,13 @@ class product extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function whitelist($productID = 0, $branch = '', $browseType = 'all', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
public function whitelist($productID = 0, $module = 'product', $browseType = 'all', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, '', $branch);
|
||||
$this->product->setMenu($this->products, $productID, $branch);
|
||||
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, '', 0);
|
||||
$this->product->setMenu($this->products, $productID, 0);
|
||||
|
||||
echo $this->fetch('personnel', 'whitelist', "objectID=$productID&module=product");
|
||||
echo $this->fetch('personnel', 'whitelist', "objectID=$productID&module=product&browseType=$browseType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2416,6 +2416,62 @@ class project extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get white list personnel.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $module
|
||||
* @param string $browsetype
|
||||
* @param string $orderby
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function whitelist($projectID = 0, $module='project', $browseType = 'all', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* use first project if projectID does not exist. */
|
||||
if(!isset($this->projects[$projectID])) $projectID = key($this->projects);
|
||||
|
||||
/* Set the menu. If the projectID = 0, use the indexMenu instead. */
|
||||
$this->project->setMenu($this->projects, $projectID);
|
||||
|
||||
echo $this->fetch('personnel', 'whitelist', "objectID=$projectID&module=$module&browseType=$browseType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
}
|
||||
|
||||
/**
|
||||
* Adding users to the white list.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $deptID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function addWhitelist($projectID = 0, $deptID = 0)
|
||||
{
|
||||
/* use first project if projectID does not exist. */
|
||||
if(!isset($this->projects[$projectID])) $projectID = key($this->projects);
|
||||
|
||||
/* Set the menu. If the projectID = 0, use the indexMenu instead. */
|
||||
$this->project->setMenu($this->projects, $projectID);
|
||||
|
||||
echo $this->fetch('personnel', 'addWhitelist', "objectID=$projectID&dept=$deptID&objectType=sprint&module=project");
|
||||
}
|
||||
|
||||
/*
|
||||
* Removing users from the white list.
|
||||
*
|
||||
* @param int $id
|
||||
* @param string $confirm
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unbindWhielist($id = 0, $confirm = 'no')
|
||||
{
|
||||
echo $this->fetch('personnel', 'unbindWhielist', "id=$id&confirm=$confirm");
|
||||
}
|
||||
|
||||
/**
|
||||
* Export project.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user