diff options
58 files changed, 164 insertions, 77 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index ae90415e..e0d5a3f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ This release adds the following new features: - [Add user option to hide finished checklist items. Strikethrough checked items](https://github.com/wekan/wekan/pull/3167). Thanks to marc1006. +- [Added the possibility to start a vote via API edit_card. And added some better visibility to see what was + voted](https://github.com/wekan/wekan/pull/3170). + Thanks to NicoP-S. and fixes the following bugs: diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index 2aa77627..dda95e3e 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -220,8 +220,14 @@ template(name="cardDetails") +viewer = getVoteQuestion if showVotingButtons - button.card-details-green.js-vote.js-vote-positive(class="{{#if voteState}}voted{{/if}}") {{_ 'vote-for-it'}} - button.card-details-red.js-vote.js-vote-negative(class="{{#if $eq voteState false}}voted{{/if}}") {{_ 'vote-against'}} + button.card-details-green.js-vote.js-vote-positive(class="{{#if voteState}}voted{{/if}}") + if voteState + i.fa.fa-thumbs-up + {{_ 'vote-for-it'}} + button.card-details-red.js-vote.js-vote-negative(class="{{#if $eq voteState false}}voted{{/if}}") + if $eq voteState false + i.fa.fa-thumbs-down + {{_ 'vote-against'}} //- XXX We should use "editable" to avoid repetiting ourselves if canModifyCard diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 11e010d4..a91d9b6e 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -38,22 +38,6 @@ BlazeComponent.extendComponent({ Meteor.subscribe('unsaved-edits'); }, - voteState() { - const card = this.currentData(); - const userId = Meteor.userId(); - let state; - if (card.vote) { - if (card.vote.positive) { - state = _.contains(card.vote.positive, userId); - if (state === true) return true; - } - if (card.vote.negative) { - state = _.contains(card.vote.negative, userId); - if (state === true) return false; - } - } - return null; - }, isWatching() { const card = this.currentData(); return card.findWatcher(Meteor.userId()); @@ -412,9 +396,9 @@ BlazeComponent.extendComponent({ const forIt = $(e.target).hasClass('js-vote-positive'); let newState = null; if ( - this.voteState() === null || - (this.voteState() === false && forIt) || - (this.voteState() === true && !forIt) + this.data().voteState() === null || + (this.data().voteState() === false && forIt) || + (this.data().voteState() === true && !forIt) ) { newState = forIt; } diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade index 8afe1976..03511e0a 100644 --- a/client/components/cards/minicard.jade +++ b/client/components/cards/minicard.jade @@ -106,9 +106,9 @@ template(name="minicard") span.badge-icon.fa.fa-align-left if getVoteQuestion .badge.badge-state-image-only(title=getVoteQuestion) - span.badge-icon.fa.fa-thumbs-up + span.badge-icon.fa.fa-thumbs-up(class="{{#if voteState}}text-green{{/if}}") span.badge-text {{ voteCountPositive }} - span.badge-icon.fa.fa-thumbs-down + span.badge-icon.fa.fa-thumbs-down(class="{{#if $eq voteState false}}text-red{{/if}}") span.badge-text {{ voteCountNegative }} if attachments.count .badge diff --git a/client/components/cards/minicard.styl b/client/components/cards/minicard.styl index 7d72a588..03d242ac 100644 --- a/client/components/cards/minicard.styl +++ b/client/components/cards/minicard.styl @@ -299,3 +299,8 @@ minicard-color(background, color...) .minicard-indigo minicard-color(#4b0082, #ffffff) //White text for better visibility + +.text-red + color:red +.text-green + color:green diff --git a/i18n/ar.i18n.json b/i18n/ar.i18n.json index 4441143f..07d42f3d 100644 --- a/i18n/ar.i18n.json +++ b/i18n/ar.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/bg.i18n.json b/i18n/bg.i18n.json index b9699b8f..88725347 100644 --- a/i18n/bg.i18n.json +++ b/i18n/bg.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/br.i18n.json b/i18n/br.i18n.json index 67217ab9..bd18ada8 100644 --- a/i18n/br.i18n.json +++ b/i18n/br.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/ca.i18n.json b/i18n/ca.i18n.json index 33e88763..56d99357 100644 --- a/i18n/ca.i18n.json +++ b/i18n/ca.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/cs.i18n.json b/i18n/cs.i18n.json index 1ff7cfda..8fa3f9e8 100644 --- a/i18n/cs.i18n.json +++ b/i18n/cs.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/da.i18n.json b/i18n/da.i18n.json index a78e76ef..18611591 100644 --- a/i18n/da.i18n.json +++ b/i18n/da.i18n.json @@ -808,5 +808,6 @@ "voting": "Afstemning", "archived": "Arkiveret", "delete-linked-card-before-this-card": "Du kan ikke slette dette kort før der slettes sammenkædede kort som har", - "delete-linked-cards-before-this-list": "Du kan ikke slette denne liste før der slettes sammenkædede kort, der peger til kort i denne liste" + "delete-linked-cards-before-this-list": "Du kan ikke slette denne liste før der slettes sammenkædede kort, der peger til kort i denne liste", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/de.i18n.json b/i18n/de.i18n.json index f0a353a6..e26b0ca2 100644 --- a/i18n/de.i18n.json +++ b/i18n/de.i18n.json @@ -808,5 +808,6 @@ "voting": "Abstimunng", "archived": "Archiviert", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/el.i18n.json b/i18n/el.i18n.json index e6024f40..ef61a0dc 100644 --- a/i18n/el.i18n.json +++ b/i18n/el.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/en-GB.i18n.json b/i18n/en-GB.i18n.json index 0795c509..326bc396 100644 --- a/i18n/en-GB.i18n.json +++ b/i18n/en-GB.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/eo.i18n.json b/i18n/eo.i18n.json index c83e3f96..66f08510 100644 --- a/i18n/eo.i18n.json +++ b/i18n/eo.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/es-AR.i18n.json b/i18n/es-AR.i18n.json index 0c60079a..1819d0fd 100644 --- a/i18n/es-AR.i18n.json +++ b/i18n/es-AR.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/es-CL.i18n.json b/i18n/es-CL.i18n.json index 06e9781b..a29458a3 100644 --- a/i18n/es-CL.i18n.json +++ b/i18n/es-CL.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/es.i18n.json b/i18n/es.i18n.json index 7063d4a2..d952d332 100644 --- a/i18n/es.i18n.json +++ b/i18n/es.i18n.json @@ -808,5 +808,6 @@ "voting": "Votar", "archived": "Archivado", "delete-linked-card-before-this-card": "No puede borrar esta tarjeta antes de borrar la tarjeta enlazada que tiene", - "delete-linked-cards-before-this-list": "No puede borrar esta lista antes de borrar las tarjetas enlazadas que apuntan a tarjetas en esta lista" + "delete-linked-cards-before-this-list": "No puede borrar esta lista antes de borrar las tarjetas enlazadas que apuntan a tarjetas en esta lista", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/eu.i18n.json b/i18n/eu.i18n.json index b96705ce..3ce70123 100644 --- a/i18n/eu.i18n.json +++ b/i18n/eu.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/fa.i18n.json b/i18n/fa.i18n.json index eb2b581b..6266649e 100644 --- a/i18n/fa.i18n.json +++ b/i18n/fa.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/fi.i18n.json b/i18n/fi.i18n.json index bb58a6a2..22efb655 100644 --- a/i18n/fi.i18n.json +++ b/i18n/fi.i18n.json @@ -808,5 +808,6 @@ "voting": "Äänestys", "archived": "Arkistoitu", "delete-linked-card-before-this-card": "Et voi poistaa tätä korttia ennenkuin ensin poistat linkitetyn kortin jolla on", - "delete-linked-cards-before-this-list": "Et voi poistaa tätä listaa ennenkuin poistat linkitetyt kortit jotka osoittavat kortteihin tässä listassa" + "delete-linked-cards-before-this-list": "Et voi poistaa tätä listaa ennenkuin poistat linkitetyt kortit jotka osoittavat kortteihin tässä listassa", + "hide-checked-items": "Piilota ruksatut kohdat" } diff --git a/i18n/fr.i18n.json b/i18n/fr.i18n.json index 0ffbf867..620b85c6 100644 --- a/i18n/fr.i18n.json +++ b/i18n/fr.i18n.json @@ -808,5 +808,6 @@ "voting": "Vote", "archived": "Archivé", "delete-linked-card-before-this-card": "Vous ne pouvez pas supprimer cette carte avant d'avoir d'abord supprimé la carte liée qui a", - "delete-linked-cards-before-this-list": "Vous ne pouvez pas supprimer cette liste avant d'avoir d'abord supprimé les cartes liées qui pointent vers des cartes de cette liste" + "delete-linked-cards-before-this-list": "Vous ne pouvez pas supprimer cette liste avant d'avoir d'abord supprimé les cartes liées qui pointent vers des cartes de cette liste", + "hide-checked-items": "Cacher les éléments cochés" } diff --git a/i18n/gl.i18n.json b/i18n/gl.i18n.json index 266bcc26..20f199e5 100644 --- a/i18n/gl.i18n.json +++ b/i18n/gl.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/he.i18n.json b/i18n/he.i18n.json index 235be747..406e671d 100644 --- a/i18n/he.i18n.json +++ b/i18n/he.i18n.json @@ -808,5 +808,6 @@ "voting": "הצבעה", "archived": "בארכיון", "delete-linked-card-before-this-card": "לא ניתן למחוק את הכרטיס הזה לפני שמוחקים את הכרטיס המקושר שיש לו", - "delete-linked-cards-before-this-list": "לא ניתן למחוק את הרשימה הזו לפני שמוחקים את הכרטיסים שמצביעים לכרטיסים ברשימה הזו" + "delete-linked-cards-before-this-list": "לא ניתן למחוק את הרשימה הזו לפני שמוחקים את הכרטיסים שמצביעים לכרטיסים ברשימה הזו", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/hi.i18n.json b/i18n/hi.i18n.json index 50471148..94ca288b 100644 --- a/i18n/hi.i18n.json +++ b/i18n/hi.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/hu.i18n.json b/i18n/hu.i18n.json index e2450aa8..5064ff05 100644 --- a/i18n/hu.i18n.json +++ b/i18n/hu.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/hy.i18n.json b/i18n/hy.i18n.json index ead8eb6c..8c042e5e 100644 --- a/i18n/hy.i18n.json +++ b/i18n/hy.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/id.i18n.json b/i18n/id.i18n.json index de036359..02341ee7 100644 --- a/i18n/id.i18n.json +++ b/i18n/id.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/ig.i18n.json b/i18n/ig.i18n.json index c81e041e..518c480c 100644 --- a/i18n/ig.i18n.json +++ b/i18n/ig.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/it.i18n.json b/i18n/it.i18n.json index b3ddf3d7..f4732dcd 100644 --- a/i18n/it.i18n.json +++ b/i18n/it.i18n.json @@ -256,8 +256,8 @@ "current": "corrente", "custom-field-delete-pop": "Non potrai tornare indietro. Questa azione rimuoverà questo campo personalizzato da tutte le schede ed eliminerà ogni sua traccia.", "custom-field-checkbox": "Casella di scelta", - "custom-field-currency": "Currency", - "custom-field-currency-option": "Currency Code", + "custom-field-currency": "Valuta", + "custom-field-currency-option": "Codice Valuta", "custom-field-date": "Data", "custom-field-dropdown": "Lista a discesa", "custom-field-dropdown-none": "(niente)", @@ -808,5 +808,6 @@ "voting": "Votazione", "archived": "Archiviato", "delete-linked-card-before-this-card": "Non puoi eliminare questa scheda prima di avere eliminato una scheda collegata che ha", - "delete-linked-cards-before-this-list": "Non puoi eliminare questa lista prima di avere eliminato le schede collegate che puntano su schede in questa lista" + "delete-linked-cards-before-this-list": "Non puoi eliminare questa lista prima di avere eliminato le schede collegate che puntano su schede in questa lista", + "hide-checked-items": "Nascondi articoli controllati" } diff --git a/i18n/ja.i18n.json b/i18n/ja.i18n.json index 3ea079db..5fac2a9f 100644 --- a/i18n/ja.i18n.json +++ b/i18n/ja.i18n.json @@ -808,5 +808,6 @@ "voting": "投票", "archived": "アーカイブ", "delete-linked-card-before-this-card": "カード内にある、リンクされているカードを削除しなければ、このカードは削除できません", - "delete-linked-cards-before-this-list": "リスト内にある、他のカードを参照しているカードを削除しなければ、このリストは削除できません" + "delete-linked-cards-before-this-list": "リスト内にある、他のカードを参照しているカードを削除しなければ、このリストは削除できません", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/ka.i18n.json b/i18n/ka.i18n.json index c3190afb..bdb532a9 100644 --- a/i18n/ka.i18n.json +++ b/i18n/ka.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/km.i18n.json b/i18n/km.i18n.json index b9ec2c2f..362c811b 100644 --- a/i18n/km.i18n.json +++ b/i18n/km.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/ko.i18n.json b/i18n/ko.i18n.json index 5b838835..e969206d 100644 --- a/i18n/ko.i18n.json +++ b/i18n/ko.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/lv.i18n.json b/i18n/lv.i18n.json index 77e28271..40d760dd 100644 --- a/i18n/lv.i18n.json +++ b/i18n/lv.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/mk.i18n.json b/i18n/mk.i18n.json index 51236fd8..8e8ea54d 100644 --- a/i18n/mk.i18n.json +++ b/i18n/mk.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/mn.i18n.json b/i18n/mn.i18n.json index 57e9573c..55b6a98c 100644 --- a/i18n/mn.i18n.json +++ b/i18n/mn.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/nb.i18n.json b/i18n/nb.i18n.json index ddae9171..8132f212 100644 --- a/i18n/nb.i18n.json +++ b/i18n/nb.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/nl.i18n.json b/i18n/nl.i18n.json index 9720b885..a8c9c1f1 100644 --- a/i18n/nl.i18n.json +++ b/i18n/nl.i18n.json @@ -808,5 +808,6 @@ "voting": "Stemmen", "archived": "Gearchiveerd", "delete-linked-card-before-this-card": "Je kunt deze kaart niet verwijderen voordat de gekoppelde kaart is verwijderd ", - "delete-linked-cards-before-this-list": "Je kunt deze lijst niet verwijderen voordat de gekoppelde kaarten verwijderd zijn die verwijzen naar kaarten in deze lijst" + "delete-linked-cards-before-this-list": "Je kunt deze lijst niet verwijderen voordat de gekoppelde kaarten verwijderd zijn die verwijzen naar kaarten in deze lijst", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/oc.i18n.json b/i18n/oc.i18n.json index bcd1b039..93b9c8a1 100644 --- a/i18n/oc.i18n.json +++ b/i18n/oc.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/pl.i18n.json b/i18n/pl.i18n.json index b27706d4..20807431 100644 --- a/i18n/pl.i18n.json +++ b/i18n/pl.i18n.json @@ -808,5 +808,6 @@ "voting": "Głosowanie", "archived": "Zarchiwizowany", "delete-linked-card-before-this-card": "Nie możesz usunąć tej karty, dopóki nie usuniesz podpiętej karty, w której są", - "delete-linked-cards-before-this-list": "Nie możesz usunąć tej karty, dopóki nie usuniesz podpiętych kart, które wskazują na karty w tej liście" + "delete-linked-cards-before-this-list": "Nie możesz usunąć tej karty, dopóki nie usuniesz podpiętych kart, które wskazują na karty w tej liście", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/pt-BR.i18n.json b/i18n/pt-BR.i18n.json index 7533c8c4..44497631 100644 --- a/i18n/pt-BR.i18n.json +++ b/i18n/pt-BR.i18n.json @@ -808,5 +808,6 @@ "voting": "Votação", "archived": "Arquivado", "delete-linked-card-before-this-card": "Você não pode excluir este cartão antes de excluir primeiro o cartão vinculado que possui", - "delete-linked-cards-before-this-list": "Você não pode excluir esta lista antes de excluir primeiro os cartões vinculados que estão apontando para os cartões nesta lista" + "delete-linked-cards-before-this-list": "Você não pode excluir esta lista antes de excluir primeiro os cartões vinculados que estão apontando para os cartões nesta lista", + "hide-checked-items": "Esconder itens marcados" } diff --git a/i18n/pt.i18n.json b/i18n/pt.i18n.json index 05075ac8..3d9faaa8 100644 --- a/i18n/pt.i18n.json +++ b/i18n/pt.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Arquivado", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/ro.i18n.json b/i18n/ro.i18n.json index 927fb451..92d530d2 100644 --- a/i18n/ro.i18n.json +++ b/i18n/ro.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/ru.i18n.json b/i18n/ru.i18n.json index c6264cf4..31c98d7c 100644 --- a/i18n/ru.i18n.json +++ b/i18n/ru.i18n.json @@ -808,5 +808,6 @@ "voting": "Голосование", "archived": "Архивировано", "delete-linked-card-before-this-card": "Вы не можете удалить карточку, не удалив связанную c ней карточку, которая имеет ", - "delete-linked-cards-before-this-list": "Вы не можете удалить этот список, не удалив карточки, которые указывают на карточки в этом списке" + "delete-linked-cards-before-this-list": "Вы не можете удалить этот список, не удалив карточки, которые указывают на карточки в этом списке", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/sl.i18n.json b/i18n/sl.i18n.json index f14d60b6..e7bafc55 100644 --- a/i18n/sl.i18n.json +++ b/i18n/sl.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/sr.i18n.json b/i18n/sr.i18n.json index 66068920..94824dc3 100644 --- a/i18n/sr.i18n.json +++ b/i18n/sr.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/sv.i18n.json b/i18n/sv.i18n.json index bf2d3ff4..336fbd3a 100644 --- a/i18n/sv.i18n.json +++ b/i18n/sv.i18n.json @@ -808,5 +808,6 @@ "voting": "Röstning", "archived": "Arkiverad", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/sw.i18n.json b/i18n/sw.i18n.json index d908b12f..01ef8636 100644 --- a/i18n/sw.i18n.json +++ b/i18n/sw.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/ta.i18n.json b/i18n/ta.i18n.json index 089b65c2..8ec2f518 100644 --- a/i18n/ta.i18n.json +++ b/i18n/ta.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/th.i18n.json b/i18n/th.i18n.json index bca08fe2..4d6ec609 100644 --- a/i18n/th.i18n.json +++ b/i18n/th.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/tr.i18n.json b/i18n/tr.i18n.json index ee3bd9c1..10dcd6ea 100644 --- a/i18n/tr.i18n.json +++ b/i18n/tr.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/uk.i18n.json b/i18n/uk.i18n.json index 2f675da4..d9023866 100644 --- a/i18n/uk.i18n.json +++ b/i18n/uk.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/vi.i18n.json b/i18n/vi.i18n.json index c0d0c815..9f877399 100644 --- a/i18n/vi.i18n.json +++ b/i18n/vi.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/zh-CN.i18n.json b/i18n/zh-CN.i18n.json index a6300a23..a5a1433a 100644 --- a/i18n/zh-CN.i18n.json +++ b/i18n/zh-CN.i18n.json @@ -808,5 +808,6 @@ "voting": "投票", "archived": "存档", "delete-linked-card-before-this-card": "在你首次删除卡片前你无法删除此选项卡片", - "delete-linked-cards-before-this-list": "在首先删除指向此列表中的卡的链接卡之前,不能删除此列表" + "delete-linked-cards-before-this-list": "在首先删除指向此列表中的卡的链接卡之前,不能删除此列表", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/zh-HK.i18n.json b/i18n/zh-HK.i18n.json index 0a01b931..b473bd61 100644 --- a/i18n/zh-HK.i18n.json +++ b/i18n/zh-HK.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/i18n/zh-TW.i18n.json b/i18n/zh-TW.i18n.json index 945d71f3..b34d3901 100644 --- a/i18n/zh-TW.i18n.json +++ b/i18n/zh-TW.i18n.json @@ -808,5 +808,6 @@ "voting": "Voting", "archived": "Archived", "delete-linked-card-before-this-card": "You can not delete this card before first deleting linked card that has", - "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list" + "delete-linked-cards-before-this-list": "You can not delete this list before first deleting linked cards that are pointing to cards in this list", + "hide-checked-items": "Hide checked items" } diff --git a/models/cards.js b/models/cards.js index 2e297d63..1ccc836a 100644 --- a/models/cards.js +++ b/models/cards.js @@ -1112,6 +1112,21 @@ Cards.helpers({ return Users.find({ _id: { $in: this.vote.negative } }); return []; }, + voteState() { + const userId = Meteor.userId(); + let state; + if (this.vote) { + if (this.vote.positive) { + state = _.contains(this.vote.positive, userId); + if (state === true) return true; + } + if (this.vote.negative) { + state = _.contains(this.vote.negative, userId); + if (state === true) return false; + } + } + return null; + }, getId() { if (this.isLinked()) { @@ -2374,6 +2389,10 @@ if (Meteor.isServer) { * @param {boolean} [isOverTime] the new isOverTime field of the card * @param {string} [customFields] the new customFields value of the card * @param {string} [color] the new color of the card + * @param {Object} [vote] the vote object + * @param {string} vote.question the vote question + * @param {boolean} vote.public show who voted what + * @param {boolean} vote.allowNonBoardMembers allow all logged in users to vote? * @return_type {_id: string} */ JsonRoutes.add( @@ -2473,6 +2492,24 @@ if (Meteor.isServer) { { $set: { color: newColor } }, ); } + if (req.body.hasOwnProperty('vote')) { + const newVote = req.body.vote; + newVote.positive = []; + newVote.negative = []; + if (!newVote.hasOwnProperty('public')) newVote.public = false; + if (!newVote.hasOwnProperty('allowNonBoardMembers')) + newVote.allowNonBoardMembers = false; + + Cards.direct.update( + { + _id: paramCardId, + listId: paramListId, + boardId: paramBoardId, + archived: false, + }, + { $set: { vote: newVote } }, + ); + } if (req.body.hasOwnProperty('labelIds')) { let newlabelIds = req.body.labelIds; if (_.isString(newlabelIds)) { |