From 64d0ac3c6a83dfae30c06b90bd7536268a7a8557 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 11 Apr 2023 09:54:32 +0800 Subject: [PATCH 1/2] * Code for task #89912. --- module/doc/control.php | 20 +++++++++++++++----- module/doc/css/create.css | 1 + module/doc/css/edit.css | 1 + module/doc/lang/de.php | 2 +- module/doc/lang/en.php | 2 +- module/doc/lang/fr.php | 2 +- module/doc/view/createtexttype.html.php | 4 ++-- module/doc/view/editothertype.html.php | 2 +- module/doc/view/edittexttype.html.php | 2 +- module/doc/view/mydoclist.html.php | 1 + 10 files changed, 25 insertions(+), 12 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index 9f679bd385..296e3ab314 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -181,8 +181,6 @@ class doc extends control elseif($type == 'mine') { $acl = 'private'; - unset($this->lang->doclib->aclList['open']); - unset($this->lang->doclib->aclList['default']); $this->lang->doclib->aclList = $this->lang->doclib->mySpaceAclList['private']; } @@ -267,20 +265,28 @@ class doc extends control $this->view->object = $execution; } - if($lib->type == 'custom') unset($this->lang->doclib->aclList['default']); - if($lib->type == 'api') + if($lib->type == 'custom') + { + unset($this->lang->doclib->aclList['default']); + } + elseif($lib->type == 'api') { $this->app->loadLang('api'); $type = !empty($lib->product) ? 'product' : 'project'; $this->lang->api->aclList['default'] = sprintf($this->lang->api->aclList['default'], $this->lang->{$type}->common); } - if($lib->type != 'custom') + elseif($lib->type == 'mine') + { + $this->lang->doclib->aclList = $this->lang->doclib->mySpaceAclList['private']; + } + elseif($lib->type != 'custom') { $type = isset($type) ? $type : $lib->type; $this->lang->doclib->aclList['default'] = sprintf($this->lang->doclib->aclList['default'], $this->lang->{$type}->common); $this->lang->doclib->aclList['private'] = sprintf($this->lang->doclib->privateACL, $this->lang->{$type}->common); unset($this->lang->doclib->aclList['open']); } + if(!empty($lib->main)) unset($this->lang->doclib->aclList['private'], $this->lang->doclib->aclList['open']); $this->view->lib = $lib; @@ -594,6 +600,10 @@ class doc extends control { $objects = $this->loadModel('product')->getPairs(); } + elseif($objectType == 'mine') + { + $this->lang->doc->aclList = $this->lang->doclib->mySpaceAclList['private']; + } $moduleOptionMenu = $this->doc->getLibsOptionMenu($libs); $this->config->showMainMenu = strpos(',html,markdown,text,', ",{$doc->type},") === false; diff --git a/module/doc/css/create.css b/module/doc/css/create.css index 53c246b110..e19e12a218 100644 --- a/module/doc/css/create.css +++ b/module/doc/css/create.css @@ -1,3 +1,4 @@ +body {overflow: hidden;} .doc-title {width:400px;} .doc-title input {border: unset; font-size: 18px; font-weight: bold; color: #3c4353; padding-left: 16px;} .doc-title .form-control:focus {border: unset; box-shadow: unset;} diff --git a/module/doc/css/edit.css b/module/doc/css/edit.css index 8c7f6a87c8..fe41bdb93b 100644 --- a/module/doc/css/edit.css +++ b/module/doc/css/edit.css @@ -1,3 +1,4 @@ +body {overflow: hidden;} .doc-title {width:400px;} .doc-title input {border: unset; font-size: 18px; font-weight: bold; color: #3c4353; padding-left: 16px;} .doc-title .form-control:focus {border: unset; box-shadow: unset;} diff --git a/module/doc/lang/de.php b/module/doc/lang/de.php index 81cc79ad88..4b509ad6d0 100644 --- a/module/doc/lang/de.php +++ b/module/doc/lang/de.php @@ -77,7 +77,7 @@ $lang->doc->digest = 'Zusammenfassung'; $lang->doc->comment = 'Bemerkung'; $lang->doc->type = 'Typ'; $lang->doc->content = 'Text'; -$lang->doc->keywords = 'Tags'; +$lang->doc->keywords = 'Keywords'; $lang->doc->status = 'Status'; $lang->doc->url = 'URL'; $lang->doc->files = 'Datei'; diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index be7159fb3c..9d2e64c92a 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -77,7 +77,7 @@ $lang->doc->digest = 'Summary'; $lang->doc->comment = 'Comment'; $lang->doc->type = 'Type'; $lang->doc->content = 'Text'; -$lang->doc->keywords = 'Tags'; +$lang->doc->keywords = 'Keywords'; $lang->doc->status = 'Status'; $lang->doc->url = 'URL'; $lang->doc->files = 'Files'; diff --git a/module/doc/lang/fr.php b/module/doc/lang/fr.php index f1d21c4a78..004dfe78da 100644 --- a/module/doc/lang/fr.php +++ b/module/doc/lang/fr.php @@ -77,7 +77,7 @@ $lang->doc->digest = 'Résumé'; $lang->doc->comment = 'Commentaire'; $lang->doc->type = 'Type'; $lang->doc->content = 'Texte'; -$lang->doc->keywords = 'Tags'; +$lang->doc->keywords = 'Keywords'; $lang->doc->status = 'Status'; $lang->doc->url = 'URL'; $lang->doc->files = 'Fichiers'; diff --git a/module/doc/view/createtexttype.html.php b/module/doc/view/createtexttype.html.php index ff5d0a100c..225d86f946 100644 --- a/module/doc/view/createtexttype.html.php +++ b/module/doc/view/createtexttype.html.php @@ -60,7 +60,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/module/doc/view/editothertype.html.php b/module/doc/view/editothertype.html.php index 0928aff2a6..983e8586d1 100644 --- a/module/doc/view/editothertype.html.php +++ b/module/doc/view/editothertype.html.php @@ -35,7 +35,7 @@ - + diff --git a/module/doc/view/edittexttype.html.php b/module/doc/view/edittexttype.html.php index 272ce6ca7a..cc6e1f388a 100644 --- a/module/doc/view/edittexttype.html.php +++ b/module/doc/view/edittexttype.html.php @@ -74,7 +74,7 @@ - + diff --git a/module/doc/view/mydoclist.html.php b/module/doc/view/mydoclist.html.php index 47ac18cdde..dc09688d64 100644 --- a/module/doc/view/mydoclist.html.php +++ b/module/doc/view/mydoclist.html.php @@ -26,6 +26,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;}
doc->title?>
doc->libAndModule?>doc->libAndModule?>
doc->libAndModule?>doc->libAndModule?> lib . '_' . $doc->module, "class='form-control chosen'");?>
doc->libAndModule?>doc->libAndModule?> lib . '_' . $doc->module, "class='form-control picker-select'");?>