From 2c1fb2826b5fc65d0f8984085f3afc5340006a85 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 14 Apr 2023 15:31:41 +0800 Subject: [PATCH 1/4] * Code for story #43815. --- module/block/control.php | 5 ++ module/block/view/docviewlistblock.html.php | 51 +++++++++++++++++++++ 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 + 6 files changed, 60 insertions(+) diff --git a/module/block/control.php b/module/block/control.php index 040259e31f..288a1d2848 100755 --- a/module/block/control.php +++ b/module/block/control.php @@ -2119,6 +2119,11 @@ class block extends control */ public function printDocViewListBlock() { + /* Load pager. */ + $this->app->loadClass('pager', $static = true); + $pager = new pager(0, 6, 1); + + $this->view->docList = $this->loadModel('doc')->getMineList('view', 'all', 'views_desc', $pager); } /** diff --git a/module/block/view/docviewlistblock.html.php b/module/block/view/docviewlistblock.html.php index e69de29bb2..ba9f5a9645 100644 --- a/module/block/view/docviewlistblock.html.php +++ b/module/block/view/docviewlistblock.html.php @@ -0,0 +1,51 @@ + + * @package block + * @version $Id$ + * @link https://www.zentao.net + */ +?> + +
+ +

doc->noDoc;?>

+ +
+ + +
+ + createLink('doc', 'view', "docID=$doc->id"), $doc->title, '', "title='{$doc->title}' class='doc-title' data-app='{$this->app->tab}'"); + } + else + { + echo "$icon {$doc->title}"; + } + ?> +
+ doc->viewCount, $doc->views);?> +
+
+ + +
+ +
diff --git a/module/doc/lang/de.php b/module/doc/lang/de.php index e84bd12ab7..02799655cb 100644 --- a/module/doc/lang/de.php +++ b/module/doc/lang/de.php @@ -155,6 +155,7 @@ $lang->doc->todayUpdated = "Today's update"; $lang->doc->daysUpdated = 'Updated %s days ago'; $lang->doc->monthsUpdated = 'Updated %s months ago'; $lang->doc->yearsUpdated = 'Updated %s years ago'; +$lang->doc->viewCount = '%s Visits'; /* Methods list */ $lang->doc->index = 'Dashboard'; diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index c869e64820..fbf99bdd28 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -155,6 +155,7 @@ $lang->doc->todayUpdated = "Today's update"; $lang->doc->daysUpdated = 'Updated %s days ago'; $lang->doc->monthsUpdated = 'Updated %s months ago'; $lang->doc->yearsUpdated = 'Updated %s years ago'; +$lang->doc->viewCount = '%s Visits'; /* Methods list */ $lang->doc->index = 'Dashboard'; diff --git a/module/doc/lang/fr.php b/module/doc/lang/fr.php index 3ae37ca261..516e6b65a2 100644 --- a/module/doc/lang/fr.php +++ b/module/doc/lang/fr.php @@ -155,6 +155,7 @@ $lang->doc->todayUpdated = "Today's update"; $lang->doc->daysUpdated = 'Updated %s days ago'; $lang->doc->monthsUpdated = 'Updated %s months ago'; $lang->doc->yearsUpdated = 'Updated %s years ago'; +$lang->doc->viewCount = '%s Visits'; /* Methods list */ $lang->doc->index = 'Dashboard'; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index 4796fa3632..f687d1d1b3 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -155,6 +155,7 @@ $lang->doc->todayUpdated = '今天更新'; $lang->doc->daysUpdated = '%s天前更新'; $lang->doc->monthsUpdated = '%s月前更新'; $lang->doc->yearsUpdated = '%s年前更新'; +$lang->doc->viewCount = '%s次浏览'; /* 方法列表。*/ $lang->doc->index = '仪表盘'; From beffe827090726867e5fd3394159a0645627731a Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 14 Apr 2023 16:11:06 +0800 Subject: [PATCH 2/4] * Code for task #43816. --- module/block/control.php | 7 ++- .../block/view/doccollectlistblock.html.php | 51 +++++++++++++++++++ module/block/view/docviewlistblock.html.php | 4 +- 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 + 7 files changed, 63 insertions(+), 3 deletions(-) diff --git a/module/block/control.php b/module/block/control.php index 288a1d2848..2f9f3742b6 100755 --- a/module/block/control.php +++ b/module/block/control.php @@ -2123,7 +2123,7 @@ class block extends control $this->app->loadClass('pager', $static = true); $pager = new pager(0, 6, 1); - $this->view->docList = $this->loadModel('doc')->getMineList('view', 'all', 'views_desc', $pager); + $this->view->docList = $this->loadModel('doc')->getDocsByBrowseType('all', 0, 0,'views_desc', $pager); } /** @@ -2134,6 +2134,11 @@ class block extends control */ public function printDocCollectListBlock() { + /* Load pager. */ + $this->app->loadClass('pager', $static = true); + $pager = new pager(0, 6, 1); + + $this->view->docList = $this->loadModel('doc')->getDocsByBrowseType('all', 0, 0, 'collects_desc', $pager); } /** diff --git a/module/block/view/doccollectlistblock.html.php b/module/block/view/doccollectlistblock.html.php index e69de29bb2..6c966fc7c9 100644 --- a/module/block/view/doccollectlistblock.html.php +++ b/module/block/view/doccollectlistblock.html.php @@ -0,0 +1,51 @@ + + * @package block + * @version $Id$ + * @link https://www.zentao.net + */ +?> + +
+ +

doc->noDoc;?>

+ +
+ + +
+ + createLink('doc', 'view', "docID=$doc->id"), $doc->title, '', "title='{$doc->title}' class='doc-title' data-app='{$this->app->tab}'"); + } + else + { + echo "$icon {$doc->title}"; + } + ?> +
+ doc->collectCount, $doc->collects);?> +
+
+ + +
+ +
diff --git a/module/block/view/docviewlistblock.html.php b/module/block/view/docviewlistblock.html.php index ba9f5a9645..dfee048be2 100644 --- a/module/block/view/docviewlistblock.html.php +++ b/module/block/view/docviewlistblock.html.php @@ -12,8 +12,8 @@ ?>