From 3a30a4e65afe9a17de4257c4c822fdf472f9ed91 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 7 Apr 2023 11:29:34 +0800 Subject: [PATCH] * Code for task #89910,89911. --- module/doc/css/myspace.css | 15 ++++++++++++++- module/doc/lang/de.php | 1 + module/doc/lang/en.php | 1 + module/doc/lang/fr.php | 1 + module/doc/lang/zh-cn.php | 1 + module/doc/model.php | 9 +++++++++ module/doc/view/doclist.html.php | 1 + module/doc/view/mydoclist.html.php | 18 ++++++++++++++---- module/tree/model.php | 11 ++++++----- 9 files changed, 48 insertions(+), 10 deletions(-) diff --git a/module/doc/css/myspace.css b/module/doc/css/myspace.css index 80cea2d24b..6b3cebabe7 100644 --- a/module/doc/css/myspace.css +++ b/module/doc/css/myspace.css @@ -1 +1,14 @@ -#mainContent .c-id > a {color: #0c60e1;} +.flex {display: flex;} +.flex-none {flex: none;} +.flex-auto {flex: auto;} +.flex-full > .panel {box-shadow: none;} +.float-r {float: right;} +.h-full {height: 100%;} +.w-full {width: 100%;} +.overflow-x-auto {overflow-x: auto;} +.overflow-auto {overflow: auto;} +.overflow-visible {overflow: visible;} +.overflow-hidden {overflow: hidden;} +#mainContent > .panel {margin-bottom: 0; height: calc(100vh - 125px); overflow-y: auto;} +#bysearchTab::before {display: none;} +#queryBox #groupAndOr {min-width: 60px;} diff --git a/module/doc/lang/de.php b/module/doc/lang/de.php index 64f72e1c3d..b20281b536 100644 --- a/module/doc/lang/de.php +++ b/module/doc/lang/de.php @@ -121,6 +121,7 @@ $lang->doc->nextStep = 'Next'; $lang->doc->closed = 'Closed'; $lang->doc->saveDraft = 'Save Draft'; $lang->doc->defaultSave = 'Default Save: '; +$lang->doc->position = 'Position'; $lang->doc->moduleDoc = 'Nach Modulen'; $lang->doc->searchDoc = 'Suche'; diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index b71dbc2647..c403e583af 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -121,6 +121,7 @@ $lang->doc->nextStep = 'Next'; $lang->doc->closed = 'Closed'; $lang->doc->saveDraft = 'Save Draft'; $lang->doc->defaultSave = 'Default Save: '; +$lang->doc->position = 'Position'; $lang->doc->moduleDoc = 'By Module'; $lang->doc->searchDoc = 'Search'; diff --git a/module/doc/lang/fr.php b/module/doc/lang/fr.php index 41026a545f..ea6192c4aa 100644 --- a/module/doc/lang/fr.php +++ b/module/doc/lang/fr.php @@ -121,6 +121,7 @@ $lang->doc->nextStep = 'Next'; $lang->doc->closed = 'Closed'; $lang->doc->saveDraft = 'Save Draft'; $lang->doc->defaultSave = 'Default Save: '; +$lang->doc->position = 'Position'; $lang->doc->moduleDoc = 'Par Module'; $lang->doc->searchDoc = 'Rechercher'; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index 4632983eef..d55bc43115 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -121,6 +121,7 @@ $lang->doc->nextStep = '下一步'; $lang->doc->closed = '已关闭'; $lang->doc->saveDraft = '存为草稿'; $lang->doc->defaultSave = '默认存入:'; +$lang->doc->position = '所在位置'; $lang->doc->moduleDoc = '按模块浏览'; $lang->doc->searchDoc = '搜索'; diff --git a/module/doc/model.php b/module/doc/model.php index 715100504c..5f7b40c066 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -484,9 +484,13 @@ class docModel extends model $docContents = $this->dao->select('*')->from(TABLE_DOCCONTENT)->where('doc')->in(array_keys($docs))->orderBy('version,doc')->fetchAll('doc'); + $modules = array(); $objects = array('product' => 'products', 'execution' => 'executions', 'project' => 'projects'); foreach($docs as $index => $doc) { + if(!isset($modules[$doc->lib])) $modules[$doc->lib] = $this->tree->getOptionMenu($doc->lib, 'doc', 0, 0, 'nodeleted', 'all', ' > '); + $doc->moduleName = zget($modules[$doc->lib], $doc->module); + $doc->moduleName = ltrim($doc->moduleName, '/'); foreach($objects as $type => $object) { if(!empty($doc->{$type})) @@ -1011,6 +1015,11 @@ class docModel extends model { $this->config->doc->search['params']['execution']['values'] = array('' => '') + $this->loadModel('execution')->getPairs($this->session->project, 'sprint,stage', 'multiple,leaf,noprefix') + array('all' => $this->lang->doc->allExecutions); } + elseif($type == 'mine') + { + unset($this->config->doc->search['fields']['addedBy']); + unset($this->config->doc->search['fields']['editedBy']); + } else { unset($this->config->doc->search['fields']['execution']); diff --git a/module/doc/view/doclist.html.php b/module/doc/view/doclist.html.php index 05c88973bb..62719df5f6 100644 --- a/module/doc/view/doclist.html.php +++ b/module/doc/view/doclist.html.php @@ -16,6 +16,7 @@ body {margin-bottom: 25px;} #docListForm th.c-user {width: 80px;} #docListForm th.c-actions {width: 84px; padding-left: 15px;} #docListForm .checkbox-primary {line-height: 16px;} +#docListForm table .checkbox-primary {top: -2px;} #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;} diff --git a/module/doc/view/mydoclist.html.php b/module/doc/view/mydoclist.html.php index b877953a20..5e2b984ee2 100644 --- a/module/doc/view/mydoclist.html.php +++ b/module/doc/view/mydoclist.html.php @@ -15,10 +15,10 @@ body {margin-bottom: 25px;} #docListForm th.c-id {width: 72px;} #docListForm th.c-user {width: 80px;} #docListForm th.c-actions {width: 84px; padding-left: 15px;} -#docListForm .checkbox-primary {line-height: 16px;} -#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;} +#docListForm .table .c-name > .doc-title {display: inline-block; max-width: 90%; overflow: hidden; background: transparent; padding-right:0px;} +#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.table > thead > tr {height: 32px;}