From 7a2c83f5bce4b740d8b36e7bda27733185d54e68 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Thu, 18 Mar 2021 09:02:48 +0800 Subject: [PATCH] * Finish task #36760. --- module/block/control.php | 3 +- module/my/js/doc.js | 19 ++++++++++ module/my/view/doc.html.php | 73 +++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 module/my/js/doc.js create mode 100644 module/my/view/doc.html.php diff --git a/module/block/control.php b/module/block/control.php index 8388eca3f7..97b8c240ed 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -1687,7 +1687,8 @@ class block extends control $stmt = $this->dao->select('*')->from(TABLE_TODO) ->where("(assignedTo = '{$this->app->user->account}' or (account='{$this->app->user->account}'))") ->andWhere('cycle')->eq(0) - ->orderBy('`date`'); + ->andWhere('status')->eq('wait') + ->orderBy('`date` desc'); if(isset($params->todoNum)) $stmt->limit($params->todoNum); $todos = $stmt->fetchAll(); diff --git a/module/my/js/doc.js b/module/my/js/doc.js new file mode 100644 index 0000000000..ef9e5db6f3 --- /dev/null +++ b/module/my/js/doc.js @@ -0,0 +1,19 @@ +$('.ajaxCollect').click(function (event) { + var obj = $(this); + var url = obj.data('url'); + $.get(url, function(response) + { + if(response.status == 'yes') + { + obj.children('i').removeClass().addClass('icon icon-star text-yellow'); + obj.parent().prev().children('.file-name').children('i').remove('.icon'); + obj.parent().prev().children('.file-name').prepend(' '); + } + else + { + obj.children('i').removeClass().addClass('icon icon-star-empty'); + obj.parent().prev().children('.file-name').children('i').remove(".icon"); + } + }, 'json'); + return false; +}); diff --git a/module/my/view/doc.html.php b/module/my/view/doc.html.php new file mode 100644 index 0000000000..b584afeabd --- /dev/null +++ b/module/my/view/doc.html.php @@ -0,0 +1,73 @@ + + * @package my + * @version $Id + * @link http://www.zentao.net + */ +?> + + + +
+ +
+

+ project->empty;?> +

+
+ +
+ + + + + + + + + + + + + + collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> + collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?> + + + + + + + + + + +
doc->title;?>doc->size;?>doc->addedBy;?>doc->addedDate;?>doc->editedDate;?>actions;?>
createLink('doc', 'view', "docID=$doc->id&version=0&from={$lang->navGroup->doc}"), "  " . $doc->title, '', "title={$doc->title}");?>fileSize ? $doc->fileSize : '-';?>addedBy);?>addedDate, 'y-m-d');?>editedDate, 'y-m-d');?> + + + id&objectType=doc");?>" title="" class='btn btn-link ajaxCollect'> + + id&comment=false&from={$lang->navGroup->doc}", "", '', "title='{$lang->edit}' class='btn btn-link'")?> + id&confirm=no&from={$lang->navGroup->doc}", "", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?> + +
+ +
+ +
+