Merge branch 'tsj_task'
This commit is contained in:
+5
-6
@@ -87,8 +87,7 @@ $filter->bug->export = new stdclass();
|
||||
$filter->caselib->create = new stdclass();
|
||||
$filter->doc->create = new stdclass();
|
||||
$filter->doc->browse = new stdclass();
|
||||
$filter->doc->alllibs = new stdclass();
|
||||
$filter->doc->objectlibs = new stdclass();
|
||||
$filter->doc->view = new stdclass();
|
||||
$filter->doc->tablecontents = new stdclass();
|
||||
$filter->doc->productspace = new stdclass();
|
||||
$filter->doc->projectspace = new stdclass();
|
||||
@@ -219,12 +218,12 @@ $filter->caselib->create->cookie['lastLibCaseModule'] = 'int';
|
||||
|
||||
$filter->doc->create->cookie['lastDocModule'] = 'int';
|
||||
$filter->doc->browse->cookie['browseType'] = 'reg::browseType';
|
||||
$filter->doc->alllibs->cookie['browseType'] = 'reg::browseType';
|
||||
$filter->doc->objectlibs->cookie['browseType'] = 'reg::browseType';
|
||||
$filter->doc->objectlibs->cookie['preProductID'] = 'int';
|
||||
$filter->doc->objectlibs->cookie['preBranch'] = 'reg::word';
|
||||
$filter->doc->view->cookie['browseType'] = 'reg::browseType';
|
||||
$filter->doc->view->cookie['preBranch'] = 'reg::word';
|
||||
$filter->doc->default->cookie['from'] = 'code';
|
||||
$filter->doc->default->cookie['product'] = 'int';
|
||||
$filter->doc->default->cookie['preProductID'] = 'int';
|
||||
$filter->doc->default->cookie['lastProject'] = 'int';
|
||||
$filter->doc->showfiles->cookie['docFilesViewType'] = 'code';
|
||||
$filter->doc->tablecontents->cookie['preProductID'] = 'int';
|
||||
$filter->doc->tablecontents->cookie['preBranch'] = 'reg::word';
|
||||
|
||||
@@ -142,6 +142,9 @@ SELECT t1.`group`, t1.`module`, 'productSpace' FROM `zt_grouppriv` AS t1 WHERE t
|
||||
INSERT IGNORE INTO `zt_grouppriv` (`group`, `module`, `method`)
|
||||
SELECT t1.`group`, t1.`module`, 'projectSpace' FROM `zt_grouppriv` AS t1 WHERE t1.`module` = 'doc' AND t1.`method` = 'tableContents';
|
||||
|
||||
INSERT IGNORE INTO `zt_grouppriv` (`group`, `module`, `method`)
|
||||
SELECT t1.`group`, t1.`module`, 'teamSpace' FROM `zt_grouppriv` AS t1 WHERE t1.`module` = 'doc' AND t1.`method` = 'tableContents';
|
||||
|
||||
INSERT IGNORE INTO `zt_grouppriv` (`group`, `module`, `method`)
|
||||
SELECT t1.`group`, t1.`module`, 'addCatalog' FROM `zt_grouppriv` AS t1 WHERE t1.`module` = 'doc' AND t1.`method` = 'catalog';
|
||||
|
||||
|
||||
+11
-11
@@ -2232,7 +2232,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(1,'doc','showFiles'),
|
||||
(1,'doc','productSpace'),
|
||||
(1,'doc','projectSpace'),
|
||||
(1,'doc','tableContents'),
|
||||
(1,'doc','teamSpace'),
|
||||
(1,'execution','activate'),
|
||||
(1,'execution','addWhitelist'),
|
||||
(1,'execution','all'),
|
||||
@@ -2832,7 +2832,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(2,'doc','showFiles'),
|
||||
(2,'doc','productSpace'),
|
||||
(2,'doc','projectSpace'),
|
||||
(2,'doc','tableContents'),
|
||||
(2,'doc','teamSpace'),
|
||||
(2,'execution','all'),
|
||||
(2,'execution','browse'),
|
||||
(2,'execution','bug'),
|
||||
@@ -3140,7 +3140,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(3,'doc','showFiles'),
|
||||
(3,'doc','productSpace'),
|
||||
(3,'doc','projectSpace'),
|
||||
(3,'doc','tableContents'),
|
||||
(3,'doc','teamSpace'),
|
||||
(3,'execution','all'),
|
||||
(3,'execution','browse'),
|
||||
(3,'execution','bug'),
|
||||
@@ -3486,7 +3486,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(4,'doc','showFiles'),
|
||||
(4,'doc','productSpace'),
|
||||
(4,'doc','projectSpace'),
|
||||
(4,'doc','tableContents'),
|
||||
(4,'doc','teamSpace'),
|
||||
(4,'execution','activate'),
|
||||
(4,'execution','addWhitelist'),
|
||||
(4,'execution','all'),
|
||||
@@ -4007,7 +4007,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(5,'doc','showFiles'),
|
||||
(5,'doc','productSpace'),
|
||||
(5,'doc','projectSpace'),
|
||||
(5,'doc','tableContents'),
|
||||
(5,'doc','teamSpace'),
|
||||
(5,'doc','view'),
|
||||
(5,'execution','activate'),
|
||||
(5,'execution','addWhitelist'),
|
||||
@@ -4483,7 +4483,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(6,'doc','showFiles'),
|
||||
(6,'doc','productSpace'),
|
||||
(6,'doc','projectSpace'),
|
||||
(6,'doc','tableContents'),
|
||||
(6,'doc','teamSpace'),
|
||||
(6,'execution','activate'),
|
||||
(6,'execution','addWhitelist'),
|
||||
(6,'execution','all'),
|
||||
@@ -4880,7 +4880,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(7,'doc','showFiles'),
|
||||
(7,'doc','productSpace'),
|
||||
(7,'doc','projectSpace'),
|
||||
(7,'doc','tableContents'),
|
||||
(7,'doc','teamSpace'),
|
||||
(7,'execution','all'),
|
||||
(7,'execution','browse'),
|
||||
(7,'execution','bug'),
|
||||
@@ -5306,7 +5306,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(8,'doc','showFiles'),
|
||||
(8,'doc','productSpace'),
|
||||
(8,'doc','projectSpace'),
|
||||
(8,'doc','tableContents'),
|
||||
(8,'doc','teamSpace'),
|
||||
(8,'execution','all'),
|
||||
(8,'execution','browse'),
|
||||
(8,'execution','bug'),
|
||||
@@ -5693,7 +5693,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(9,'doc','showFiles'),
|
||||
(9,'doc','productSpace'),
|
||||
(9,'doc','projectSpace'),
|
||||
(9,'doc','tableContents'),
|
||||
(9,'doc','teamSpace'),
|
||||
(9,'execution','all'),
|
||||
(9,'execution','browse'),
|
||||
(9,'execution','bug'),
|
||||
@@ -6025,7 +6025,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(10,'doc','showFiles'),
|
||||
(10,'doc','productSpace'),
|
||||
(10,'doc','projectSpace'),
|
||||
(10,'doc','tableContents'),
|
||||
(10,'doc','teamSpace'),
|
||||
(10,'execution','all'),
|
||||
(10,'execution','browse'),
|
||||
(10,'execution','bug'),
|
||||
@@ -6270,7 +6270,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(11,'doc','showFiles'),
|
||||
(11,'doc','productSpace'),
|
||||
(11,'doc','projectSpace'),
|
||||
(11,'doc','tableContents'),
|
||||
(11,'doc','teamSpace'),
|
||||
(11,'execution','all'),
|
||||
(11,'execution','browse'),
|
||||
(11,'execution','bug'),
|
||||
|
||||
@@ -754,7 +754,7 @@ $lang->action->label->testtask = 'Testaufgaben|testtask|view|caseID=%s';
|
||||
$lang->action->label->testsuite = 'Test Suite|testsuite|view|suiteID=%s';
|
||||
$lang->action->label->caselib = 'Fallbibliothek|testsuite|libview|libID=%s';
|
||||
$lang->action->label->todo = 'Todo|todo|view|todoID=%s';
|
||||
$lang->action->label->doclib = 'Dok Bibliothek|doc|browse|libID=%s';
|
||||
$lang->action->label->doclib = 'Dok Bibliothek|doc|teamspace|objectID=%s&libID=%s';
|
||||
$lang->action->label->doc = 'Dok|doc|view|docID=%s';
|
||||
$lang->action->label->user = 'Benutzer|user|view|account=%s';
|
||||
$lang->action->label->testreport = 'Berichte|testreport|view|report=%s';
|
||||
|
||||
@@ -754,7 +754,7 @@ $lang->action->label->testtask = 'Request|testtask|view|caseID=%s';
|
||||
$lang->action->label->testsuite = 'Test Suite|testsuite|view|suiteID=%s';
|
||||
$lang->action->label->caselib = 'Case Library|caselib|view|libID=%s';
|
||||
$lang->action->label->todo = 'Todo|todo|view|todoID=%s';
|
||||
$lang->action->label->doclib = 'Doc Library|doc|objectLibs|type=%s&objectID=%s&libID=%s';
|
||||
$lang->action->label->doclib = 'Doc Library|doc|teamspace|objectID=%s&libID=%s';
|
||||
$lang->action->label->doc = 'Doc|doc|view|docID=%s';
|
||||
$lang->action->label->user = 'User|user|view|account=%s';
|
||||
$lang->action->label->testreport = 'Report|testreport|view|report=%s';
|
||||
|
||||
@@ -754,7 +754,7 @@ $lang->action->label->testtask = 'Recette|testtask|view|caseID=%s';
|
||||
$lang->action->label->testsuite = 'Cahier Recette|testsuite|view|suiteID=%s';
|
||||
$lang->action->label->caselib = 'Library Recette|testsuite|libview|libID=%s';
|
||||
$lang->action->label->todo = 'Agenda|todo|view|todoID=%s';
|
||||
$lang->action->label->doclib = 'Bibliothèque|doc|browse|libID=%s';
|
||||
$lang->action->label->doclib = 'Bibliothèque|doc|teamspace|objectID=%s&libID=%s';
|
||||
$lang->action->label->doc = 'Document|doc|view|docID=%s';
|
||||
$lang->action->label->user = 'Utilisateur|user|view|account=%s';
|
||||
$lang->action->label->testreport = 'Rapport|testreport|view|report=%s';
|
||||
|
||||
@@ -754,7 +754,7 @@ $lang->action->label->testtask = '测试单|testtask|view|caseID=%s';
|
||||
$lang->action->label->testsuite = '测试套件|testsuite|view|suiteID=%s';
|
||||
$lang->action->label->caselib = '用例库|caselib|view|libID=%s';
|
||||
$lang->action->label->todo = '待办|todo|view|todoID=%s';
|
||||
$lang->action->label->doclib = '文档库|doc|tablecontents|type=%s&objectID=%s&libID=%s';
|
||||
$lang->action->label->doclib = '文档库|doc|teamspace|objectID=%s&libID=%s';
|
||||
$lang->action->label->doc = '文档|doc|view|docID=%s';
|
||||
$lang->action->label->user = '用户|user|view|account=%s';
|
||||
$lang->action->label->testreport = '报告|testreport|view|report=%s';
|
||||
|
||||
@@ -1694,7 +1694,6 @@ class actionModel extends model
|
||||
$method = 'tablecontents';
|
||||
if(isset($this->config->doc->spaceMethod[$docLib->type])) $method = $this->config->doc->spaceMethod[$docLib->type];
|
||||
if($method == 'myspace') $params = "type=mine&libID={$action->objectID}";
|
||||
if($method == 'tablecontents') $params = sprintf($vars, $docLib->type, $docLib->objectID, $action->objectID, $appendLib);
|
||||
if(!in_array($method, array('myspace', 'tablecontents'))) $params = "objectID={$docLib->objectID}&libID={$action->objectID}";
|
||||
$action->objectLink = helper::createLink('doc', $method, $params);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
$lang->api->common = 'API';
|
||||
$lang->api->getModel = 'Super Model API';
|
||||
$lang->api->sql = 'SQL Query API';
|
||||
$lang->api->manage = 'API management';
|
||||
|
||||
$lang->api->index = 'API Space';
|
||||
$lang->api->editLib = 'Edit';
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
$lang->api->common = 'API';
|
||||
$lang->api->getModel = 'Super Model API';
|
||||
$lang->api->sql = 'SQL Query API';
|
||||
$lang->api->manage = 'API management';
|
||||
|
||||
$lang->api->index = 'API Space';
|
||||
$lang->api->editLib = 'Edit';
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
$lang->api->common = 'API';
|
||||
$lang->api->getModel = 'Super Model API';
|
||||
$lang->api->sql = 'SQL Query API';
|
||||
$lang->api->manage = 'API management';
|
||||
|
||||
$lang->api->index = 'API Space';
|
||||
$lang->api->editLib = 'Edit';
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
$lang->api->common = 'API接口';
|
||||
$lang->api->getModel = '超级model调用接口';
|
||||
$lang->api->sql = 'SQL查询接口';
|
||||
$lang->api->manage = '接口管理';
|
||||
|
||||
$lang->api->index = '接口空间';
|
||||
$lang->api->editLib = '编辑库';
|
||||
|
||||
@@ -986,13 +986,13 @@ class apiModel extends model
|
||||
$normalObjects = $closedObjects = array();
|
||||
|
||||
$libs = $this->loadModel('doc')->getApiLibs();
|
||||
$products = $this->dao->select('t1.id, t1.name, t1.status')->from(TABLE_PRODUCT)->alias('t1')
|
||||
$products = $this->dao->select('t1.id, t1.order, t1.name, t1.status')->from(TABLE_PRODUCT)->alias('t1')
|
||||
->leftjoin(TABLE_DOCLIB)->alias('t2')->on('t2.product=t1.id')
|
||||
->where('t2.id')->gt(0)
|
||||
->andWhere('t1.vision')->eq($this->config->vision)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('t2.id')->in(array_keys($libs))
|
||||
->orderBy('id_desc')
|
||||
->orderBy('order_asc')
|
||||
->fetchAll('id');
|
||||
|
||||
foreach($products as $id => $product)
|
||||
@@ -1007,14 +1007,14 @@ class apiModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
$projects = $this->dao->select('t1.id, t1.name, t1.status')->from(TABLE_PROJECT)->alias('t1')
|
||||
$projects = $this->dao->select('t1.id, t1.order, t1.name, t1.status')->from(TABLE_PROJECT)->alias('t1')
|
||||
->leftjoin(TABLE_DOCLIB)->alias('t2')->on('t2.project=t1.id')
|
||||
->where('t2.id')->gt(0)
|
||||
->andWhere('t1.vision')->eq($this->config->vision)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->projects)->fi()
|
||||
->andWhere('t2.id')->in(array_keys($libs))
|
||||
->orderBy('t1.hasProduct_asc, id_desc')
|
||||
->orderBy('t1.hasProduct_asc, order_asc')
|
||||
->fetchAll('id');
|
||||
|
||||
foreach($projects as $id => $project)
|
||||
|
||||
@@ -341,11 +341,11 @@ $lang->block->default['doc']['2']['title'] = 'Dynamic';
|
||||
$lang->block->default['doc']['2']['block'] = 'docdynamic';
|
||||
$lang->block->default['doc']['2']['grid'] = 4;
|
||||
|
||||
$lang->block->default['doc']['3']['title'] = 'My Collection';
|
||||
$lang->block->default['doc']['3']['title'] = 'My Collection Document';
|
||||
$lang->block->default['doc']['3']['block'] = 'docmycollection';
|
||||
$lang->block->default['doc']['3']['grid'] = 8;
|
||||
|
||||
$lang->block->default['doc']['4']['title'] = 'Recently update';
|
||||
$lang->block->default['doc']['4']['title'] = 'Recently Update Document';
|
||||
$lang->block->default['doc']['4']['block'] = 'docrecentupdate';
|
||||
$lang->block->default['doc']['4']['grid'] = 8;
|
||||
|
||||
|
||||
@@ -341,11 +341,11 @@ $lang->block->default['doc']['2']['title'] = 'Dynamic';
|
||||
$lang->block->default['doc']['2']['block'] = 'docdynamic';
|
||||
$lang->block->default['doc']['2']['grid'] = 4;
|
||||
|
||||
$lang->block->default['doc']['3']['title'] = 'My Collection';
|
||||
$lang->block->default['doc']['3']['title'] = 'My Collection Document';
|
||||
$lang->block->default['doc']['3']['block'] = 'docmycollection';
|
||||
$lang->block->default['doc']['3']['grid'] = 8;
|
||||
|
||||
$lang->block->default['doc']['4']['title'] = 'Recently update';
|
||||
$lang->block->default['doc']['4']['title'] = 'Recently Update Document';
|
||||
$lang->block->default['doc']['4']['block'] = 'docrecentupdate';
|
||||
$lang->block->default['doc']['4']['grid'] = 8;
|
||||
|
||||
|
||||
@@ -341,11 +341,11 @@ $lang->block->default['doc']['2']['title'] = 'Dynamic';
|
||||
$lang->block->default['doc']['2']['block'] = 'docdynamic';
|
||||
$lang->block->default['doc']['2']['grid'] = 4;
|
||||
|
||||
$lang->block->default['doc']['3']['title'] = 'My Collection';
|
||||
$lang->block->default['doc']['3']['title'] = 'My Collection Document';
|
||||
$lang->block->default['doc']['3']['block'] = 'docmycollection';
|
||||
$lang->block->default['doc']['3']['grid'] = 8;
|
||||
|
||||
$lang->block->default['doc']['4']['title'] = 'Recently update';
|
||||
$lang->block->default['doc']['4']['title'] = 'Recently Update Document';
|
||||
$lang->block->default['doc']['4']['block'] = 'docrecentupdate';
|
||||
$lang->block->default['doc']['4']['grid'] = 8;
|
||||
|
||||
|
||||
@@ -341,11 +341,11 @@ $lang->block->default['doc']['2']['title'] = '文档动态';
|
||||
$lang->block->default['doc']['2']['block'] = 'docdynamic';
|
||||
$lang->block->default['doc']['2']['grid'] = 4;
|
||||
|
||||
$lang->block->default['doc']['3']['title'] = '我的收藏';
|
||||
$lang->block->default['doc']['3']['title'] = '我收藏的文档';
|
||||
$lang->block->default['doc']['3']['block'] = 'docmycollection';
|
||||
$lang->block->default['doc']['3']['grid'] = 8;
|
||||
|
||||
$lang->block->default['doc']['4']['title'] = '最近更新';
|
||||
$lang->block->default['doc']['4']['title'] = '最近更新的文档';
|
||||
$lang->block->default['doc']['4']['block'] = 'docrecentupdate';
|
||||
$lang->block->default['doc']['4']['grid'] = 8;
|
||||
|
||||
|
||||
@@ -340,7 +340,7 @@ $lang->execution->menu->storyGroup = array('link' => "{$lang->common->story}|exe
|
||||
$lang->execution->menu->story = array('link' => "$lang->SRCommon|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'storykanban,linkstory');
|
||||
$lang->execution->menu->qa = array('link' => "{$lang->qa->common}|execution|bug|executionID=%s", 'subModule' => 'bug,testcase,testtask,testreport', 'alias' => 'qa,bug,testcase,testtask,testreport');
|
||||
$lang->execution->menu->devops = array('link' => "{$lang->repo->common}|repo|browse|repoID=0&branchID=&objectID=%s", 'subModule' => 'repo');
|
||||
$lang->execution->menu->doc = array('link' => "{$lang->doc->common}|doc|tableContents|type=execution&objectID=%s", 'subModule' => 'doc');
|
||||
$lang->execution->menu->doc = array('link' => "{$lang->doc->common}|execution|doc|objectID=%s", 'subModule' => 'doc');
|
||||
$lang->execution->menu->build = array('link' => "{$lang->build->common}|execution|build|executionID=%s", 'subModule' => 'build');
|
||||
$lang->execution->menu->action = array('link' => "$lang->dynamic|execution|dynamic|executionID=%s");
|
||||
$lang->execution->menu->settings = array('link' => "$lang->settings|execution|view|executionID=%s", 'subModule' => 'personnel', 'alias' => 'edit,manageproducts,team,whitelist,addwhitelist,managemembers', 'class' => 'dropdown dropdown-hover');
|
||||
@@ -503,7 +503,7 @@ $lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|mySpace
|
||||
$lang->doc->menu->product = array('link' => "{$lang->doc->productSpace}|doc|productSpace|", 'alias' => 'productspace');
|
||||
$lang->doc->menu->project = array('link' => "{$lang->doc->projectSpace}|doc|projectSpace|", 'alias' => 'projectspace');
|
||||
$lang->doc->menu->api = array('link' => "{$lang->doc->apiSpace}|api|index", 'alias' => 'api');
|
||||
$lang->doc->menu->custom = array('link' => "{$lang->doc->teamSpace}|doc|tableContents|type=custom", 'alias' => 'tablecontents');
|
||||
$lang->doc->menu->custom = array('link' => "{$lang->doc->teamSpace}|doc|teamSpace|", 'alias' => 'teamspace');
|
||||
|
||||
$lang->doc->dividerMenu = ',product,';
|
||||
|
||||
|
||||
@@ -605,7 +605,6 @@ class commonModel extends model
|
||||
if(strpos('|bug|execution|kanbanspace|', "|$objectType|") !== false) $needPrintDivider = true;
|
||||
|
||||
$hasPriv = common::hasPriv($module, $createMethod);
|
||||
if($hasPriv and $objectType == 'doc' and !common::hasPriv('doc', 'tableContents')) $hasPriv = false;
|
||||
if(!$hasPriv and $objectType == 'doc' and common::hasPriv('api', 'create')) $hasPriv = true;
|
||||
if(!$hasPriv) continue;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ $config->doc->spaceMethod['mine'] = 'myspace';
|
||||
$config->doc->spaceMethod['product'] = 'productspace';
|
||||
$config->doc->spaceMethod['project'] = 'projectspace';
|
||||
$config->doc->spaceMethod['execution'] = 'projectspace';
|
||||
$config->doc->spaceMethod['custom'] = 'tablecontents';
|
||||
$config->doc->spaceMethod['custom'] = 'teamspace';
|
||||
|
||||
$config->doc->search['module'] = 'doc';
|
||||
$config->doc->search['fields']['title'] = $lang->doc->title;
|
||||
|
||||
+43
-16
@@ -655,7 +655,7 @@ class doc extends control
|
||||
|
||||
if($from == 'lib')
|
||||
{
|
||||
$method = 'tableContents';
|
||||
$method = 'teamSpace';
|
||||
$objectID = 0;
|
||||
if($objectType == 'product')
|
||||
{
|
||||
@@ -672,7 +672,6 @@ class doc extends control
|
||||
$objectID = $doc->execution;
|
||||
}
|
||||
$params = "objectID={$objectID}&libID={$doc->lib}";
|
||||
if($method == 'tableContents') $params = "type=$objectType&" . $params;
|
||||
$response['locate'] = $this->createLink('doc', $method, $params);
|
||||
}
|
||||
}
|
||||
@@ -1198,20 +1197,22 @@ class doc extends control
|
||||
$doc = $docID ? $doc : '';
|
||||
|
||||
/* Crumbs links array. */
|
||||
$methodName = in_array($type, array('product', 'project')) ? $objectType . 'Space' : 'tableContents';
|
||||
$moduleName = 'doc';
|
||||
$methodName = in_array($type, array('product', 'project')) ? $objectType . 'Space' : 'teamSpace';
|
||||
$linkParams = "objectID={$objectID}&libID={$lib->id}";
|
||||
if($this->app->tab == 'execution' or $objectType == 'custom')
|
||||
if($this->app->tab == 'execution')
|
||||
{
|
||||
$linkParams = "objectType=$objectType&$linkParams";
|
||||
$methodName = 'tableContents';
|
||||
$moduleName = 'execution';
|
||||
$methodName = 'doc';
|
||||
$linkParams = "executionID=$objectID";
|
||||
}
|
||||
if($type == 'mine')
|
||||
elseif($type == 'mine')
|
||||
{
|
||||
$linkParams = "type=mine&libID={$lib->id}";
|
||||
$methodName = 'mySpace';
|
||||
}
|
||||
|
||||
$crumbs[] = html::a(inLink($methodName, $linkParams), html::image("static/svg/wiki-file-lib.svg") . $lib->name, '', 'title =' . $lib -> name);
|
||||
$crumbs[] = html::a($this->createLink($moduleName, $methodName, $linkParams), html::image("static/svg/wiki-file-lib.svg") . $lib->name, '', 'title =' . $lib -> name);
|
||||
|
||||
$moduleList = $this->loadModel('tree')->getParents($doc->module);
|
||||
foreach($moduleList as $module)
|
||||
@@ -1282,7 +1283,7 @@ class doc extends control
|
||||
$queryID = $browseType == 'bySearch' ? (int)$param : 0;
|
||||
$params = "objectID=$objectID&libID=$libID&moduleID=0&browseType=bySearch&orderBy=$orderBy¶m=myQueryID";
|
||||
if($this->app->rawMethod == 'tablecontents') $params = "type=$type&" . $params;
|
||||
$actionURL = $this->createLink('doc', $this->app->rawMethod, $params);
|
||||
$actionURL = $this->createLink($this->app->rawModule, $this->app->rawMethod, $params);
|
||||
if($libType == 'api')
|
||||
{
|
||||
$this->loadModel('api')->buildSearchForm($lib, $queryID, $actionURL, $libs, $type);
|
||||
@@ -1361,6 +1362,9 @@ class doc extends control
|
||||
*/
|
||||
public function productSpace($objectID = 0, $libID = 0, $moduleID = 0, $browseType = 'all', $orderBy = 'status,id_desc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$products = $this->product->getPairs('nocode', 0, '', 'all');
|
||||
$objectID = $this->product->saveState($objectID, $products);
|
||||
|
||||
echo $this->fetch('doc', 'tableContents', "type=product&objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$browseType&orderBy=$orderBy¶m=$param&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
}
|
||||
|
||||
@@ -1381,9 +1385,32 @@ class doc extends control
|
||||
*/
|
||||
public function projectSpace($objectID = 0, $libID = 0, $moduleID = 0, $browseType = 'all', $orderBy = 'status,id_desc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$projects = $this->project->getPairsByProgram();
|
||||
$objectID = $this->project->saveState($objectID, $projects);
|
||||
|
||||
echo $this->fetch('doc', 'tableContents', "type=project&objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$browseType&orderBy=$orderBy¶m=$param&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
}
|
||||
|
||||
/**
|
||||
* Show team space.
|
||||
*
|
||||
* @param int $objectID
|
||||
* @param int $libID
|
||||
* @param int $moduleID
|
||||
* @param string $browseType all|draft|bysearch
|
||||
* @param string $orderBy
|
||||
* @param int $param
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function teamSpace($objectID = 0, $libID = 0, $moduleID = 0, $browseType = 'all', $orderBy = 'status,id_desc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
echo $this->fetch('doc', 'tableContents', "type=custom&objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$browseType&orderBy=$orderBy¶m=$param&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
}
|
||||
|
||||
/**
|
||||
* Select lib type.
|
||||
*
|
||||
@@ -1412,13 +1439,13 @@ class doc extends control
|
||||
|
||||
$spaceList = $this->lang->doc->spaceList;
|
||||
$typeList = $this->lang->doc->types;
|
||||
if(!common::hasPriv('doc', 'create')) unset($spaceList['mine'], $spaceList['custom'], $typeList['doc']);
|
||||
if(!common::hasPriv('doc', 'mySpace')) unset($spaceList['mine']);
|
||||
if(!common::hasPriv('doc', 'productSpace')) unset($spaceList['product']);
|
||||
if(!common::hasPriv('doc', 'projectSpace')) unset($spaceList['project']);
|
||||
if(!common::hasPriv('doc', 'tableContents')) unset($spaceList['custom']);
|
||||
if(!common::hasPriv('api', 'index')) unset($spaceList['api']);
|
||||
if(!common::hasPriv('api', 'create')) unset($spaceList['api'], $typeList['api']);
|
||||
if(!common::hasPriv('doc', 'create')) unset($spaceList['mine'], $spaceList['custom'], $typeList['doc']);
|
||||
if(!common::hasPriv('doc', 'mySpace')) unset($spaceList['mine']);
|
||||
if(!common::hasPriv('doc', 'productSpace')) unset($spaceList['product']);
|
||||
if(!common::hasPriv('doc', 'projectSpace')) unset($spaceList['project']);
|
||||
if(!common::hasPriv('doc', 'teamSpace')) unset($spaceList['custom']);
|
||||
if(!common::hasPriv('api', 'index')) unset($spaceList['api']);
|
||||
if(!common::hasPriv('api', 'create')) unset($spaceList['api'], $typeList['api']);
|
||||
|
||||
$products = $this->loadModel('product')->getPairs();
|
||||
$projects = $this->project->getPairsByProgram('', 'all', false, 'order_asc', 'kanban');
|
||||
|
||||
@@ -49,7 +49,7 @@ li.drag-shadow ul {display: none!important;}
|
||||
.table .c-name > .doc-title {display: inline-block; max-width: calc(100% - 80px); overflow: hidden; background: transparent; padding-right:0px;}
|
||||
.table .c-name > span.doc-title {line-height: 0; vertical-align: inherit;}
|
||||
.table .c-name > .draft {background-color:rgba(129, 102, 238, 0.12); color:#8166EE;}
|
||||
.table .c-name > .ajaxCollect {float: right; position: relative; right: 10px; top: 0px;}
|
||||
.table .c-name > .ajaxCollect {float: right; position: relative; right: 10px; top: 0px; padding: 0 6px;}
|
||||
table.table > thead > tr {height: 32px;}
|
||||
|
||||
#bysearchTab::before {display: none;}
|
||||
|
||||
@@ -332,12 +332,11 @@ $(document).ready(function()
|
||||
*/
|
||||
function locateNewLib(type, objectID, libID)
|
||||
{
|
||||
var method = 'tableContents';
|
||||
var params = 'type=' + type + '&objectID=' + objectID + '&libID=' + libID;
|
||||
var method = 'teamSpace';
|
||||
var params = 'objectID=' + objectID + '&libID=' + libID;
|
||||
if(type == 'product' || type == 'project')
|
||||
{
|
||||
method = type + 'Space';
|
||||
params = 'objectID=' + objectID + '&libID=' + libID;
|
||||
}
|
||||
else if(type == 'mine')
|
||||
{
|
||||
|
||||
@@ -125,6 +125,7 @@ $lang->doc->defaultSave = 'Default Save: ';
|
||||
$lang->doc->position = 'Position';
|
||||
$lang->doc->person = 'Person';
|
||||
$lang->doc->team = 'Team';
|
||||
$lang->doc->manage = 'Document Management';
|
||||
|
||||
$lang->doc->moduleDoc = 'Nach Modulen';
|
||||
$lang->doc->searchDoc = 'Suche';
|
||||
|
||||
@@ -125,6 +125,7 @@ $lang->doc->defaultSave = 'Default Save: ';
|
||||
$lang->doc->position = 'Position';
|
||||
$lang->doc->person = 'Person';
|
||||
$lang->doc->team = 'Team';
|
||||
$lang->doc->manage = 'Document Management';
|
||||
|
||||
$lang->doc->moduleDoc = 'By Module';
|
||||
$lang->doc->searchDoc = 'Search';
|
||||
|
||||
@@ -125,6 +125,7 @@ $lang->doc->defaultSave = 'Default Save: ';
|
||||
$lang->doc->position = 'Position';
|
||||
$lang->doc->person = 'Person';
|
||||
$lang->doc->team = 'Team';
|
||||
$lang->doc->manage = 'Document Management';
|
||||
|
||||
$lang->doc->moduleDoc = 'Par Module';
|
||||
$lang->doc->searchDoc = 'Rechercher';
|
||||
|
||||
@@ -125,6 +125,7 @@ $lang->doc->defaultSave = '默认存入:';
|
||||
$lang->doc->position = '所在位置';
|
||||
$lang->doc->person = '个人';
|
||||
$lang->doc->team = '团队';
|
||||
$lang->doc->manage = '文档管理';
|
||||
|
||||
$lang->doc->moduleDoc = '按模块浏览';
|
||||
$lang->doc->searchDoc = '搜索';
|
||||
|
||||
+41
-59
@@ -386,11 +386,6 @@ class docModel extends model
|
||||
$allLibIDList = array_keys($allLibs);
|
||||
$hasPrivDocIdList = $this->getPrivDocs(0, $moduleID);
|
||||
|
||||
$files = $this->dao->select('*')->from(TABLE_FILE)
|
||||
->where('objectType')->eq('doc')
|
||||
->andWhere('objectID')->in($hasPrivDocIdList)
|
||||
->fetchGroup('objectID');
|
||||
|
||||
if($browseType == "all")
|
||||
{
|
||||
$docs = $this->getDocs(0, 0, $browseType, $sort, $pager);
|
||||
@@ -422,13 +417,14 @@ class docModel extends model
|
||||
->andWhere('actor')->eq($this->app->user->account)
|
||||
->andWhere('action')->eq('edited')
|
||||
->fetchAll('objectID');
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)
|
||||
->where('deleted')->eq(0)
|
||||
$docs = $this->dao->select('t1.*, t2.name as libName, t2.type as objectType')->from(TABLE_DOC)->alias('t1')
|
||||
->leftJoin(TABLE_DOCLIB)->alias('t2')->on("t1.lib=t2.id")
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere($query)
|
||||
->andWhere('lib')->in($allLibIDList)
|
||||
->beginIF($this->config->doc->notArticleType)->andWhere('type')->notIN($this->config->doc->notArticleType)->fi()
|
||||
->andWhere('addedBy', 1)->eq($this->app->user->account)
|
||||
->orWhere('id')->in(array_keys($docIDList))
|
||||
->andWhere('t1.lib')->in($allLibIDList)
|
||||
->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi()
|
||||
->andWhere('t1.addedBy', 1)->eq($this->app->user->account)
|
||||
->orWhere('t1.id')->in(array_keys($docIDList))
|
||||
->markRight(1)
|
||||
->orderBy($sort)
|
||||
->page($pager)
|
||||
@@ -436,12 +432,13 @@ class docModel extends model
|
||||
}
|
||||
elseif($browseType == "openedbyme")
|
||||
{
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('lib')->in($allLibIDList)
|
||||
->andWhere('id')->in($hasPrivDocIdList)
|
||||
->beginIF($this->config->doc->notArticleType)->andWhere('type')->notIN($this->config->doc->notArticleType)->fi()
|
||||
->andWhere('addedBy')->eq($this->app->user->account)
|
||||
$docs = $this->dao->select('t1.*, t2.name as libName, t2.type as objectType')->from(TABLE_DOC)->alias('t1')
|
||||
->leftJoin(TABLE_DOCLIB)->alias('t2')->on("t1.lib=t2.id")
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t1.lib')->in($allLibIDList)
|
||||
->andWhere('t1.id')->in($hasPrivDocIdList)
|
||||
->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi()
|
||||
->andWhere('t1.addedBy')->eq($this->app->user->account)
|
||||
->orderBy($sort)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
@@ -454,11 +451,13 @@ class docModel extends model
|
||||
->andWhere('objectID')->in($hasPrivDocIdList)
|
||||
->andWhere('action')->eq('edited')
|
||||
->fetchAll('objectID');
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('id')->in(array_keys($docIDList))
|
||||
->andWhere('lib')->in($allLibIDList)
|
||||
->beginIF($this->config->doc->notArticleType)->andWhere('type')->notIN($this->config->doc->notArticleType)->fi()
|
||||
|
||||
$docs = $this->dao->select('t1.*, t2.name as libName, t2.type as objectType')->from(TABLE_DOC)->alias('t1')
|
||||
->leftJoin(TABLE_DOCLIB)->alias('t2')->on("t1.lib=t2.id")
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t1.id')->in(array_keys($docIDList))
|
||||
->andWhere('t1.lib')->in($allLibIDList)
|
||||
->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi()
|
||||
->orderBy($sort)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
@@ -490,44 +489,27 @@ class docModel extends model
|
||||
|
||||
if(empty($docs)) return array();
|
||||
|
||||
/* Get projects, executions and products by docIdList. */
|
||||
$docContents = $this->dao->select('*')->from(TABLE_DOCCONTENT)->where('doc')->in(array_keys($docs))->orderBy('version,doc')->fetchAll('doc');
|
||||
foreach($docs as $index => $doc)
|
||||
if(in_array($browseType, array('bySearch', 'openedbyme', 'editedbyme')))
|
||||
{
|
||||
$docs[$index]->fileSize = 0;
|
||||
if(isset($files[$index]))
|
||||
$objects = array();
|
||||
list($objects['project'], $objects['execution'], $objects['product']) = $this->getObjectsByDoc(array_keys($docs));
|
||||
foreach($docs as $docID => $doc)
|
||||
{
|
||||
$docContent = $docContents[$index];
|
||||
$fileSize = 0;
|
||||
foreach($files[$index] as $file)
|
||||
$doc->objectID = zget($doc, $doc->objectType, 0);
|
||||
$doc->objectName = '';
|
||||
if(isset($objects[$doc->objectType]))
|
||||
{
|
||||
if(strpos(",{$docContent->files},", ",{$file->id},") === false) continue;
|
||||
$fileSize += $file->size;
|
||||
}
|
||||
|
||||
if($fileSize < 1024)
|
||||
{
|
||||
$fileSize .= 'B';
|
||||
}
|
||||
elseif($fileSize < 1024 * 1024)
|
||||
{
|
||||
$fileSize = round($fileSize / 1024, 2) . 'KB';
|
||||
}
|
||||
elseif($fileSize < 1024 * 1024 * 1024)
|
||||
{
|
||||
$fileSize = round($fileSize / 1024 / 1024, 2) . 'MB';
|
||||
$doc->objectName = $objects[$doc->objectType][$doc->objectID];
|
||||
}
|
||||
else
|
||||
{
|
||||
$fileSize = round($fileSize / 1024 / 1024 / 1024, 2) . 'G';
|
||||
if($doc->objectType == 'mine') $doc->objectName = $this->lang->doc->person;
|
||||
if($doc->objectType == 'custom') $doc->objectName = $this->lang->doc->team;
|
||||
}
|
||||
|
||||
$docs[$index]->fileSize = $fileSize;
|
||||
}
|
||||
}
|
||||
|
||||
$docs = $this->processCollector($docs);
|
||||
return $docs;
|
||||
return $this->processCollector($docs);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -666,7 +648,7 @@ class docModel extends model
|
||||
->andWhere('t2.actor')->eq($this->app->user->account)
|
||||
->beginIF(!common::hasPriv('doc', 'productSpace'))->andWhere('t3.type')->ne('product')->fi()
|
||||
->beginIF(!common::hasPriv('doc', 'projectSpace'))->andWhere('t3.type')->notIN('project,execution')->fi()
|
||||
->beginIF(!common::hasPriv('doc', 'tableContents'))->andWhere('t3.type')->ne('custom')->fi()
|
||||
->beginIF(!common::hasPriv('doc', 'teamSpace'))->andWhere('t3.type')->ne('custom')->fi()
|
||||
->beginIF($browseType == 'all' or $browseType == 'bysearch')->andWhere("(t1.status = 'normal' or (t1.status = 'draft' and t1.addedBy='{$this->app->user->account}'))")->fi()
|
||||
->beginIF($browseType == 'draft')->andWhere('t1.status')->eq('draft')->andWhere('t1.addedBy')->eq($this->app->user->account)->fi()
|
||||
->beginIF($browseType == 'bysearch')->andWhere($query)->fi()
|
||||
@@ -686,7 +668,7 @@ class docModel extends model
|
||||
->andWhere('t1.addedBy')->eq($this->app->user->account)
|
||||
->beginIF(!common::hasPriv('doc', 'productSpace'))->andWhere('t2.type')->ne('product')->fi()
|
||||
->beginIF(!common::hasPriv('doc', 'projectSpace'))->andWhere('t2.type')->notIN('project,execution')->fi()
|
||||
->beginIF(!common::hasPriv('doc', 'tableContents'))->andWhere('t2.type')->ne('custom')->fi()
|
||||
->beginIF(!common::hasPriv('doc', 'teamSpace'))->andWhere('t2.type')->ne('custom')->fi()
|
||||
->beginIF($browseType == 'draft')->andWhere('t1.status')->eq('draft')->andWhere('t1.addedBy')->eq($this->app->user->account)->fi()
|
||||
->beginIF($browseType == 'bysearch')->andWhere($query)->fi()
|
||||
->orderBy($orderBy)
|
||||
@@ -1093,7 +1075,7 @@ class docModel extends model
|
||||
$products = $this->product->getPairs();
|
||||
|
||||
$this->config->doc->search['params']['project']['values'] = array('' => '') + $this->loadModel('project')->getPairsByProgram('', 'all', false, 'order_asc', 'kanban') + array('all' => $this->lang->doc->allProjects);
|
||||
$this->config->doc->search['params']['execution']['values'] = array('' => '') + $this->loadModel('execution')->getPairs(0, 'sprint,stage', 'multiple,leaf,noprefix') + array('all' => $this->lang->doc->allExecutions);
|
||||
$this->config->doc->search['params']['execution']['values'] = array('' => '') + $this->loadModel('execution')->getPairs(0, 'sprint,stage', 'multiple,leaf,noprefix,withobject') + array('all' => $this->lang->doc->allExecutions);
|
||||
$this->config->doc->search['params']['lib']['values'] = array('' => '') + $this->loadModel('doc')->getLibs('all', 'withObject') + array('all' => $this->lang->doclib->all);
|
||||
$this->config->doc->search['params']['product']['values'] = array('' => '') + $products + array('all' => $this->lang->doc->allProduct);
|
||||
|
||||
@@ -2519,12 +2501,12 @@ class docModel extends model
|
||||
|
||||
foreach($moduleDocs[0] as $doc)
|
||||
{
|
||||
if(!$docID and $currentMethod != 'tablecontents') $docID = $doc->id;
|
||||
if(!$docID and $currentMethod != 'teamspace') $docID = $doc->id;
|
||||
|
||||
$class = common::hasPriv('doc', 'updateOrder') ? ' sortDoc' : '';
|
||||
$treeMenu[0] .= '<li' . " class='" . ($doc->id == $docID ? 'active' : 'doc') . "$class'" . " data-id=$doc->id>";
|
||||
|
||||
if($currentMethod == 'tablecontents')
|
||||
if($currentMethod == 'teamspace')
|
||||
{
|
||||
$treeMenu[0] .= '<div class="tree-group"><span class="tail-info">' . zget($users, $doc->editedBy) . ' ' . $doc->editedDate . '</span>';
|
||||
}
|
||||
@@ -2596,11 +2578,11 @@ class docModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!$docID and $currentMethod != 'tablecontents') $docID = $doc->id;
|
||||
if(!$docID and $currentMethod != 'teamspace') $docID = $doc->id;
|
||||
$class = common::hasPriv('doc', 'updateOrder') ? ' sortDoc' : '';
|
||||
$treeMenu[$module->id] .= '<li' . " class='" . ($doc->id == $docID ? 'active' : 'doc') . "$class'" . " data-id=$doc->id>";
|
||||
|
||||
if($currentMethod == 'tablecontents')
|
||||
if($currentMethod == 'teamspace')
|
||||
{
|
||||
$treeMenu[$module->id] .= '<div class="tree-group"><span class="tail-info">' . zget($users, $doc->editedBy) . ' ' . $doc->editedDate . '</span>';
|
||||
}
|
||||
@@ -2618,7 +2600,7 @@ class docModel extends model
|
||||
}
|
||||
$treeMenu[$module->id] .= '</div>';
|
||||
}
|
||||
elseif($currentMethod == 'tablecontents')
|
||||
elseif($currentMethod == 'teamspace')
|
||||
{
|
||||
$class = common::hasPriv('doc', 'updateOrder') ? 'sortDoc' : '';
|
||||
$treeMenu[$module->id] .= html::a(inlink('view', "docID={$doc->id}"), "<i class='icon icon-file-text text-muted'></i> " . $doc->title, '', "data-app='{$this->app->tab}' class='doc-title $class' title='{$doc->title}'");
|
||||
@@ -2642,7 +2624,7 @@ class docModel extends model
|
||||
{
|
||||
$moduleClass = common::hasPriv('tree', 'updateOrder') ? 'sort-module' : '';
|
||||
$li = "<div class='tree-group'><span class='module-name'><a class='$moduleClass' title='{$module->name}'>" . $module->name . '</a></span>';
|
||||
if($currentMethod != 'tablecontents')
|
||||
if($currentMethod != 'teamspace')
|
||||
{
|
||||
if(common::hasPriv('tree', 'edit') or common::hasPriv('tree', 'browse') or common::hasPriv('tree', 'browse') or common::hasPriv('tree', 'updateOrder'))
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ body {margin-bottom: 25px;}
|
||||
#docListForm .checkbox-primary > label {height: 16px; line-height: 16px; padding-left: 16px;}
|
||||
#docListForm .checkbox-primary > label:before {left: -1px; font-size: 10px;}
|
||||
#docListForm .checkbox-primary > label:after {width: 12px; height: 12px;}
|
||||
.table-files .btn {padding: 0 2px;}
|
||||
.table-files .btn {padding: 2px;}
|
||||
</style>
|
||||
<?php if(common::checkNotCN()):?>
|
||||
<style>
|
||||
@@ -42,7 +42,6 @@ body {margin-bottom: 25px;}
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php $vars = "objectID=$objectID&$libID=$libID&moduleID=$moduleID&browseType=$browseType&orderBy=%s¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<?php if($app->rawMethod == 'tablecontents') $vars = "type=$type&" . $vars;?>
|
||||
<div>
|
||||
<form class='main-table' method='post' id='docListForm'>
|
||||
<table class="table table-files has-sort-head">
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
.tree-icon {position: absolute; right: 0;}
|
||||
.tree li.has-input {overflow: hidden;}
|
||||
.tree li.has-input > input.input-bro {margin-left: 15px;}
|
||||
.img-lib {flex: 0 0 14px; height: 14px; margin-right: 5px; margin-bottom: 5px;}
|
||||
.file-icon {width: 14px;}
|
||||
.img-lib {flex: 0 0 14px; height: 14px; margin-right: 5px; margin-bottom: 2px;}
|
||||
.file-icon {width: 14px; margin-bottom: 4px;}
|
||||
.tree-icon {position: absolute; right: 0;}
|
||||
.tree li > a {max-width: 100%; padding: 2px;}
|
||||
.file-tree a.show-icon > div,
|
||||
|
||||
@@ -19,7 +19,7 @@ body {margin-bottom: 25px;}
|
||||
#docListForm .table .c-name > .doc-title {display: inline-block; max-width: calc(100% - 80px); overflow: hidden; background: transparent; padding-right:0px;}
|
||||
#docListForm .table .c-name > span.doc-title {line-height: 0; vertical-align: inherit;}
|
||||
#docListForm .table .c-name > .draft {background-color:rgba(129, 102, 238, 0.12); color:#8166EE;}
|
||||
#docListForm .table .c-name > .ajaxCollect {float: right; position: relative; right: 10px; top: 0px;}
|
||||
#docListForm .table .c-name > .ajaxCollect {float: right; position: relative; right: 10px; top: 0px; padding: 0 6px;}
|
||||
#docListForm table.table > thead > tr {height: 32px;}
|
||||
#docListForm .checkbox-primary {line-height: 16px;}
|
||||
#docListForm table .checkbox-primary {top: -2px;}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<?php if($libType != 'api'):?>
|
||||
<?php foreach($lang->doc->featureBar['tableContents'] as $barType => $barName):?>
|
||||
<?php $active = $barType == $browseType ? 'btn-active-text' : '';?>
|
||||
<?php $linkParams = $app->rawMethod == 'tablecontents' ? "type=$type&objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$barType": "objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$barType";?>
|
||||
<?php $linkParams = "objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$barType";?>
|
||||
<?php echo html::a($this->createLink('doc', $app->rawMethod, $linkParams), "<span class='text'>{$barName}</span>" . ($active ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>" : ''), '', "class='btn btn-link $active' id='{$barType}Tab'");?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -1829,7 +1829,7 @@ class execution extends control
|
||||
|
||||
if($this->app->tab == 'doc')
|
||||
{
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('doc', 'objectLibs', "type=execution")));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('doc', 'projectSpace', "objectID=$executionID")));
|
||||
}
|
||||
|
||||
if(!empty($projectID) and strpos(',kanban,agileplus,waterfallplus,', ",$project->model,") !== false)
|
||||
@@ -4181,9 +4181,9 @@ class execution extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function doc($executionID)
|
||||
public function doc($executionID, $libID = 0, $moduleID = 0, $browseType = 'all', $orderBy = 'status,id_desc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->locate($this->createLink('doc', 'objectLibs', "type=execution&objectID=$executionID&from=execution"));
|
||||
echo $this->fetch('doc', 'tableContents', "type=execution&objectID=$executionID&libID=$libID&moduleID=$moduleID&browseType=$browseType&orderBy=$orderBy¶m=$param&recTotal=$recTotal&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2212,10 +2212,6 @@ class executionModel extends model
|
||||
{
|
||||
$link = helper::createLink('doc', $method, "type=execution&objectID=%s&from=execution");
|
||||
}
|
||||
elseif($module == 'api')
|
||||
{
|
||||
$link = helper::createLink('doc', 'tableContents', "type=execution&objectID=%s&from=execution");
|
||||
}
|
||||
elseif(in_array($module, array('issue', 'risk', 'opportunity', 'pssp', 'auditplan', 'nc', 'meeting')))
|
||||
{
|
||||
$link = helper::createLink($module, 'browse', "executionID=%s&from=execution");
|
||||
|
||||
@@ -128,15 +128,15 @@
|
||||
<div class="panel block-docs" style="height: 240px">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title"><?php echo $lang->execution->doclib;?></div>
|
||||
<?php if(common::hasPriv('doc', 'objectLibs')):?>
|
||||
<?php if(common::hasPriv('execution', 'doc')):?>
|
||||
<nav class="panel-actions nav nav-default">
|
||||
<li><?php common::printLink('doc', 'objectLibs', "type=execution&executionID=$execution->id&from=execution", strtoupper($lang->more), '', "title=$lang->more");?></li>
|
||||
<li><?php common::printLink('execution', 'doc', "executionID=$execution->id", strtoupper($lang->more), '', "title=$lang->more");?></li>
|
||||
</nav>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row row-grid">
|
||||
<?php if(common::hasPriv('doc', 'objectLibs')):?>
|
||||
<?php if(common::hasPriv('execution', 'doc')):?>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($docLibs as $libID => $docLib):?>
|
||||
<?php if($i > 8) break;?>
|
||||
@@ -144,7 +144,7 @@
|
||||
<?php if($libID == 'files'):?>
|
||||
<?php echo html::a($this->createLink('doc', 'showFiles', "type=execution&objectID=$execution->id"), "<i class='icon icon-folder text-yellow'></i> " . $docLib->name);?>
|
||||
<?php else:?>
|
||||
<?php echo html::a($this->createLink('doc', 'objectLibs', "type=execution&objectID={$execution->id}&libID=$libID"), "<i class='icon icon-folder text-yellow'></i> " . $docLib->name, '', "data-app='execution' title='$docLib->name'");?>
|
||||
<?php echo html::a($this->createLink('execution', 'doc', "objectID={$execution->id}&libID=$libID"), "<i class='icon icon-folder text-yellow'></i> " . $docLib->name, '', "data-app='execution' title='$docLib->name'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php $i++;?>
|
||||
|
||||
@@ -1387,7 +1387,7 @@ $lang->resource->doc->deleteFile = 'deleteFile';
|
||||
$lang->resource->doc->collect = 'collectAction';
|
||||
$lang->resource->doc->productSpace = 'productSpace';
|
||||
$lang->resource->doc->projectSpace = 'projectSpace';
|
||||
$lang->resource->doc->tableContents = 'teamSpace';
|
||||
$lang->resource->doc->teamSpace = 'teamSpace';
|
||||
$lang->resource->doc->showFiles = 'showFiles';
|
||||
$lang->resource->doc->addCatalog = 'addCatalog';
|
||||
$lang->resource->doc->editCatalog = 'editCatalog';
|
||||
@@ -1410,7 +1410,7 @@ $lang->doc->methodOrder[65] = 'deleteFile';
|
||||
$lang->doc->methodOrder[70] = 'collect';
|
||||
$lang->doc->methodOrder[75] = 'productSpace';
|
||||
$lang->doc->methodOrder[80] = 'projectSpace';
|
||||
$lang->doc->methodOrder[85] = 'tableContents';
|
||||
$lang->doc->methodOrder[85] = 'teamSpace';
|
||||
$lang->doc->methodOrder[90] = 'showFiles';
|
||||
$lang->doc->methodOrder[95] = 'addCatalog';
|
||||
$lang->doc->methodOrder[100] = 'editCatalog';
|
||||
|
||||
@@ -108,7 +108,9 @@
|
||||
<th class='text-middle text-right thWidth'>
|
||||
<div class="checkbox-primary checkbox-inline checkbox-right check-all">
|
||||
<input type='checkbox' id='allChecker<?php echo $moduleName;?>'>
|
||||
<label class='text-right' for='allChecker<?php echo $moduleName;?>'><?php echo $lang->$moduleName->common;?></label>
|
||||
<?php $moduleTitle = $lang->$moduleName->common;?>
|
||||
<?php if(in_array($moduleName, array('doc', 'api'))) $moduleTitle = $lang->$moduleName->manage;?>
|
||||
<label class='text-right' for='allChecker<?php echo $moduleName;?>'><?php echo $moduleTitle;?></label>
|
||||
</div>
|
||||
</th>
|
||||
<?php if(isset($lang->$moduleName->menus)):?>
|
||||
|
||||
@@ -1,2 +1,13 @@
|
||||
body {margin-bottom: 25px;}
|
||||
.fullscreen-close {top: 8px !important;}
|
||||
#docList.table .c-name > .ajaxCollect {float: right; position: relative; right: 10px; top: 0px;}
|
||||
#docList th.c-id {width: 72px;}
|
||||
#docList th.c-user {width: 80px;}
|
||||
#docList th.c-actions {width: 84px; padding-left: 15px;}
|
||||
#docList .c-object {width: 120px; overflow: hidden; white-space: nowrap; text-overflow: clip;}
|
||||
#docList.table .c-name > .doc-title {display: inline-block; max-width: calc(100% - 80px); overflow: hidden; background: transparent; padding-right:0px;}
|
||||
#docList.table .c-name > span.doc-title {line-height: 0; vertical-align: inherit;}
|
||||
#docList.table .c-name > .draft {background-color:rgba(129, 102, 238, 0.12); color:#8166EE;}
|
||||
#docList .btn {padding: 0 2px;}
|
||||
.btn.ajaxCollect {width: 20px; padding: 0 6px;}
|
||||
.btn.ajaxCollect > img {width: 20px;}
|
||||
|
||||
+29
-21
@@ -34,23 +34,22 @@
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class="cell<?php if($type == 'bySearch') echo ' show';?>" id="queryBox" data-module=<?php echo 'contributeDoc';?>></div>
|
||||
<form id='projectForm' class="main-table" method='post' data-ride='table' data-checkable='false'>
|
||||
<form id='docForm' class="main-table" method='post' data-ride='table'>
|
||||
<table class='table table-fixed' id='docList'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="c-id"><?php echo $lang->doc->id;?></th>
|
||||
<th class="c-name"><?php echo $lang->doc->title;?></th>
|
||||
<th class="c-name c-object"><?php echo $lang->doc->object;?></th>
|
||||
<th class="c-num"><?php echo $lang->doc->size;?></th>
|
||||
<th class="c-object"><?php echo $lang->doc->object;?></th>
|
||||
<?php if($type != 'openedbyme'):?>
|
||||
<th class="c-user"><?php echo $lang->doc->addedByAB;?></th>
|
||||
<?php endif;?>
|
||||
<th class="c-datetime"><?php echo $lang->doc->addedDate;?></th>
|
||||
<th class="c-date"><?php echo $lang->doc->addedDate;?></th>
|
||||
<?php if($type == 'openedbyme'):?>
|
||||
<th class="c-user"><?php echo $lang->doc->lastEditedBy;?></th>
|
||||
<th class="c-user"><?php echo $lang->doc->editedBy;?></th>
|
||||
<?php endif;?>
|
||||
<th class="c-datetime"><?php echo $lang->doc->editedDate;?></th>
|
||||
<th class="c-actions-3 text-center"><?php echo $lang->actions;?></th>
|
||||
<th class="c-date"><?php echo $lang->doc->editedDate;?></th>
|
||||
<th class="c-actions"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='docTableList'>
|
||||
@@ -59,29 +58,38 @@
|
||||
<?php $collectTitle = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
|
||||
<tr>
|
||||
<td class="c-id"><?php echo $doc->id;?></td>
|
||||
<td class="c-name"><?php echo html::a($this->createLink('doc', 'view', "docID=$doc->id&version=0&from={$lang->navGroup->doc}", '', true), "<i class='icon icon-file-text text-muted'></i> " . $doc->title, '', "title='{$doc->title}' class='iframe' data-width='90%'");?></td>
|
||||
<td class='c-name'>
|
||||
<?php if(!empty($doc->objectType)):?>
|
||||
<?php echo $lang->{$doc->objectType}->common . ' : ';?>
|
||||
<a title='<?php echo $doc->objectName;?>' href='<?php echo $this->createLink($doc->objectType, 'view', "objectID=$doc->objectID");?>' data-app="<?php echo $doc->objectType;?>">
|
||||
<?php echo $doc->objectName;?>
|
||||
</a>
|
||||
<?php endif;?>
|
||||
<td class="c-name" title='<?php echo $doc->title;?>'>
|
||||
<?php
|
||||
$docType = $doc->type == 'text' ? 'wiki-file' : $doc->type;
|
||||
$icon = html::image("static/svg/{$docType}.svg", "class='file-icon'");
|
||||
if(common::hasPriv('doc', 'view'))
|
||||
{
|
||||
echo html::a($this->createLink('doc', 'view', "docID=$doc->id"), $icon . $doc->title, '', "title='{$doc->title}' class='doc-title' data-app='doc'");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<span class='doc-title'>$icon {$doc->title}</span>";
|
||||
}
|
||||
?>
|
||||
<?php if($doc->status == 'draft') echo "<span class='label label-badge draft'>{$lang->doc->draft}</span>";?>
|
||||
<?php if(common::canBeChanged('doc', $doc) and common::hasPriv('doc', 'collect')):?>
|
||||
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><?php echo html::image("static/svg/{$star}.svg", "class='$star'");?></a>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td class="c-object" title='<?php echo $doc->objectName;?>'>
|
||||
<?php $objectIcon = zget($config->doc->objectIconList, $doc->objectType);?>
|
||||
<?php echo "<i class='icon $objectIcon'></i> " . $doc->objectName;?>
|
||||
</td>
|
||||
<td class="c-num"><?php echo $doc->fileSize ? $doc->fileSize : '-';?></td>
|
||||
<?php if($type != 'openedbyme'):?>
|
||||
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
|
||||
<?php endif;?>
|
||||
<td class="c-datetime"><?php echo formatTime($doc->addedDate, 'y-m-d');?></td>
|
||||
<td class="c-date"><?php echo formatTime($doc->addedDate, 'Y-m-d');?></td>
|
||||
<?php if($type == 'openedbyme'):?>
|
||||
<td class="c-user"><?php echo zget($users, $doc->editedBy);?></td>
|
||||
<?php endif;?>
|
||||
<td class="c-datetime"><?php echo formatTime($doc->editedDate, 'y-m-d');?></td>
|
||||
<td class="c-date"><?php echo formatTime($doc->editedDate, 'Y-m-d');?></td>
|
||||
<td class="c-actions">
|
||||
<?php if(common::canBeChanged('doc', $doc)):?>
|
||||
<?php if(common::hasPriv('doc', 'collect')):?>
|
||||
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><?php echo html::image("static/svg/{$star}.svg");?></a>
|
||||
<?php endif;?>
|
||||
<?php common::printLink('doc', 'edit', "docID=$doc->id&comment=false&from={$lang->navGroup->doc}", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link' data-app='doc'", true, false)?>
|
||||
<?php common::printLink('doc', 'delete', "docID=$doc->id&confirm=no&from={$lang->navGroup->doc}", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -415,7 +415,7 @@ class product extends control
|
||||
$methodName = $tab == 'program'? 'product' : 'browse';
|
||||
$param = $tab == 'program' ? "programID=$programID" : "productID=$productID";
|
||||
$locate = isonlybody() ? 'parent' : $this->createLink($moduleName, $methodName, $param);
|
||||
if($tab == 'doc') $locate = $this->createLink('doc', 'objectLibs', 'type=product');
|
||||
if($tab == 'doc') $locate = $this->createLink('doc', 'productSpace', "objectID=$productID");
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
|
||||
}
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ $config->project->noSprintPriv['story'] = array('create', 'batchCreate', 'e
|
||||
$config->project->noSprintPriv['bug'] = array('create', 'confirmBug', 'view', 'edit', 'assignTo', 'batchAssignTo', 'resolve', 'activate', 'close', 'export', 'confirmStoryChange', 'delete', 'linkBugs', 'import', 'showImport', 'exportTemplate');
|
||||
$config->project->noSprintPriv['testcase'] = array('groupCase', 'create', 'batchCreate', 'createBug', 'view', 'edit', 'delete', 'export', 'confirmChange', 'confirmStoryChange', 'batchEdit', 'batchDelete', 'linkCases', 'bugs', 'review', 'batchReview', 'batchConfirmStoryChange', 'importFromLib', 'batchCaseTypeChange', 'exportTemplate', 'import', 'showImport', 'confirmLibcaseChange', 'ignoreLibcaseChange', 'submit');
|
||||
$config->project->noSprintPriv['testtask'] = array('create', 'cases', 'groupCase', 'edit', 'delete', 'batchAssign', 'linkcase', 'unlinkcase', 'runcase', 'results', 'batchUnlinkCases', 'report', 'browseUnits', 'unitCases', 'importUnitResult', 'batchRun', 'runDeployCase', 'deployCaseResults');
|
||||
$config->project->noSprintPriv['doc'] = array('createLib', 'editLib', 'deleteLib', 'create', 'edit', 'delete', 'deleteFile', 'allLibs', 'objectLibs', 'collect', 'tableContents', 'showFiles', 'diff', 'manageBook', 'importToPracticeLib', 'importToComponentLib');
|
||||
$config->project->includedPriv['doc'] = array('createLib', 'editLib', 'deleteLib', 'create', 'edit', 'view', 'delete', 'deleteFile', 'collect', 'projectSpace', 'showFiles', 'addCatalog', 'editCatalog', 'deleteCatalog', 'displaySetting', 'diff', 'importToPracticeLib', 'importToComponentLib');
|
||||
$config->project->noSprintPriv['repo'] = array('create', 'showSyncCommit', 'browse', 'view', 'diff', 'log', 'revision', 'blame', 'download', 'apiGetRepoByUrl', 'review', 'addBug', 'editBug', 'deleteBug', 'addComment', 'editComment', 'deleteComment');
|
||||
$config->project->noSprintPriv['testreport'] = array('create', 'view', 'delete', 'edit', 'export');
|
||||
$config->project->noSprintPriv['auditplan'] = array('browse', 'create', 'edit', 'batchCreate', 'batchCheck', 'check', 'nc', 'result', 'assignTo');
|
||||
@@ -209,7 +209,7 @@ $config->project->includedPriv['story'] = array('create', 'batchCreate', 'e
|
||||
$config->project->includedPriv['bug'] = array('create', 'confirmBug', 'view', 'edit', 'assignTo', 'batchAssignTo', 'resolve', 'activate', 'close', 'export', 'confirmStoryChange', 'delete', 'linkBugs', 'import', 'showImport', 'exportTemplate');
|
||||
$config->project->includedPriv['testcase'] = array('groupCase', 'create', 'batchCreate', 'createBug', 'view', 'edit', 'delete', 'export', 'confirmChange', 'confirmStoryChange', 'batchEdit', 'batchDelete', 'linkCases', 'bugs', 'review', 'batchReview', 'batchConfirmStoryChange', 'importFromLib', 'batchCaseTypeChange', 'exportTemplate', 'import', 'showImport', 'confirmLibcaseChange', 'ignoreLibcaseChange', 'submit');
|
||||
$config->project->includedPriv['testtask'] = array('create', 'cases', 'groupCase', 'edit', 'delete', 'batchAssign', 'linkcase', 'unlinkcase', 'runcase', 'results', 'batchUnlinkCases', 'report', 'browseUnits', 'unitCases', 'importUnitResult', 'batchRun', 'runDeployCase', 'deployCaseResults');
|
||||
$config->project->includedPriv['doc'] = array('createLib', 'editLib', 'deleteLib', 'create', 'edit', 'delete', 'deleteFile', 'allLibs', 'objectLibs', 'collect', 'tableContents', 'showFiles', 'diff', 'manageBook', 'importToPracticeLib', 'importToComponentLib');
|
||||
$config->project->includedPriv['doc'] = array('createLib', 'editLib', 'deleteLib', 'create', 'edit', 'view', 'delete', 'deleteFile', 'collect', 'projectSpace', 'showFiles', 'addCatalog', 'editCatalog', 'deleteCatalog', 'displaySetting', 'diff', 'importToPracticeLib', 'importToComponentLib');
|
||||
$config->project->includedPriv['repo'] = array('create', 'showSyncCommit', 'browse', 'view', 'diff', 'log', 'revision', 'blame', 'download', 'apiGetRepoByUrl', 'review', 'addBug', 'deleteBug', 'addComment', 'editComment', 'deleteComment');
|
||||
$config->project->includedPriv['testreport'] = array('create', 'view', 'delete', 'edit', 'export');
|
||||
$config->project->includedPriv['auditplan'] = array('browse', 'create', 'edit', 'batchCreate', 'batchCheck', 'check', 'nc', 'result', 'assignTo');
|
||||
|
||||
Reference in New Issue
Block a user