Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-04-02 12:33:20 +0300
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-04-02 13:24:48 +0300
commitb38445b17ad52e948c645ca8b98b06b0d18aa583 (patch)
tree7f3cbb8d98d73fbee18dc3b22c6ffed1a51c4033 /apps/comments/src
parent021751658e3999d834d34cc918771575fcf89bf9 (diff)
Show comments and restore in popover menu
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/comments/src')
-rw-r--r--apps/comments/src/filesplugin.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/comments/src/filesplugin.js b/apps/comments/src/filesplugin.js
index 939edc8c695..2073be09b69 100644
--- a/apps/comments/src/filesplugin.js
+++ b/apps/comments/src/filesplugin.js
@@ -29,7 +29,7 @@
*/
OCA.Comments.FilesPlugin = {
ignoreLists: [
- 'files_trashbin',
+ 'trashbin',
'files.public'
],
@@ -79,8 +79,18 @@
// register "comment" action for reading comments
fileList.fileActions.registerAction({
name: 'Comment',
- displayName: t('comments', 'Comment'),
+ displayName: function(context) {
+ if (context && context.$file) {
+ var unread = parseInt(context.$file.data('comments-unread'), 10)
+ if (unread >= 0) {
+ return n('comments', '1 new comment', '{unread} new comments', unread, { unread: unread })
+ }
+ }
+ return t('comments', 'Comment')
+ },
mime: 'all',
+ order: -140,
+ iconClass: 'icon-comment',
permissions: OC.PERMISSION_READ,
type: OCA.Files.FileActions.TYPE_INLINE,
render: function(actionSpec, isDefault, context) {