Indicate board or card through icons. Indicate if archived

This commit is contained in:
Andrés Manelli 2018-04-20 23:52:13 -03:00
parent 10aab8a733
commit f0597ef0c4
6 changed files with 40 additions and 4 deletions

View file

@ -20,8 +20,11 @@ template(name="cardDetails")
// else
{{_ 'top-level-card'}}
if archived
p.warning {{_ 'card-archived'}}
if getArchived
if isImportedBoard
p.warning {{_ 'board-archived'}}
else
p.warning {{_ 'card-archived'}}
.card-details-items
.card-details-item.card-details-item-received

View file

@ -15,8 +15,15 @@ template(name="minicard")
if $eq 'prefix-with-parent' currentBoard.presentParentTask
.parent-prefix
| {{ parentCardName }}
if isImported
span.imported-icon.fa.fa-share-alt
if isImportedBoard
a.js-imported-link
span.imported-icon.fa.fa-folder
else if isImportedCard
a.js-imported-link
span.imported-icon.fa.fa-id-card
if getArchived
span.imported-icon.imported-archived.fa.fa-archive
+viewer
= getTitle
if $eq 'subtext-with-full-path' currentBoard.presentParentTask

View file

@ -6,4 +6,15 @@ BlazeComponent.extendComponent({
template() {
return 'minicard';
},
events() {
return [{
'click .js-imported-link' (evt) {
if (this.data().isImportedCard())
Utils.goCardId(this.data().importedId);
else if (this.data().isImportedBoard())
Utils.goBoardId(this.data().importedId);
},
}];
},
}).register('minicard');

View file

@ -51,6 +51,8 @@
margin-right: 11px
vertical-align: baseline
font-size: 0.9em
.imported-archived
color: #937760
.is-selected &
transform: translateX(11px)

View file

@ -109,6 +109,7 @@
"bucket-example": "Like “Bucket List” for example",
"cancel": "Cancel",
"card-archived": "This card is moved to Recycle Bin.",
"board-archived": "This board is moved to Recycle Bin.",
"card-comments-title": "This card has %s comment.",
"card-delete-notice": "Deleting is permanent. You will lose all actions associated with this card.",
"card-delete-pop": "All actions will be removed from the activity feed and you won't be able to re-open the card. There is no undo.",

View file

@ -721,6 +721,18 @@ Cards.helpers({
);
}
},
getArchived() {
if (this.isImportedCard()) {
const card = Cards.findOne({ _id: this.importedId });
return card.archived;
} else if (this.isImportedBoard()) {
const board = Boards.findOne({ _id: this.importedId});
return board.archived;
} else {
return this.archived;
}
},
});
Cards.mutations({