From ab6f0c3259a3ef9a9beae47d3656e3b6badc4c6d Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Fri, 14 Apr 2023 16:13:52 +0800 Subject: [PATCH 1/3] * Add collections for doc view. --- module/doc/css/view.css | 1 + module/doc/model.php | 3 ++- module/doc/view/content.html.php | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/module/doc/css/view.css b/module/doc/css/view.css index e407c46ccd..1c05f419c3 100644 --- a/module/doc/css/view.css +++ b/module/doc/css/view.css @@ -25,6 +25,7 @@ .article-content .info .keywords .label {padding-right:8px; padding-left:8px; color:#18A6FD; border-color:rgba(24, 166, 253, 0.25); height:22px; line-height:14px; margin-right:4px;} .article-content {width: 100%; display: inline-block;} +.article-content img {margin: 0;} .article-content.comment .comment-content {width: 94%;} #outlineMenu {max-width: 200px;} #outlineMenu .tree li > a {text-overflow: clip;} diff --git a/module/doc/model.php b/module/doc/model.php index b20f3b21ec..47ada227d2 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -3323,7 +3323,8 @@ class docModel extends model $actionGroup = $this->dao->select('*')->from(TABLE_DOCACTION)->where('doc')->in(array_keys($docs))->andWhere('action')->eq('collect')->fetchGroup('doc', 'actor'); foreach($docs as $docID => $doc) { - $doc->collector = ''; + $doc->collections = (int)$doc->collector; + $doc->collector = ''; if(isset($actionGroup[$docID])) $doc->collector = ',' . implode(',', array_keys($actionGroup[$docID])) . ','; } return $docs; diff --git a/module/doc/view/content.html.php b/module/doc/view/content.html.php index d525bb5d88..106a3bd768 100644 --- a/module/doc/view/content.html.php +++ b/module/doc/view/content.html.php @@ -74,7 +74,9 @@
addedBy) . " {$lang->colon} " . substr($doc->addedDate, 0, 10) . (common::checkNotCN() ? ' ' : '') . $lang->doc->createAB;?> - views;?> + + collections;?> + views;?> keywords):?> keywords as $keywords):?> From 159f6046198cb7b5b4d98de2091b43d5ca2d0b16 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Fri, 14 Apr 2023 16:16:24 +0800 Subject: [PATCH 2/3] * Remove unused code. --- module/doc/model.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/doc/model.php b/module/doc/model.php index ee12d76edd..60bea0d7c5 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -3323,7 +3323,6 @@ class docModel extends model $actionGroup = $this->dao->select('*')->from(TABLE_DOCACTION)->where('doc')->in(array_keys($docs))->andWhere('action')->eq('collect')->fetchGroup('doc', 'actor'); foreach($docs as $docID => $doc) { - $doc->collections = (int)$doc->collector; $doc->collector = ''; if(isset($actionGroup[$docID])) $doc->collector = ',' . implode(',', array_keys($actionGroup[$docID])) . ','; } From bb20772786f6fddd9a4941277de95f33286f045d Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Fri, 14 Apr 2023 16:17:32 +0800 Subject: [PATCH 3/3] * Modify data field. --- module/doc/view/content.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/doc/view/content.html.php b/module/doc/view/content.html.php index 106a3bd768..7332c8b3a4 100644 --- a/module/doc/view/content.html.php +++ b/module/doc/view/content.html.php @@ -74,8 +74,8 @@
addedBy) . " {$lang->colon} " . substr($doc->addedDate, 0, 10) . (common::checkNotCN() ? ' ' : '') . $lang->doc->createAB;?> - - collections;?> + + collects;?> views;?> keywords):?>