From f68f9ed78f8ab08049e93f1d90c5e5fa82016cb5 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 18 May 2018 14:04:50 +0800 Subject: [PATCH 1/9] * adjust for batch edit cycle. --- module/todo/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/todo/model.php b/module/todo/model.php index a039e49f16..081eabbea2 100644 --- a/module/todo/model.php +++ b/module/todo/model.php @@ -219,7 +219,7 @@ class todoModel extends model $todo->type = $data->types[$todoID]; $todo->pri = $data->pris[$todoID]; $todo->status = $data->status[$todoID]; - $todo->name = $todo->type == 'custom' ? $data->names[$todoID] : ''; + $todo->name = ($todo->type == 'custom' or $todo->type == 'cycle') ? $data->names[$todoID] : ''; $todo->begin = $data->begins[$todoID]; $todo->end = $data->ends[$todoID]; if($todo->type == 'task') $todo->idvalue = isset($data->tasks[$todoID]) ? $data->tasks[$todoID] : 0; From 661ea692376064bd9b1c4d50978db59576145b16 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 18 May 2018 14:05:36 +0800 Subject: [PATCH 2/9] * adjust for zh-tw lang. --- module/bug/lang/zh-tw.php | 1 + module/common/lang/zh-tw.php | 6 +++--- module/doc/lang/zh-tw.php | 33 +++++++++++++++++---------------- module/my/lang/zh-tw.php | 1 + module/project/lang/zh-tw.php | 2 -- module/testcase/lang/zh-tw.php | 4 ++++ module/testtask/lang/zh-tw.php | 1 + module/upgrade/lang/zh-tw.php | 1 - 8 files changed, 27 insertions(+), 22 deletions(-) diff --git a/module/bug/lang/zh-tw.php b/module/bug/lang/zh-tw.php index 7d599b675f..34f048ba50 100644 --- a/module/bug/lang/zh-tw.php +++ b/module/bug/lang/zh-tw.php @@ -130,6 +130,7 @@ $lang->bug->ditto = '同上'; $lang->bug->dittoNotice = '該bug與上一bug不屬於同一產品!'; $lang->bug->noAssigned = '未指派'; $lang->bug->noBug = '暫時沒有BUG,您現在可以'; +$lang->bug->noModule = '
您現在還沒有模組信息
請維護測試模組
'; /* 頁面標籤。*/ $lang->bug->lblAssignedTo = '當前指派'; diff --git a/module/common/lang/zh-tw.php b/module/common/lang/zh-tw.php index 5a7cc78fcc..c75db1b433 100644 --- a/module/common/lang/zh-tw.php +++ b/module/common/lang/zh-tw.php @@ -243,8 +243,8 @@ $lang->project->subMenu->list->tree = '樹狀圖|project|tree|projectID=%s' $lang->project->subMenu->qa = new stdclass(); $lang->project->subMenu->qa->bug = 'Bug|project|bug|projectID=%s'; -$lang->project->subMenu->qa->build = '版本|project|build|projectID=%s'; -$lang->project->subMenu->qa->testtask = array('link' => '測試單|project|testtask|projectID=%s', 'subModule' => 'testreport'); +$lang->project->subMenu->qa->build = array('link' => '版本|project|build|projectID=%s', 'subModule' => 'build'); +$lang->project->subMenu->qa->testtask = array('link' => '測試單|project|testtask|projectID=%s', 'subModule' => 'testreport,testtask'); $lang->project->subMenu->action = new stdclass(); $lang->project->subMenu->action->dynamic = '動態|project|dynamic|projectID=%s'; @@ -345,7 +345,7 @@ $lang->company->menu = new stdclass(); $lang->company->menu->browseUser = array('link' => '用戶|company|browse', 'subModule' => 'user'); $lang->company->menu->dept = array('link' => '部門|dept|browse', 'subModule' => 'dept'); $lang->company->menu->browseGroup = array('link' => '權限|group|browse', 'subModule' => 'group'); -$lang->company->menu->view = array('link' => '公司|company|view', 'alias' => 'edit'); +$lang->company->menu->view = array('link' => '公司|company|view'); $lang->company->menu->dynamic = '動態|company|dynamic|'; $lang->dept = new stdclass(); diff --git a/module/doc/lang/zh-tw.php b/module/doc/lang/zh-tw.php index bdf0ba828a..baadd94729 100644 --- a/module/doc/lang/zh-tw.php +++ b/module/doc/lang/zh-tw.php @@ -60,20 +60,21 @@ $lang->doc->myDoc = '我的文檔'; $lang->doc->myCollection = '我的收藏'; /* 方法列表。*/ -$lang->doc->index = '文檔主頁'; -$lang->doc->create = '創建文檔'; -$lang->doc->edit = '編輯文檔'; -$lang->doc->delete = '刪除文檔'; -$lang->doc->browse = '文檔列表'; -$lang->doc->view = '文檔詳情'; -$lang->doc->diff = '對比'; -$lang->doc->sort = '排序'; -$lang->doc->manageType = '維護分類'; -$lang->doc->editType = '編輯分類'; -$lang->doc->deleteType = '刪除分類'; -$lang->doc->addType = '增加分類'; -$lang->doc->childType = '子分類'; -$lang->doc->collect = '收藏'; +$lang->doc->index = '文檔主頁'; +$lang->doc->create = '創建文檔'; +$lang->doc->edit = '編輯文檔'; +$lang->doc->delete = '刪除文檔'; +$lang->doc->browse = '文檔列表'; +$lang->doc->view = '文檔詳情'; +$lang->doc->diff = '對比'; +$lang->doc->sort = '排序'; +$lang->doc->manageType = '維護分類'; +$lang->doc->editType = '編輯分類'; +$lang->doc->deleteType = '刪除分類'; +$lang->doc->addType = '增加分類'; +$lang->doc->childType = '子分類'; +$lang->doc->collect = '收藏'; +$lang->doc->cancelCollection = '取消收藏'; $lang->doc->libName = '文檔庫名稱'; $lang->doc->libType = '文檔庫類型'; @@ -130,8 +131,8 @@ $lang->doc->fastMenuIconList['byediteddate'] = 'icon-folder-upload'; $lang->doc->fastMenuIconList['openedbyme'] = 'icon-folder-account'; $lang->doc->fastMenuIconList['collectedbyme'] = 'icon-folder-star'; -$lang->doc->customObjectLibs['files'] = '是否顯示附件庫'; -$lang->doc->customObjectLibs['customFiles'] = '是否顯示自定義檔案'; +$lang->doc->customObjectLibs['files'] = '顯示附件庫'; +$lang->doc->customObjectLibs['customFiles'] = '顯示自定義檔案'; $lang->doc->confirmDelete = "您確定刪除該文檔嗎?"; $lang->doc->confirmDeleteLib = "您確定刪除該文檔庫嗎?"; diff --git a/module/my/lang/zh-tw.php b/module/my/lang/zh-tw.php index 370471058c..1281336a6a 100644 --- a/module/my/lang/zh-tw.php +++ b/module/my/lang/zh-tw.php @@ -4,6 +4,7 @@ $lang->my->common = '我的地盤'; /* 方法列表。*/ $lang->my->index = '首頁'; $lang->my->todo = '我的待辦'; +$lang->my->calendar = '日程'; $lang->my->task = '我的任務'; $lang->my->bug = '我的Bug'; $lang->my->testTask = '我的版本'; diff --git a/module/project/lang/zh-tw.php b/module/project/lang/zh-tw.php index 9ccf7ec07d..306f83b5c0 100644 --- a/module/project/lang/zh-tw.php +++ b/module/project/lang/zh-tw.php @@ -41,7 +41,6 @@ $lang->project->whitelist = '分組白名單'; $lang->project->totalEstimate = '預計'; $lang->project->totalConsumed = '消耗'; $lang->project->totalLeft = '剩餘'; -$lang->project->Left = '剩餘'; $lang->project->progress = '進度'; $lang->project->hours = '預計 %s 消耗 %s 剩餘 %s'; $lang->project->viewBug = '查看bug'; @@ -117,7 +116,6 @@ $lang->project->latestDynamic = '最新動態'; $lang->project->build = '所有版本'; $lang->project->testtask = '測試任務'; $lang->project->burn = '燃盡圖'; -$lang->project->baseline = '基準綫'; $lang->project->computeBurn = '更新'; $lang->project->burnData = '燃盡圖數據'; $lang->project->fixFirst = '修改首天工時'; diff --git a/module/testcase/lang/zh-tw.php b/module/testcase/lang/zh-tw.php index 159cd1c16f..514f2a7b58 100644 --- a/module/testcase/lang/zh-tw.php +++ b/module/testcase/lang/zh-tw.php @@ -118,6 +118,7 @@ $lang->testcase->allCases = '所有'; $lang->testcase->allTestcases = '所有用例'; $lang->testcase->needConfirm = '需求變動'; $lang->testcase->bySearch = '搜索'; +$lang->testcase->unexecuted = '未執行'; $lang->testcase->lblStory = '相關需求'; $lang->testcase->lblLastEdited = '最後編輯'; @@ -131,6 +132,7 @@ $lang->testcase->legendLinkBugs = '相關Bug'; $lang->testcase->legendOpenAndEdit = '創建編輯'; $lang->testcase->legendComment = '備註'; +$lang->testcase->summary = "本頁共 %s 個用例,已執行%s個。"; $lang->testcase->confirmDelete = '您確認要刪除該測試用例嗎?'; $lang->testcase->confirmBatchDelete = '您確認要批量刪除這些測試用例嗎?'; $lang->testcase->ditto = '同上'; @@ -188,6 +190,8 @@ $lang->testcase->noFunction = '不存在iconv和mb_convert_encoding轉碼 $lang->testcase->noRequire = "%s行的“%s”是必填欄位,不能為空"; $lang->testcase->noLibrary = "現在還沒有公共庫,請先創建!"; $lang->testcase->mustChooseResult = '必須選擇評審結果'; +$lang->testcase->noModule = '
您現在還沒有模組信息
請維護測試模組
'; +$lang->testcase->noCase = '暫時沒有用例,您現在可以'; $lang->testcase->searchStories = '鍵入來搜索需求'; $lang->testcase->selectLib = '請選擇庫'; diff --git a/module/testtask/lang/zh-tw.php b/module/testtask/lang/zh-tw.php index ab9121a286..d183be945b 100644 --- a/module/testtask/lang/zh-tw.php +++ b/module/testtask/lang/zh-tw.php @@ -104,6 +104,7 @@ $lang->testtask->showFail = '失敗%s次'; $lang->testtask->confirmDelete = '您確認要刪除該版本嗎?'; $lang->testtask->confirmUnlinkCase = '您確認要移除該用例嗎?'; $lang->testtask->noticeNoOther = '該產品還沒有其他測試版本'; +$lang->testtask->noTesttask = '暫時沒有記錄,您現在可以'; $lang->testtask->assignedToMe = '指派給我'; $lang->testtask->allCases = '所有用例'; diff --git a/module/upgrade/lang/zh-tw.php b/module/upgrade/lang/zh-tw.php index e87c60bce7..33ea00bb72 100644 --- a/module/upgrade/lang/zh-tw.php +++ b/module/upgrade/lang/zh-tw.php @@ -135,4 +135,3 @@ $lang->upgrade->fromVersions['9_8'] = '9.8'; $lang->upgrade->fromVersions['9_8_1'] = '9.8.1'; $lang->upgrade->fromVersions['9_8_2'] = '9.8.2'; $lang->upgrade->fromVersions['9_8_3'] = '9.8.3'; -$lang->upgrade->fromVersions['10_0_beta'] = '10.0.beta'; From 71d60671f89eeab14dbb74a3de537a4feb6bd656 Mon Sep 17 00:00:00 2001 From: daitingting Date: Fri, 18 May 2018 14:12:19 +0800 Subject: [PATCH 3/9] * Remove contactListMenu when submit form. --- module/bug/model.php | 4 ++-- module/story/model.php | 4 ++-- module/task/model.php | 4 ++-- module/testtask/model.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index b256e038c6..c59d96aa25 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -71,7 +71,7 @@ class bugModel extends model ->cleanInt('product, module, severity') ->join('openedBuild', ',') ->join('mailto', ',') - ->remove('files, labels,uid,oldTaskID') + ->remove('files, labels,uid,oldTaskID,contactListMenu') ->get(); /* Check repeat bug. */ @@ -545,7 +545,7 @@ class bugModel extends model ->setIF($this->post->resolution == '' and $this->post->resolvedDate =='', 'status', 'active') ->setIF($this->post->resolution != '', 'confirmed', 1) ->setIF($this->post->story != false and $this->post->story != $oldBug->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story)) - ->remove('comment,files,labels,uid') + ->remove('comment,files,labels,uid,contactListMenu') ->get(); $bug = $this->loadModel('file')->processImgURL($bug, $this->config->bug->editor->edit['id'], $this->post->uid); diff --git a/module/story/model.php b/module/story/model.php index d4802a42a8..b5ed667e84 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -160,7 +160,7 @@ class storyModel extends model ->setIF($bugID > 0, 'fromBug', $bugID) ->join('mailto', ',') ->stripTags($this->config->story->editor->create['id'], $this->config->allowedTags) - ->remove('files,labels,needNotReview,newStory,uid') + ->remove('files,labels,needNotReview,newStory,uid,contactListMenu') ->get(); /* Check repeat story. */ @@ -492,7 +492,7 @@ class storyModel extends model ->setIF($this->post->closedReason != false and $this->post->closedBy == false, 'closedBy', $this->app->user->account) ->join('reviewedBy', ',') ->join('mailto', ',') - ->remove('linkStories,childStories,files,labels,comment') + ->remove('linkStories,childStories,files,labels,comment,contactListMenu') ->get(); if(isset($story->plan) and is_array($story->plan)) $story->plan = trim(join(',', $story->plan), ','); if(empty($_POST['product'])) $story->branch = $oldStory->branch; diff --git a/module/task/model.php b/module/task/model.php index 6ffadc363f..f382698a27 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -39,7 +39,7 @@ class taskModel extends model ->setDefault('openedDate', helper::now()) ->stripTags($this->config->task->editor->create['id'], $this->config->allowedTags) ->join('mailto', ',') - ->remove('after,files,labels,assignedTo,uid,storyEstimate,storyDesc,storyPri,team,teamEstimate,teamMember,multiple,teams') + ->remove('after,files,labels,assignedTo,uid,storyEstimate,storyDesc,storyPri,team,teamEstimate,teamMember,multiple,teams,contactListMenu') ->get(); foreach($this->post->assignedTo as $assignedTo) @@ -530,7 +530,7 @@ class taskModel extends model ->add('lastEditedDate', $now) ->stripTags($this->config->task->editor->edit['id'], $this->config->allowedTags) ->join('mailto', ',') - ->remove('comment,files,labels,uid,multiple,team,teamEstimate,teamConsumed,teamLeft') + ->remove('comment,files,labels,uid,multiple,team,teamEstimate,teamConsumed,teamLeft,contactListMenu') ->get(); if($task->consumed < $oldTask->consumed) die(js::error($this->lang->task->error->consumedSmall)); diff --git a/module/testtask/model.php b/module/testtask/model.php index 6cbe2fa05d..ba8d7d87f6 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -99,7 +99,7 @@ class testtaskModel extends model ->setDefault('build', '') ->stripTags($this->config->testtask->editor->create['id'], $this->config->allowedTags) ->join('mailto', ',') - ->remove('uid') + ->remove('uid,contactListMenu') ->get(); $task = $this->loadModel('file')->processImgURL($task, $this->config->testtask->editor->create['id'], $this->post->uid); From ac523f8883d40164c66f458dd1a86bcb05ccd593 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 18 May 2018 14:16:00 +0800 Subject: [PATCH 4/9] * adjust for testtask-cases page. --- module/testtask/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/testtask/model.php b/module/testtask/model.php index 6cbe2fa05d..4a896a6744 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -1222,8 +1222,8 @@ class testtaskModel extends model if(!helper::isZeroDate($run->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($run->lastRunDate)); break; case 'lastRunResult': - $lastRunResult = $run->lastRunResult ? $this->lang->testcase->resultList[$run->lastRunResult] : ''; - echo html::a(helper::createLink('testtask', 'results', "id=$run->id", '', true), " {$lastRunResult}", '', "class='iframe btn btn-icon-left'"); + $lastRunResultText = $run->lastRunResult ? zget($this->lang->testcase->resultList, $run->lastRunResult, $run->lastRunResult) : $this->lang->testcase->unexecuted; + echo html::a(helper::createLink('testtask', 'results', "id={$run->id}", '', true), " {$lastRunResultText}", '', "class='iframe btn btn-icon-left'"); break; case 'story': if($run->story and $run->storyTitle) echo html::a(helper::createLink('story', 'view', "storyID=$run->story"), $run->storyTitle); From 7ab90f9ee7fa2e8819bf67be9a69cfcbe20dd287 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 18 May 2018 14:20:04 +0800 Subject: [PATCH 5/9] * fix for page show. --- module/doc/view/alllibs.html.php | 2 +- module/doc/view/browse.html.php | 2 +- module/doc/view/browsebygrid.html.php | 2 +- module/doc/view/showfiles.html.php | 2 +- module/project/view/story.html.php | 2 +- module/testsuite/view/library.html.php | 2 +- module/testsuite/view/view.html.php | 2 +- module/testtask/view/cases.html.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/module/doc/view/alllibs.html.php b/module/doc/view/alllibs.html.php index d210d10c89..570063b3a0 100644 --- a/module/doc/view/alllibs.html.php +++ b/module/doc/view/alllibs.html.php @@ -54,7 +54,7 @@ - + diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php index 35ee155602..775473367e 100644 --- a/module/doc/view/browse.html.php +++ b/module/doc/view/browse.html.php @@ -94,7 +94,7 @@ var browseType = ''; - + diff --git a/module/doc/view/browsebygrid.html.php b/module/doc/view/browsebygrid.html.php index bc6a8059f5..128a4cce9e 100644 --- a/module/doc/view/browsebygrid.html.php +++ b/module/doc/view/browsebygrid.html.php @@ -43,6 +43,6 @@ - + diff --git a/module/doc/view/showfiles.html.php b/module/doc/view/showfiles.html.php index 89141c518a..79509e7d6e 100644 --- a/module/doc/view/showfiles.html.php +++ b/module/doc/view/showfiles.html.php @@ -143,7 +143,7 @@ - + diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index 773a384b16..32e1a6130e 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -239,7 +239,7 @@ } ?> - show('right', 'pagerjs');?> + show('right', 'pagerjs');?> diff --git a/module/testsuite/view/library.html.php b/module/testsuite/view/library.html.php index d4b0d9c40a..4ffe0fa790 100644 --- a/module/testsuite/view/library.html.php +++ b/module/testsuite/view/library.html.php @@ -243,7 +243,7 @@ js::set('flow', $this->config->global->flow); - show('right', 'pagerjs');?> + show('right', 'pagerjs');?> diff --git a/module/testsuite/view/view.html.php b/module/testsuite/view/view.html.php index 4868908f03..e97790704b 100644 --- a/module/testsuite/view/view.html.php +++ b/module/testsuite/view/view.html.php @@ -136,7 +136,7 @@ - show('right', 'pagerjs');?> + show('right', 'pagerjs');?> diff --git a/module/testtask/view/cases.html.php b/module/testtask/view/cases.html.php index 78d14432bb..a4f33f73df 100644 --- a/module/testtask/view/cases.html.php +++ b/module/testtask/view/cases.html.php @@ -126,7 +126,7 @@ ?> - show('right', 'pagerjs');?> + show('right', 'pagerjs');?> From f5a0cb33efac267cc0469a02c492fdd468b98b53 Mon Sep 17 00:00:00 2001 From: daitingting Date: Fri, 18 May 2018 14:25:45 +0800 Subject: [PATCH 6/9] * Remove unused field. --- db/update9.8.3.sql | 1 - db/zentao.sql | 1 - 2 files changed, 2 deletions(-) diff --git a/db/update9.8.3.sql b/db/update9.8.3.sql index 6c07ea7c58..bf3057b7ea 100644 --- a/db/update9.8.3.sql +++ b/db/update9.8.3.sql @@ -1,5 +1,4 @@ ALTER TABLE `zt_release` ADD `marker` enum('0','1') NOT NULL default '0' AFTER `name`; ALTER TABLE `zt_doc` ADD `collector` text NOT NULL AFTER `views`; -ALTER TABLE `zt_doc` ADD `visitedDate` datetime NOT NULL AFTER `editedDate`; ALTER TABLE `zt_doclib` ADD `collector` text NOT NULL AFTER `main`; ALTER TABLE `zt_module` ADD `collector` text NOT NULL AFTER `owner`; diff --git a/db/zentao.sql b/db/zentao.sql index 02571409ac..9322e1dfcf 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -260,7 +260,6 @@ CREATE TABLE IF NOT EXISTS `zt_doc` ( `addedDate` datetime NOT NULL, `editedBy` varchar(30) NOT NULL, `editedDate` datetime NOT NULL, - `visitedDate` datetime NOT NULL, `acl` varchar(10) NOT NULL DEFAULT 'open', `groups` varchar(255) NOT NULL, `users` text NOT NULL, From a51a4c48f149cb82a5aa0ff455966c853f9ae682 Mon Sep 17 00:00:00 2001 From: liugang Date: Fri, 18 May 2018 14:27:01 +0800 Subject: [PATCH 7/9] * Remove $mode == 'table'. --- module/bug/model.php | 3 ++- module/datatable/view/ajaxcustom.html.php | 3 ++- module/doc/view/index.html.php | 2 +- module/task/model.php | 3 ++- module/testcase/model.php | 3 ++- module/testtask/model.php | 14 +++++++------- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index c59d96aa25..b5142f775c 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2421,7 +2421,8 @@ class bugModel extends model switch($id) { case 'id': - if($mode == 'table' && $canBatchAction) + //if($mode == 'table' && $canBatchAction) + if($canBatchAction) { echo html::checkbox('bugIDList', array($bug->id => sprintf('%03d', $bug->id))); } diff --git a/module/datatable/view/ajaxcustom.html.php b/module/datatable/view/ajaxcustom.html.php index 4533254625..828b66e450 100644 --- a/module/datatable/view/ajaxcustom.html.php +++ b/module/datatable/view/ajaxcustom.html.php @@ -194,7 +194,8 @@ $(function() return sets; }).get(); - window.saveDatatableConfig('', setting, true, $('#global1').prop('checked') ? 1 : 0); + //window.saveDatatableConfig('', setting, true, $('#global1').prop('checked') ? 1 : 0); + window.saveDatatableConfig('', setting, true, $('#global1').prop('checked') ? 1 : 0); }); $('#resetBtn').on("click", function() diff --git a/module/doc/view/index.html.php b/module/doc/view/index.html.php index ff6ed7878b..b5bef4de04 100644 --- a/module/doc/view/index.html.php +++ b/module/doc/view/index.html.php @@ -170,7 +170,7 @@ - + id}");?>"> title;?> addedBy);?> editedDate) ? formatTime($doc->editedDate, 'm-d H:i') : formatTime($doc->addedDate, 'm-d H:i');?> diff --git a/module/task/model.php b/module/task/model.php index f382698a27..da7c337b14 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -2258,7 +2258,8 @@ class taskModel extends model switch($id) { case 'id': - if($mode == 'table' && $canBatchAction) + //if($mode == 'table' && $canBatchAction) + if($canBatchAction) { echo html::checkbox('taskIDList', array($task->id => sprintf('%03d', $task->id))); } diff --git a/module/testcase/model.php b/module/testcase/model.php index 71882ddbd1..821d10189d 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -1307,7 +1307,8 @@ class testcaseModel extends model switch($id) { case 'id': - echo $mode == 'table' ? html::checkbox('caseIDList', array($case->id => sprintf('%03d', $case->id))) : sprintf('%03d', $case->id); + //echo $mode == 'table' ? html::checkbox('caseIDList', array($case->id => sprintf('%03d', $case->id))) : sprintf('%03d', $case->id); + echo html::checkbox('caseIDList', array($case->id => sprintf('%03d', $case->id))); break; case 'pri': echo ""; diff --git a/module/testtask/model.php b/module/testtask/model.php index d46cdbc256..b5e62805e6 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -1156,14 +1156,14 @@ class testtaskModel extends model switch ($id) { case 'id': - if($mode == 'table') - { + //if($mode == 'table') + //{ echo html::checkbox('caseIDList', array($run->case => sprintf('%03d', $run->case))); - } - else - { - echo $canView ? html::a($caseLink, sprintf('%03d', $run->case)) : sprintf('%03d', $run->case); - } + //} + //else + //{ + // echo $canView ? html::a($caseLink, sprintf('%03d', $run->case)) : sprintf('%03d', $run->case); + //} break; case 'pri': echo ""; From 28a4814d89bc02fb707e7a2a564b10d143b439fc Mon Sep 17 00:00:00 2001 From: daitingting Date: Fri, 18 May 2018 14:31:49 +0800 Subject: [PATCH 8/9] * Adjust codes. --- module/doc/view/objectlibs.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/doc/view/objectlibs.html.php b/module/doc/view/objectlibs.html.php index ac65a7640b..48efa281e8 100644 --- a/module/doc/view/objectlibs.html.php +++ b/module/doc/view/objectlibs.html.php @@ -52,7 +52,7 @@ $lib):?> config->doc->custom->objectLibs, 'files') === false && $libID == 'files') continue;?> - config->doc->custom->objectLibs, 'customFiles') === false && !$lib->main) continue;?> + config->doc->custom->objectLibs, 'customFiles') === false && isset($lib->main) && !$lib->main) continue;?> id");?> From d256a684c02d5db3b0e628b5b78a4d3180998093 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 18 May 2018 14:39:29 +0800 Subject: [PATCH 9/9] * adjust for doc. --- module/doc/control.php | 8 ++++++++ module/doc/model.php | 7 ++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index d4514530e9..eda9360b5d 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -103,6 +103,8 @@ class doc extends control $this->lang->doc->menuOrder = $this->lang->product->menuOrder; $this->product->setMenu($this->product->getPairs(), $lib->product); $this->lang->set('menugroup.doc', 'product'); + + if(common::hasPriv('doc', 'create')) $this->lang->modulePageActions = html::a(helper::createLink('doc', 'create', "libID=$libID"), " " . $this->lang->doc->create, '', "class='btn btn-primary'"); } elseif($from == 'project') { @@ -110,6 +112,8 @@ class doc extends control $this->lang->doc->menuOrder = $this->lang->project->menuOrder; $this->project->setMenu($this->project->getPairs('nocode'), $lib->project); $this->lang->set('menugroup.doc', 'project'); + + if(common::hasPriv('doc', 'create')) $this->lang->modulePageActions = html::a(helper::createLink('doc', 'create', "libID=$libID"), " " . $this->lang->doc->create, '', "class='btn btn-primary'"); } else { @@ -296,6 +300,8 @@ class doc extends control $this->lang->doc->menuOrder = $this->lang->product->menuOrder; $this->product->setMenu($this->product->getPairs(), $lib->product); $this->lang->set('menugroup.doc', 'product'); + + if(common::hasPriv('doc', 'create')) $this->lang->modulePageActions = html::a(helper::createLink('doc', 'create', "libID=$libID"), " " . $this->lang->doc->create, '', "class='btn btn-primary'"); } elseif($this->from == 'project') { @@ -303,6 +309,8 @@ class doc extends control $this->lang->doc->menuOrder = $this->lang->project->menuOrder; $this->project->setMenu($this->project->getPairs('nocode'), $lib->project); $this->lang->set('menugroup.doc', 'project'); + + if(common::hasPriv('doc', 'create')) $this->lang->modulePageActions = html::a(helper::createLink('doc', 'create', "libID=$libID"), " " . $this->lang->doc->create, '', "class='btn btn-primary'"); } else { diff --git a/module/doc/model.php b/module/doc/model.php index 99076a23d7..8dccc428cd 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -159,16 +159,13 @@ class docModel extends model list($menuLabel, $module, $method, $vars) = explode('|', $menu['link']); $actions .= html::a(helper::createLink($module, $method, $vars), $menuLabel, '', "class='btn'"); } - } - } - $actions .= html::a(helper::createLink('doc', 'createLib'), " " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'"); - if($libID) $actions .= html::a(helper::createLink('doc', 'create', "libID=$libID"), " " . $this->lang->doc->create, '', "class='btn btn-primary'"); + $actions .= common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), " " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : ''; + if($libID and common::hasPriv('doc', 'create')) $actions .= html::a(helper::createLink('doc', 'create', "libID=$libID"), " " . $this->lang->doc->create, '', "class='btn btn-primary'"); $this->lang->modulePageActions = $actions; - } //$selectHtml .= $crumb ? $crumb : $this->getCrumbs($libID, $moduleID);