* Resolve issue #775.
This commit is contained in:
@@ -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|tablecontents|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);
|
||||
}
|
||||
|
||||
@@ -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,';
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
+36
-15
@@ -654,7 +654,7 @@ class doc extends control
|
||||
|
||||
if($from == 'lib')
|
||||
{
|
||||
$method = 'tableContents';
|
||||
$method = 'teamSpace';
|
||||
$objectID = 0;
|
||||
if($objectType == 'product')
|
||||
{
|
||||
@@ -671,7 +671,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);
|
||||
}
|
||||
}
|
||||
@@ -1197,20 +1196,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)
|
||||
@@ -1383,6 +1384,26 @@ class doc extends control
|
||||
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.
|
||||
*
|
||||
@@ -1411,13 +1432,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');
|
||||
|
||||
@@ -327,12 +327,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')
|
||||
{
|
||||
|
||||
@@ -648,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()
|
||||
@@ -668,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)
|
||||
@@ -2500,12 +2500,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>';
|
||||
}
|
||||
@@ -2577,11 +2577,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>';
|
||||
}
|
||||
@@ -2599,7 +2599,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}'");
|
||||
@@ -2623,7 +2623,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'))
|
||||
{
|
||||
|
||||
@@ -4183,7 +4183,7 @@ class execution extends control
|
||||
*/
|
||||
public function doc($executionID)
|
||||
{
|
||||
$this->locate($this->createLink('doc', 'tableContents', "type=execution&objectID=$executionID"));
|
||||
echo $this->fetch('doc', 'tableContents', "type=execution&objectID=$executionID");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
<div class="panel-title"><?php echo $lang->execution->doclib;?></div>
|
||||
<?php if(common::hasPriv('execution', 'doc')):?>
|
||||
<nav class="panel-actions nav nav-default">
|
||||
<li><?php common::printLink('doc', 'tableContents', "type=execution&executionID=$execution->id", 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>
|
||||
@@ -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', 'tableContents', "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';
|
||||
|
||||
Reference in New Issue
Block a user