diff options
59 files changed, 196 insertions, 50 deletions
diff --git a/.eslintrc.json b/.eslintrc.json index 1adaa623..65d7602b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -121,7 +121,8 @@ "allowIsBoardAdmin": true, "allowIsBoardMember": true, "allowIsBoardMemberByCard": true, - "allowIsBoardMemberNonComment": true, + "allowIsBoardMemberCommentOnly": true, + "allowIsBoardMemberNoComments": true, "Emoji": true, "Checklists": true, "Settings": true, diff --git a/CHANGELOG.md b/CHANGELOG.md index e1a8e64e..9c1f62c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.40 2018-09-04 Wekan release + +This release adds the following new features: + +- [Add permission "No comments"](https://github.com/wekan/wekan/commit/77efcf71376d3da6c19ad1a4910567263e83c0ca). + It is like normal user, but [does not show comments and activities](https://github.com/wekan/wekan/issues/1861). + +Thanks to GitHub user xet7 for contributions. + # v1.39 2018-08-29 Wekan release This release fixes the following bugs: diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index 10828445..33d6d3b7 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -173,25 +173,28 @@ template(name="cardDetails") +attachmentsGalery hr - .activity-title - h3 {{ _ 'activity'}} - if currentUser.isBoardMember - .material-toggle-switch - span.toggle-switch-title {{_ 'hide-system-messages'}} - if hiddenSystemMessages - input.toggle-switch(type="checkbox" id="toggleButton" checked="checked") - else - input.toggle-switch(type="checkbox" id="toggleButton") - label.toggle-label(for="toggleButton") + unless currentUser.isNoComments + .activity-title + h3 {{ _ 'activity'}} + if currentUser.isBoardMember + .material-toggle-switch + span.toggle-switch-title {{_ 'hide-system-messages'}} + if hiddenSystemMessages + input.toggle-switch(type="checkbox" id="toggleButton" checked="checked") + else + input.toggle-switch(type="checkbox" id="toggleButton") + label.toggle-label(for="toggleButton") if currentUser.isBoardMember - +commentForm - if isLoaded.get - if isLinkedCard - +activities(card=this mode="linkedcard") - else if isLinkedBoard - +activities(card=this mode="linkedboard") - else - +activities(card=this mode="card") + unless currentUser.isNoComments + +commentForm + unless currentUser.isNoComments + if isLoaded.get + if isLinkedCard + +activities(card=this mode="linkedcard") + else if isLinkedBoard + +activities(card=this mode="linkedboard") + else + +activities(card=this mode="card") template(name="editCardTitleForm") textarea.js-edit-card-title(rows='1' autofocus) diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade index 37f537db..5c609802 100644 --- a/client/components/cards/minicard.jade +++ b/client/components/cards/minicard.jade @@ -65,10 +65,11 @@ template(name="minicard") +userAvatar(userId=this) .badges - if comments.count - .badge(title="{{_ 'card-comments-title' comments.count }}") - span.badge-icon.fa.fa-comment-o.badge-comment - span.badge-text= comments.count + unless currentUser.isNoComments + if comments.count + .badge(title="{{_ 'card-comments-title' comments.count }}") + span.badge-icon.fa.fa-comment-o.badge-comment + span.badge-text= comments.count if getDescription .badge.badge-state-image-only(title=getDescription) span.badge-icon.fa.fa-align-left diff --git a/client/components/sidebar/sidebar.jade b/client/components/sidebar/sidebar.jade index 6085c2ad..ec88ce7e 100644 --- a/client/components/sidebar/sidebar.jade +++ b/client/components/sidebar/sidebar.jade @@ -23,10 +23,11 @@ template(name='homeSidebar') hr +labelsWidget hr - h3 - i.fa.fa-comments-o - | {{_ 'activities'}} - +activities(mode="board") + unless currentUser.isNoComments + h3 + i.fa.fa-comments-o + | {{_ 'activities'}} + +activities(mode="board") template(name="membersWidget") .board-widget.board-widget-members @@ -146,6 +147,12 @@ template(name="changePermissionsPopup") i.fa.fa-check span.sub-name {{_ 'normal-desc'}} li + a(class="{{#if isLastAdmin}}disabled{{else}}js-set-no-comments{{/if}}") + | {{_ 'no-comments'}} + if isNoComments + i.fa.fa-check + span.sub-name {{_ 'no-comments-desc'}} + li a(class="{{#if isLastAdmin}}disabled{{else}}js-set-comment-only{{/if}}") | {{_ 'comment-only'}} if isCommentOnly diff --git a/client/components/sidebar/sidebar.js b/client/components/sidebar/sidebar.js index 5a9de74b..5d34c4a8 100644 --- a/client/components/sidebar/sidebar.js +++ b/client/components/sidebar/sidebar.js @@ -126,8 +126,11 @@ Template.memberPopup.helpers({ if(type === 'normal'){ const currentBoard = Boards.findOne(Session.get('currentBoard')); const commentOnly = currentBoard.hasCommentOnly(this.userId); + const noComments = currentBoard.hasNoComments(this.userId); if(commentOnly){ return TAPi18n.__('comment-only').toLowerCase(); + } else if(noComments) { + return TAPi18n.__('no-comments').toLowerCase(); } else { return TAPi18n.__(type).toLowerCase(); } @@ -324,12 +327,13 @@ BlazeComponent.extendComponent({ }).register('addMemberPopup'); Template.changePermissionsPopup.events({ - 'click .js-set-admin, click .js-set-normal, click .js-set-comment-only'(event) { + 'click .js-set-admin, click .js-set-normal, click .js-set-no-comments, click .js-set-comment-only'(event) { const currentBoard = Boards.findOne(Session.get('currentBoard')); const memberId = this.userId; const isAdmin = $(event.currentTarget).hasClass('js-set-admin'); const isCommentOnly = $(event.currentTarget).hasClass('js-set-comment-only'); - currentBoard.setMemberPermission(memberId, isAdmin, isCommentOnly); + const isNoComments = $(event.currentTarget).hasClass('js-set-no-comments'); + currentBoard.setMemberPermission(memberId, isAdmin, isNoComments, isCommentOnly); Popup.back(1); }, }); @@ -342,7 +346,12 @@ Template.changePermissionsPopup.helpers({ isNormal() { const currentBoard = Boards.findOne(Session.get('currentBoard')); - return !currentBoard.hasAdmin(this.userId) && !currentBoard.hasCommentOnly(this.userId); + return !currentBoard.hasAdmin(this.userId) && !currentBoard.hasNoComments(this.userId) && !currentBoard.hasCommentOnly(this.userId); + }, + + isNoComments() { + const currentBoard = Boards.findOne(Session.get('currentBoard')); + return !currentBoard.hasAdmin(this.userId) && currentBoard.hasNoComments(this.userId); }, isCommentOnly() { diff --git a/i18n/ar.i18n.json b/i18n/ar.i18n.json index 4b07b711..9af2581e 100644 --- a/i18n/ar.i18n.json +++ b/i18n/ar.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "أكتب تعليق", "comment-only": "التعليق فقط", "comment-only-desc": "يمكن التعليق على بطاقات فقط.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "حاسوب", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/bg.i18n.json b/i18n/bg.i18n.json index cb0618b4..b4ce62f0 100644 --- a/i18n/bg.i18n.json +++ b/i18n/bg.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Напиши коментар", "comment-only": "Само коментар", "comment-only-desc": "Може да коментира само в карти.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Компютър", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/br.i18n.json b/i18n/br.i18n.json index 8832efc9..f92f6fb4 100644 --- a/i18n/br.i18n.json +++ b/i18n/br.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/ca.i18n.json b/i18n/ca.i18n.json index 3c0fcd26..90344870 100644 --- a/i18n/ca.i18n.json +++ b/i18n/ca.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Escriu un comentari", "comment-only": "Només comentaris", "comment-only-desc": "Només pots fer comentaris a les fitxes", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Ordinador", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/cs.i18n.json b/i18n/cs.i18n.json index 09b1549e..fc0d93ea 100644 --- a/i18n/cs.i18n.json +++ b/i18n/cs.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Text komentáře", "comment-only": "Pouze komentáře", "comment-only-desc": "Může přidávat komentáře pouze do karet.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Počítač", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/de.i18n.json b/i18n/de.i18n.json index 9dd21129..3b9bbb1d 100644 --- a/i18n/de.i18n.json +++ b/i18n/de.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Kommentar schreiben", "comment-only": "Nur kommentierbar", "comment-only-desc": "Kann Karten nur Kommentieren", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Wollen Sie die Teilaufgabe wirklich löschen?", "confirm-checklist-delete-dialog": "Wollen Sie die Checkliste wirklich löschen?", diff --git a/i18n/el.i18n.json b/i18n/el.i18n.json index 56afc6e4..bf2500b3 100644 --- a/i18n/el.i18n.json +++ b/i18n/el.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Υπολογιστής", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/en-GB.i18n.json b/i18n/en-GB.i18n.json index 70d8f2d1..7e268f4a 100644 --- a/i18n/en-GB.i18n.json +++ b/i18n/en-GB.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index f4222c5b..689ed42d 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/eo.i18n.json b/i18n/eo.i18n.json index c8561488..a8e7001f 100644 --- a/i18n/eo.i18n.json +++ b/i18n/eo.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Komputilo", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/es-AR.i18n.json b/i18n/es-AR.i18n.json index b9a201ef..dd5946cd 100644 --- a/i18n/es-AR.i18n.json +++ b/i18n/es-AR.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Comentar", "comment-only": "Comentar solamente", "comment-only-desc": "Puede comentar en tarjetas solamente.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computadora", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/es.i18n.json b/i18n/es.i18n.json index 6088cab2..bd069493 100644 --- a/i18n/es.i18n.json +++ b/i18n/es.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Escribir comentario", "comment-only": "Sólo comentarios", "comment-only-desc": "Solo puedes comentar en las tarjetas.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "el ordenador", "confirm-subtask-delete-dialog": "¿Seguro que quieres eliminar la subtarea?", "confirm-checklist-delete-dialog": "¿Seguro que quieres eliminar la lista de verificación?", diff --git a/i18n/eu.i18n.json b/i18n/eu.i18n.json index 9e5b9957..ae0d904a 100644 --- a/i18n/eu.i18n.json +++ b/i18n/eu.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Idatzi iruzkin bat", "comment-only": "Iruzkinak besterik ez", "comment-only-desc": "Iruzkinak txarteletan soilik egin ditzake", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Ordenagailua", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/fa.i18n.json b/i18n/fa.i18n.json index 5a09e2dd..94ba2498 100644 --- a/i18n/fa.i18n.json +++ b/i18n/fa.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "درج نظر", "comment-only": "فقط نظر", "comment-only-desc": "فقط میتواند روی کارتها نظر دهد.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "رایانه", "confirm-subtask-delete-dialog": "از حذف این زیر وظیفه اطمینان دارید؟", "confirm-checklist-delete-dialog": "مطمئنا چک لیست پاک شود؟", diff --git a/i18n/fi.i18n.json b/i18n/fi.i18n.json index d02dae06..4de354aa 100644 --- a/i18n/fi.i18n.json +++ b/i18n/fi.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Kirjoita kommentti", "comment-only": "Vain kommentointi", "comment-only-desc": "Voi vain kommentoida kortteja", + "no-comments": "Ei kommentteja", + "no-comments-desc": "Ei voi nähdä kommentteja ja toimintaa.", "computer": "Tietokone", "confirm-subtask-delete-dialog": "Oletko varma että haluat poistaa alitehtävän?", "confirm-checklist-delete-dialog": "Oletko varma että haluat poistaa tarkistuslistan?", diff --git a/i18n/fr.i18n.json b/i18n/fr.i18n.json index 74b6034c..986fe230 100644 --- a/i18n/fr.i18n.json +++ b/i18n/fr.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Écrire un commentaire", "comment-only": "Commentaire uniquement", "comment-only-desc": "Ne peut que commenter des cartes.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Ordinateur", "confirm-subtask-delete-dialog": "Êtes-vous sûr de vouloir supprimer la sous-tâche ?", "confirm-checklist-delete-dialog": "Êtes-vous sûr de vouloir supprimer la checklist ?", diff --git a/i18n/gl.i18n.json b/i18n/gl.i18n.json index ab4cce62..47616c07 100644 --- a/i18n/gl.i18n.json +++ b/i18n/gl.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Escribir un comentario", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computador", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/he.i18n.json b/i18n/he.i18n.json index 021e8095..b88991ed 100644 --- a/i18n/he.i18n.json +++ b/i18n/he.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "כתיבת הערה", "comment-only": "הערה בלבד", "comment-only-desc": "ניתן להעיר על כרטיסים בלבד.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "מחשב", "confirm-subtask-delete-dialog": "האם למחוק את תת המשימה?", "confirm-checklist-delete-dialog": "האם אתה בטוח שברצונך למחוק את רשימת המשימות?", diff --git a/i18n/hu.i18n.json b/i18n/hu.i18n.json index 2e886104..270f1754 100644 --- a/i18n/hu.i18n.json +++ b/i18n/hu.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Megjegyzés írása", "comment-only": "Csak megjegyzés", "comment-only-desc": "Csak megjegyzést írhat a kártyákhoz.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Számítógép", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/hy.i18n.json b/i18n/hy.i18n.json index 2161be39..da4584dd 100644 --- a/i18n/hy.i18n.json +++ b/i18n/hy.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/id.i18n.json b/i18n/id.i18n.json index f273ccf4..94c9ad79 100644 --- a/i18n/id.i18n.json +++ b/i18n/id.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Hanya komentar", "comment-only-desc": "Bisa komen hanya di kartu", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Komputer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/ig.i18n.json b/i18n/ig.i18n.json index 07f1a824..16ddfea4 100644 --- a/i18n/ig.i18n.json +++ b/i18n/ig.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/it.i18n.json b/i18n/it.i18n.json index 9447819c..ceed7d7a 100644 --- a/i18n/it.i18n.json +++ b/i18n/it.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Scrivi Commento", "comment-only": "Solo commenti", "comment-only-desc": "Puoi commentare solo le schede.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Sei sicuro di voler eliminare il sotto-compito?", "confirm-checklist-delete-dialog": "Sei sicuro di voler eliminare la checklist?", diff --git a/i18n/ja.i18n.json b/i18n/ja.i18n.json index 67207dbc..fc1b8ace 100644 --- a/i18n/ja.i18n.json +++ b/i18n/ja.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "コメントを書く", "comment-only": "コメントのみ", "comment-only-desc": "カードにのみコメント可能", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "コンピューター", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/ka.i18n.json b/i18n/ka.i18n.json index 2b3db17d..02d70a38 100644 --- a/i18n/ka.i18n.json +++ b/i18n/ka.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "დაწერეთ კომენტარი", "comment-only": "მხოლოდ კომენტარები", "comment-only-desc": "თქვენ შეგიძლიათ კომენტარის გაკეთება მხოლოდ ბარათებზე.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "კომპიუტერი", "confirm-subtask-delete-dialog": "დარწმუნებული ხართ, რომ გსურთ ქვესაქმიანობის წაშლა? ", "confirm-checklist-delete-dialog": "დარწმუნებული ხართ, რომ გსურთ კატალოგის წაშლა ? ", diff --git a/i18n/km.i18n.json b/i18n/km.i18n.json index dc1e01bf..013e1b46 100644 --- a/i18n/km.i18n.json +++ b/i18n/km.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/ko.i18n.json b/i18n/ko.i18n.json index e1f24f2a..36de4299 100644 --- a/i18n/ko.i18n.json +++ b/i18n/ko.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "댓글 입력", "comment-only": "댓글만 입력 가능", "comment-only-desc": "카드에 댓글만 달수 있습니다.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "내 컴퓨터", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/lv.i18n.json b/i18n/lv.i18n.json index 0dd99237..061b9c14 100644 --- a/i18n/lv.i18n.json +++ b/i18n/lv.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/mn.i18n.json b/i18n/mn.i18n.json index bb4048c8..f2478d17 100644 --- a/i18n/mn.i18n.json +++ b/i18n/mn.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/nb.i18n.json b/i18n/nb.i18n.json index edeb9e1f..b479ee48 100644 --- a/i18n/nb.i18n.json +++ b/i18n/nb.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/nl.i18n.json b/i18n/nl.i18n.json index 966d09c0..58d65723 100644 --- a/i18n/nl.i18n.json +++ b/i18n/nl.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Schrijf reactie", "comment-only": "Alleen reageren", "comment-only-desc": "Kan alleen op kaarten reageren.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/pl.i18n.json b/i18n/pl.i18n.json index cb29eb66..086dd348 100644 --- a/i18n/pl.i18n.json +++ b/i18n/pl.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Dodaj komentarz", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Komputer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/pt-BR.i18n.json b/i18n/pt-BR.i18n.json index 288dc70b..0176fb6a 100644 --- a/i18n/pt-BR.i18n.json +++ b/i18n/pt-BR.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Escrever Comentário", "comment-only": "Somente comentários", "comment-only-desc": "Pode comentar apenas em cartões.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computador", "confirm-subtask-delete-dialog": "Tem certeza que deseja deletar a subtarefa?", "confirm-checklist-delete-dialog": "Tem certeza que quer deletar o checklist?", diff --git a/i18n/pt.i18n.json b/i18n/pt.i18n.json index 46073e81..954f7654 100644 --- a/i18n/pt.i18n.json +++ b/i18n/pt.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computador", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/ro.i18n.json b/i18n/ro.i18n.json index 79230bcb..e70aeaf3 100644 --- a/i18n/ro.i18n.json +++ b/i18n/ro.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/ru.i18n.json b/i18n/ru.i18n.json index 967fb426..980c0816 100644 --- a/i18n/ru.i18n.json +++ b/i18n/ru.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Написать комментарий", "comment-only": "Только комментирование", "comment-only-desc": "Может комментировать только карточки.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Загрузить с компьютера", "confirm-subtask-delete-dialog": "Вы уверены, что хотите удалить подзадачу?", "confirm-checklist-delete-dialog": "Вы уверены, что хотите удалить чеклист?", diff --git a/i18n/sr.i18n.json b/i18n/sr.i18n.json index f94b5240..395fd05c 100644 --- a/i18n/sr.i18n.json +++ b/i18n/sr.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/sv.i18n.json b/i18n/sv.i18n.json index 9be9b46a..efd18987 100644 --- a/i18n/sv.i18n.json +++ b/i18n/sv.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Skriv kommentar", "comment-only": "Kommentera endast", "comment-only-desc": "Kan endast kommentera kort.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Dator", "confirm-subtask-delete-dialog": "Är du säker på att du vill radera deluppgift?", "confirm-checklist-delete-dialog": "Är du säker på att du vill radera checklista?", diff --git a/i18n/ta.i18n.json b/i18n/ta.i18n.json index dfc9eed1..006fa2df 100644 --- a/i18n/ta.i18n.json +++ b/i18n/ta.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/th.i18n.json b/i18n/th.i18n.json index ff2b20e3..1c2e3ecf 100644 --- a/i18n/th.i18n.json +++ b/i18n/th.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "คอมพิวเตอร์", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/tr.i18n.json b/i18n/tr.i18n.json index cfc46a29..382c7b2c 100644 --- a/i18n/tr.i18n.json +++ b/i18n/tr.i18n.json @@ -50,7 +50,7 @@ "add-board": "Pano Ekle", "add-card": "Kart Ekle", "add-swimlane": "Kulvar Ekle", - "add-subtask": "Add Subtask", + "add-subtask": "Alt Görev Ekle", "add-checklist": "Yapılacak Listesi Ekle", "add-checklist-item": "Yapılacak listesine yeni bir öğe ekle", "add-cover": "Kapak resmi ekle", @@ -103,7 +103,7 @@ "boardMenuPopup-title": "Pano menüsü", "boards": "Panolar", "board-view": "Pano Görünümü", - "board-view-cal": "Calendar", + "board-view-cal": "Takvim", "board-view-swimlanes": "Kulvarlar", "board-view-lists": "Listeler", "bucket-example": "Örn: \"Marketten Alacaklarım\"", @@ -149,7 +149,7 @@ "changePasswordPopup-title": "Parola Değiştir", "changePermissionsPopup-title": "Yetkileri Değiştirme", "changeSettingsPopup-title": "Ayarları değiştir", - "subtasks": "Subtasks", + "subtasks": "Alt Görevler", "checklists": "Yapılacak Listeleri", "click-to-star": "Bu panoyu yıldızlamak için tıkla.", "click-to-unstar": "Bu panunun yıldızını kaldırmak için tıkla.", @@ -171,6 +171,8 @@ "comment-placeholder": "Yorum Yaz", "comment-only": "Sadece yorum", "comment-only-desc": "Sadece kartlara yorum yazabilir.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Bilgisayar", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", @@ -267,7 +269,7 @@ "headerBarCreateBoardPopup-title": "Pano Oluşturma", "home": "Ana Sayfa", "import": "İçeri aktar", - "link": "Link", + "link": "Bağlantı", "import-board": "panoyu içe aktar", "import-board-c": "Panoyu içe aktar", "import-board-title-trello": "Trello'dan panoyu içeri aktar", @@ -483,15 +485,15 @@ "card-end-on": "Bitiş zamanı", "editCardReceivedDatePopup-title": "Giriş tarihini değiştir", "editCardEndDatePopup-title": "Bitiş tarihini değiştir", - "assigned-by": "Assigned By", - "requested-by": "Requested By", + "assigned-by": "Atamayı yapan", + "requested-by": "Talep Eden", "board-delete-notice": "Deleting is permanent. You will lose all lists, cards and actions associated with this board.", "delete-board-confirm-popup": "All lists, cards, labels, and activities will be deleted and you won't be able to recover the board contents. There is no undo.", "boardDeletePopup-title": "Delete Board?", "delete-board": "Delete Board", "default-subtasks-board": "Subtasks for __board__ board", - "default": "Default", - "queue": "Queue", + "default": "Varsayılan", + "queue": "Sıra", "subtask-settings": "Subtasks Settings", "boardSubtaskSettingsPopup-title": "Board Subtasks Settings", "show-subtasks-field": "Cards can have subtasks", diff --git a/i18n/uk.i18n.json b/i18n/uk.i18n.json index 4d1a60f6..8aa2c694 100644 --- a/i18n/uk.i18n.json +++ b/i18n/uk.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/vi.i18n.json b/i18n/vi.i18n.json index 120b2a92..7dabc338 100644 --- a/i18n/vi.i18n.json +++ b/i18n/vi.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "Write Comment", "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "Computer", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/i18n/zh-CN.i18n.json b/i18n/zh-CN.i18n.json index bdb9e0e0..d663bb82 100644 --- a/i18n/zh-CN.i18n.json +++ b/i18n/zh-CN.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "添加评论", "comment-only": "仅能评论", "comment-only-desc": "只能在卡片上评论。", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "从本机上传", "confirm-subtask-delete-dialog": "确定要删除子任务吗?", "confirm-checklist-delete-dialog": "确定要删除清单吗?", diff --git a/i18n/zh-TW.i18n.json b/i18n/zh-TW.i18n.json index 8926b779..6a60d8b7 100644 --- a/i18n/zh-TW.i18n.json +++ b/i18n/zh-TW.i18n.json @@ -171,6 +171,8 @@ "comment-placeholder": "新增評論", "comment-only": "只可以發表評論", "comment-only-desc": "只可以對卡片發表評論", + "no-comments": "No comments", + "no-comments-desc": "Can not see comments and activities.", "computer": "從本機上傳", "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", diff --git a/models/boards.js b/models/boards.js index a017eb3f..71049bd9 100644 --- a/models/boards.js +++ b/models/boards.js @@ -110,6 +110,7 @@ Boards.attachSchema(new SimpleSchema({ userId: this.userId, isAdmin: true, isActive: true, + isNoComments: false, isCommentOnly: false, }]; } @@ -124,6 +125,9 @@ Boards.attachSchema(new SimpleSchema({ 'members.$.isActive': { type: Boolean, }, + 'members.$.isNoComments': { + type: Boolean, + }, 'members.$.isCommentOnly': { type: Boolean, }, @@ -292,6 +296,10 @@ Boards.helpers({ return !!_.findWhere(this.members, { userId: memberId, isActive: true, isAdmin: true }); }, + hasNoComments(memberId) { + return !!_.findWhere(this.members, { userId: memberId, isActive: true, isAdmin: false, isNoComments: true }); + }, + hasCommentOnly(memberId) { return !!_.findWhere(this.members, { userId: memberId, isActive: true, isAdmin: false, isCommentOnly: true }); }, @@ -501,6 +509,7 @@ Boards.mutations({ userId: memberId, isAdmin: false, isActive: true, + isNoComments: false, isCommentOnly: false, }, }, @@ -528,7 +537,7 @@ Boards.mutations({ }; }, - setMemberPermission(memberId, isAdmin, isCommentOnly) { + setMemberPermission(memberId, isAdmin, isNoComments, isCommentOnly) { const memberIndex = this.memberIndex(memberId); // do not allow change permission of self @@ -539,6 +548,7 @@ Boards.mutations({ return { $set: { [`members.${memberIndex}.isAdmin`]: isAdmin, + [`members.${memberIndex}.isNoComments`]: isNoComments, [`members.${memberIndex}.isCommentOnly`]: isCommentOnly, }, }; @@ -838,6 +848,7 @@ if (Meteor.isServer) { userId: req.body.owner, isAdmin: true, isActive: true, + isNoComments: false, isCommentOnly: false, }, ], diff --git a/models/lists.js b/models/lists.js index 6f6996cb..9bcb9ba1 100644 --- a/models/lists.js +++ b/models/lists.js @@ -63,13 +63,13 @@ Lists.attachSchema(new SimpleSchema({ Lists.allow({ insert(userId, doc) { - return allowIsBoardMemberNonComment(userId, Boards.findOne(doc.boardId)); + return allowIsBoardMemberCommentOnly(userId, Boards.findOne(doc.boardId)); }, update(userId, doc) { - return allowIsBoardMemberNonComment(userId, Boards.findOne(doc.boardId)); + return allowIsBoardMemberCommentOnly(userId, Boards.findOne(doc.boardId)); }, remove(userId, doc) { - return allowIsBoardMemberNonComment(userId, Boards.findOne(doc.boardId)); + return allowIsBoardMemberCommentOnly(userId, Boards.findOne(doc.boardId)); }, fetch: ['boardId'], }); diff --git a/models/swimlanes.js b/models/swimlanes.js index 72ef3f36..3559bcd2 100644 --- a/models/swimlanes.js +++ b/models/swimlanes.js @@ -46,13 +46,13 @@ Swimlanes.attachSchema(new SimpleSchema({ Swimlanes.allow({ insert(userId, doc) { - return allowIsBoardMemberNonComment(userId, Boards.findOne(doc.boardId)); + return allowIsBoardMemberCommentOnly(userId, Boards.findOne(doc.boardId)); }, update(userId, doc) { - return allowIsBoardMemberNonComment(userId, Boards.findOne(doc.boardId)); + return allowIsBoardMemberCommentOnly(userId, Boards.findOne(doc.boardId)); }, remove(userId, doc) { - return allowIsBoardMemberNonComment(userId, Boards.findOne(doc.boardId)); + return allowIsBoardMemberCommentOnly(userId, Boards.findOne(doc.boardId)); }, fetch: ['boardId'], }); diff --git a/models/users.js b/models/users.js index 1b1b79e1..01673e4f 100644 --- a/models/users.js +++ b/models/users.js @@ -151,6 +151,16 @@ if (Meteor.isClient) { return board && board.hasMember(this._id); }, + isNotNoComments() { + const board = Boards.findOne(Session.get('currentBoard')); + return board && board.hasMember(this._id) && !board.hasNoComments(this._id); + }, + + isNoComments() { + const board = Boards.findOne(Session.get('currentBoard')); + return board && board.hasNoComments(this._id); + }, + isNotCommentOnly() { const board = Boards.findOne(Session.get('currentBoard')); return board && board.hasMember(this._id) && !board.hasCommentOnly(this._id); diff --git a/package.json b/package.json index 64bbf3e5..61908837 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wekan", - "version": "1.39.0", + "version": "1.40.0", "description": "The open-source kanban", "private": true, "scripts": { diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp index f143377b..1dcd6c42 100644 --- a/sandstorm-pkgdef.capnp +++ b/sandstorm-pkgdef.capnp @@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = ( appTitle = (defaultText = "Wekan"), # The name of the app as it is displayed to the user. - appVersion = 124, + appVersion = 125, # Increment this for every release. - appMarketingVersion = (defaultText = "1.39.0~2018-08-29"), + appMarketingVersion = (defaultText = "1.40.0~2018-09-04"), # Human-readable presentation of the app version. minUpgradableAppVersion = 0, diff --git a/sandstorm.js b/sandstorm.js index d34bc015..37dced92 100644 --- a/sandstorm.js +++ b/sandstorm.js @@ -208,7 +208,8 @@ if (isSandstorm && Meteor.isServer) { const isActive = permissions.indexOf('participate') > -1; const isAdmin = permissions.indexOf('configure') > -1; const isCommentOnly = false; - const permissionDoc = { userId, isActive, isAdmin, isCommentOnly }; + const isNoComments = false; + const permissionDoc = { userId, isActive, isAdmin, isNoComments, isCommentOnly }; const boardMembers = Boards.findOne(sandstormBoard._id).members; const memberIndex = _.pluck(boardMembers, 'userId').indexOf(userId); diff --git a/server/lib/utils.js b/server/lib/utils.js index c7763933..ee925847 100644 --- a/server/lib/utils.js +++ b/server/lib/utils.js @@ -6,10 +6,14 @@ allowIsBoardMember = function(userId, board) { return board && board.hasMember(userId); }; -allowIsBoardMemberNonComment = function(userId, board) { +allowIsBoardMemberCommentOnly = function(userId, board) { return board && board.hasMember(userId) && !board.hasCommentOnly(userId); }; +allowIsBoardMemberNoComments = function(userId, board) { + return board && board.hasMember(userId) && !board.hasNoComments(userId); +}; + allowIsBoardMemberByCard = function(userId, card) { const board = card.board(); return board && board.hasMember(userId); |