* Code for task #36758.

This commit is contained in:
holan20180123
2021-03-18 08:26:17 +08:00
parent 782f967ab1
commit 68b8659197
15 changed files with 88 additions and 31 deletions
+6 -5
View File
@@ -312,12 +312,13 @@ $lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assignt
$lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
f($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->doc = 'Doc|my|contribute|mode=doc&type=openedbyme';
$lang->my->dividerMenu = ',myWork,score,';
+6 -5
View File
@@ -313,12 +313,13 @@ $lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assignt
$lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
if($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->doc = 'Doc|my|contribute|mode=doc&type=openedbyme';
$lang->my->dividerMenu = ',myWork,score,';
+6 -5
View File
@@ -312,12 +312,13 @@ $lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assignt
$lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
if($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->doc = 'Doc|my|contribute|mode=doc&type=openedbyme';
$lang->my->dividerMenu = ',myWork,score,';
+6 -5
View File
@@ -312,12 +312,13 @@ $lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assignt
$lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
if($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->doc = 'Doc|my|contribute|mode=doc&type=openedbyme';
$lang->my->dividerMenu = ',myProject,team,';
+6 -5
View File
@@ -313,12 +313,13 @@ $lang->my->workMenu->testcase = '用例|my|work|mode=testcase&type=assigntome
$lang->my->workMenu->testtask = '测试单|my|work|mode=testtask&type=wait';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = '任务|my|contribute|mode=task';
$lang->my->contributeMenu->task = '任务|my|contribute|mode=task';
if($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = '用例|my|contribute|mode=testcase&type=openedbyme';
$lang->my->contributeMenu->testtask = '测试单|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = '用例|my|contribute|mode=testcase&type=openedbyme';
$lang->my->contributeMenu->testtask = '测试单|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->doc = '文档|my|contribute|mode=doc&type=openedbyme';
$lang->my->dividerMenu = ',myWork,score,';
+5 -5
View File
@@ -567,10 +567,10 @@ class doc extends control
/**
* Delete file for doc.
*
* @param int $docID
* @param int $fileID
* @param string $confirm
*
* @param int $docID
* @param int $fileID
* @param string $confirm
* @access public
* @return void
*/
@@ -728,7 +728,7 @@ class doc extends control
}
/**
* Ajax get all child module.
* Ajax get all child module.
*
* @access public
* @return void
+1
View File
@@ -54,6 +54,7 @@ $lang->doc->searchDoc = '搜索';
$lang->doc->fast = '快速访问';
$lang->doc->allDoc = '所有文档';
$lang->doc->openedByMe = '由我创建';
$lang->doc->editedByMe = '由我编辑';
$lang->doc->orderByOpen = '最近添加';
$lang->doc->orderByEdit = '最近更新';
$lang->doc->orderByVisit = '最近访问';
+16
View File
@@ -356,6 +356,22 @@ class docModel extends model
->page($pager)
->fetchAll('id');
}
elseif($browseType == 'editedbyme')
{
$docIDList = $this->dao->select('objectID')->from(TABLE_ACTION)
->where('objectType')->eq('doc')
->andWhere('actor')->eq($this->app->user->account)
->fetchAll('objectID');
$docs = $this->dao->select('*')->from(TABLE_DOC)
->where('deleted')->eq(0)
->andWhere('id')->in(array_keys($docIDList))
->beginIF($libID)->andWhere('lib')->in($libID)->fi()
->andWhere('lib')->in($allLibs)
->beginIF($this->config->doc->notArticleType)->andWhere('type')->notIN($this->config->doc->notArticleType)->fi()
->orderBy($sort)
->page($pager)
->fetchAll('id');
}
elseif($browseType == 'byediteddate')
{
$docs = $this->dao->select('*')->from(TABLE_DOC)
+31
View File
@@ -476,6 +476,37 @@ class my extends control
$this->display();
}
public function doc($type = 'openedbyme', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session, load lang. */
if($this->app->viewType != 'json') $this->session->set('docList', $this->app->getURI(true));
$this->loadModel('doc');
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
/* Append id for secend sort. */
$sort = $this->loadModel('common')->appendOrder($orderBy);
$docs = $this->doc->getDocsByBrowseType(0, $type, 0, 0, $sort, $pager);
/* Assign. */
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->doc;
$this->view->position[] = $this->lang->my->doc;
$this->view->docs = $docs;
$this->view->users = $this->user->getPairs('noletter');
$this->view->type = $type;
$this->view->recTotal = $recTotal;
$this->view->recPerPage = $recPerPage;
$this->view->pageID = $pageID;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->display();
}
/**
* My projects.
*
+1
View File
@@ -14,6 +14,7 @@ $lang->my->bug = 'My Bugs';
$lang->my->testTask = 'My Builds';
$lang->my->testCase = 'My Cases';
$lang->my->story = 'My Stories';
$lang->my->doc = "My Docs";
$lang->my->createProgram = 'Create Program';
$lang->my->project = "My Projects";
$lang->my->execution = "My {$lang->executionCommon}s";
+1
View File
@@ -14,6 +14,7 @@ $lang->my->bug = 'My Bugs';
$lang->my->testTask = 'My Builds';
$lang->my->testCase = 'My Cases';
$lang->my->story = 'My Stories';
$lang->my->doc = "My Docs";
$lang->my->createProgram = 'Create Program';
$lang->my->project = "My Projects";
$lang->my->execution = "My {$lang->executionCommon}s";
+1
View File
@@ -14,6 +14,7 @@ $lang->my->bug = 'My Bugs';
$lang->my->testTask = 'My Builds';
$lang->my->testCase = 'My Cases';
$lang->my->story = 'My Stories';
$lang->my->doc = "My Docs";
$lang->my->createProgram = 'Create Program';
$lang->my->project = "My Projects";
$lang->my->execution = "My {$lang->executionCommon}s";
+1
View File
@@ -14,6 +14,7 @@ $lang->my->bug = 'My Bugs';
$lang->my->testTask = 'My Builds';
$lang->my->testCase = 'My Cases';
$lang->my->story = 'My Stories';
$lang->my->doc = "My Docs";
$lang->my->createProgram = 'Create Program';
$lang->my->project = "My Projects";
$lang->my->execution = "My {$lang->executionCommon}s";
+1
View File
@@ -14,6 +14,7 @@ $lang->my->bug = '我的Bug';
$lang->my->testTask = '我的版本';
$lang->my->testCase = '我的用例';
$lang->my->story = "我的{$lang->SRCommon}";
$lang->my->doc = "我的文档";
$lang->my->createProgram = '添加项目';
$lang->my->project = "我的项目";
$lang->my->execution = "我的{$lang->executionCommon}";
-1
View File
@@ -460,7 +460,6 @@ class task extends control
/* The tasks of my. */
else
{
$this->lang->navGroup->task = 'my';
$this->lang->task->menu = $this->lang->my->menu;
$this->lang->task->menuOrder = $this->lang->my->menuOrder;
$this->loadModel('my')->setMenu();