diff --git a/apps/common/mobile/lib/view/Collaboration.js b/apps/common/mobile/lib/view/Collaboration.js
index f8f57ca2c8..2034a0fb22 100644
--- a/apps/common/mobile/lib/view/Collaboration.js
+++ b/apps/common/mobile/lib/view/Collaboration.js
@@ -147,41 +147,52 @@ define([
},
renderComments: function (comments) {
- var $listComments = $('#comments-list'),
- items = [];
-
- _.each(comments, function (comment) {
- var itemTemplate = [
- '
'
- ].join('');
- items.push(_.template(itemTemplate)({
- android: Framework7.prototype.device.android,
- item: comment,
- replys: comment.replys.length
- }));
- });
-
- $listComments.html(items);
+ var $pageComments = $('.page-comments .page-content');
+ if (!comments) {
+ if ($('.comment').length > 0) {
+ $('.comment').remove();
+ }
+ var textNoComments = !!window.DE ? this.textNoDocumentComments : !!window.PE ? this.textNoPresentationComments : this.textNoSpreadsheetComments,
+ template = '';
+ $pageComments.append(_.template(template));
+ } else {
+ if ($('#no-comments').length > 0) {
+ $('#no-comments').remove();
+ }
+ var $listComments = $('#comments-list'),
+ items = [];
+ _.each(comments, function (comment) {
+ var itemTemplate = [
+ ''
+ ].join('');
+ items.push(_.template(itemTemplate)({
+ android: Framework7.prototype.device.android,
+ item: comment,
+ replys: comment.replys.length,
+ }));
+ });
+ $listComments.html(items);
+ }
},
@@ -198,7 +209,11 @@ define([
textFinal: 'Final',
textOriginal: 'Original',
textChange: 'Review Change',
- textEditUsers: 'Users'
+ textEditUsers: 'Users',
+ textNoDocumentComments: 'This document doesn\'t contain comments',
+ textNoSpreadsheetComments: 'This spreadsheet doesn\'t contain comments',
+ textNoPresentationComments: 'This presentation doesn\'t contain comments'
+
}
})(), Common.Views.Collaboration || {}))
diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json
index 3bea8bf468..8f4a796889 100644
--- a/apps/documenteditor/mobile/locale/en.json
+++ b/apps/documenteditor/mobile/locale/en.json
@@ -594,5 +594,6 @@
"Common.Views.Collaboration.textFinal": "Final",
"Common.Views.Collaboration.textOriginal": "Original",
"Common.Views.Collaboration.textChange": "Review Change",
- "Common.Views.Collaboration.textEditUsers": "Users"
+ "Common.Views.Collaboration.textEditUsers": "Users",
+ "Common.Views.Collaboration.textNoDocumentComments": "This document doesn\'t contain comments"
}
\ No newline at end of file
diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json
index 7a1efc21a4..63f6db4587 100644
--- a/apps/presentationeditor/mobile/locale/en.json
+++ b/apps/presentationeditor/mobile/locale/en.json
@@ -495,5 +495,6 @@
"Common.Views.Collaboration.textBack": "Back",
"Common.Views.Collaboration.textCollaboration": "Collaboration",
"Common.Views.Collaboration.textEditUsers": "Users",
- "Common.Views.Collaboration.textСomments": "Сomments"
+ "Common.Views.Collaboration.textСomments": "Сomments",
+ "Common.Views.Collaboration.textNoPresentationComments": "This presentation doesn\'t contain comments"
}
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json
index 9856ff885f..1a07d9b975 100644
--- a/apps/spreadsheeteditor/mobile/locale/en.json
+++ b/apps/spreadsheeteditor/mobile/locale/en.json
@@ -580,5 +580,6 @@
"Common.Views.Collaboration.textBack": "Back",
"Common.Views.Collaboration.textCollaboration": "Collaboration",
"Common.Views.Collaboration.textEditUsers": "Users",
- "Common.Views.Collaboration.textСomments": "Сomments"
+ "Common.Views.Collaboration.textСomments": "Сomments",
+ "Common.Views.Collaboration.textNoSpreadsheetComments": "This spreadsheet doesn\'t contain comments"
}
\ No newline at end of file